日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網為廣大站長提供免費收錄網站服務,提交前請做好本站友鏈:【 網站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

一、環境準備

1.1、環境列表

節點名稱

系統

ip地址

es-node1

centos7.6

192.168.10.128

es-node2

centos7.6

192.168.10.129

es-node3

centos7.6

192.168.10.130

1.2、修改主機名

#分別到主機執行
hostnamectl set-hostname es-node1
hostnamectl set-hostname es-node2
hostnamectl set-hostname es-node3

1.3、系統init

yum -y install wget vim lrzsz net-tools ntp
#修改yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo 
yum clean all
yum -y update

# 關閉 防火墻
systemctl stop firewalld
systemctl disable firewalld

# 關閉 Selinux
setenforce 0
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config

#時間同步
rm -f /etc/localtime
ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
systemctl start chronyd.service && systemctl enable chronyd.service

二、安裝Docker

# 卸載舊版本
yum remove -y docker 
docker-client 
docker-client-latest 
docker-common 
docker-latest 
docker-latest-logrotate 
docker-logrotate 
docker-selinux 
docker-engine-selinux 
docker-engine

# 設置 yum repository
yum install -y yum-utils nfs-utils gfs2-utils glusterfs-fuse 
device-mApper-persistent-data 
lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

#鏡像加速,請更換為自己公司的
mkdir -p /etc/docker /data/docker
tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://17i90p15.mirror.aliyuncs.com"],
  "insecure-registries": ["192.168.10.45"],
  "graph": "/data/docker"
}
EOF

# 安裝并啟動 docker
yum install -y docker-ce-18.09.7 docker-ce-cli-18.09.7 containerd.io
systemctl enable docker
systemctl start docker

三、操作系統限制修改

#文件包含限制一個進程可以擁有的VMA(虛擬內存區域)的數量
echo "vm.max_map_count=655360" >> /etc/sysctl.conf
sysctl -p

四、elasticsearch配置

4.1、創建目錄

[root@es-node1 ~]# mkdir -p /data/elasticsearch/{data,logs,plugins}

4.2、配置文件

es-node1:

[root@es-node1 ~]# cd /data/elasticsearch/
[root@es-node1 elasticsearch]# cat > elasticsearch.yml <<  EOF
cluster.name: elasticsearch-cluster
node.name: es-node1
network.bind_host: 0.0.0.0
network.publish_host: 192.168.10.128
http.port: 9200
transport.tcp.port: 9300
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true 
node.data: true  
discovery.zen.ping.unicast.hosts: ["192.168.10.128:9300","192.168.10.129:9300","192.168.10.130:9300"]
discovery.zen.minimum_master_nodes: 2
discovery.zen.fd.ping_timeout: 1m
discovery.zen.fd.ping_retries: 5
cluster.initial_master_nodes: ["192.168.10.128:9300","192.168.10.129:9300","192.168.10.130:9300"]
EOF

es-node2:

[root@es-node1 ~]# cd /data/elasticsearch/
[root@es-node1 elasticsearch]# cat > elasticsearch.yml <<  EOF
cluster.name: elasticsearch-cluster
node.name: es-node2
network.bind_host: 0.0.0.0
network.publish_host: 192.168.10.129
http.port: 9200
transport.tcp.port: 9300
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true 
node.data: true  
discovery.zen.ping.unicast.hosts: ["192.168.10.128:9300","192.168.10.129:9300","192.168.10.130:9300"]
discovery.zen.minimum_master_nodes: 2
discovery.zen.fd.ping_timeout: 1m
discovery.zen.fd.ping_retries: 5
cluster.initial_master_nodes: ["192.168.10.128:9300","192.168.10.129:9300","192.168.10.130:9300"]
EOF

es-node3:

[root@es-node1 ~]# cd /data/elasticsearch/
[root@es-node1 elasticsearch]# cat > elasticsearch.yml <<  EOF
cluster.name: elasticsearch-cluster
node.name: es-node3
network.bind_host: 0.0.0.0
network.publish_host: 192.168.10.130
http.port: 9200
transport.tcp.port: 9300
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true 
node.data: true  
discovery.zen.ping.unicast.hosts: ["192.168.10.128:9300","192.168.10.129:9300","192.168.10.130:9300"]
discovery.zen.minimum_master_nodes: 2
discovery.zen.fd.ping_timeout: 1m
discovery.zen.fd.ping_retries: 5
cluster.initial_master_nodes: ["192.168.10.128:9300","192.168.10.129:9300","192.168.10.130:9300"]
EOF

五、啟動

#es-node1:
[root@es-node1 ~]# docker run -d --name es-node1  --network=host --privileged=true  
-e ES_JAVA_OPTS="-Xms6144m -Xmx6144m"  
-e TAKE_FILE_OWNERSHIP=true 
-v /data/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml 
-v /data/elasticsearch/data:/usr/share/elasticsearch/data 
-v /data/elasticsearch/logs:/usr/share/elasticsearch/logs 
-v /data/elasticsearch/plugins:/usr/share/elasticsearch/plugins 
elasticsearch:7.12.0

#es-node2:
[root@es-node2 ~]# docker run -d --name es-node2  --network=host --privileged=true  
-e ES_JAVA_OPTS="-Xms6144m -Xmx6144m"  
-e TAKE_FILE_OWNERSHIP=true 
-v /data/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml 
-v /data/elasticsearch/data:/usr/share/elasticsearch/data 
-v /data/elasticsearch/logs:/usr/share/elasticsearch/logs 
-v /data/elasticsearch/plugins:/usr/share/elasticsearch/plugins 
elasticsearch:7.12.0

#es-node3:
[root@es-node3 ~]# docker run -d --name es-node3  --network=host --privileged=true  
-e ES_JAVA_OPTS="-Xms6144m -Xmx6144m"  
-e TAKE_FILE_OWNERSHIP=true 
-v /data/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml 
-v /data/elasticsearch/data:/usr/share/elasticsearch/data 
-v /data/elasticsearch/logs:/usr/share/elasticsearch/logs 
-v /data/elasticsearch/plugins:/usr/share/elasticsearch/plugins 
elasticsearch:7.12.0

六、elasticsearch-head安裝

[root@es-node1 ~]# docker run -d --name es-head -p 9100:9100 mobz/elasticsearch-head:5

打開
http://192.168.10.128:9100 ,輸入連接http://192.168.10.128:9200/,或者上面任意一個節點

分享到:
標簽:elasticsearch
用戶無頭像

網友整理

注冊時間:

網站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網站吧!
最新入駐小程序

數獨大挑戰2018-06-03

數獨一種數學游戲,玩家需要根據9

答題星2018-06-03

您可以通過答題星輕松地創建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學四六

運動步數有氧達人2018-06-03

記錄運動步數,積累氧氣值。還可偷

每日養生app2018-06-03

每日養生,天天健康

體育訓練成績評定2018-06-03

通用課目體育訓練成績評定