环境说明:
服务器(系统版本CentOS 7)
elasticsearch版本: elasticsearch-6.2.2
elasticsearch目录: /home/soft/
192.168.33.10 master
192.168.33.11 master data
192.168.33.12 master data
一、创建es运行帐号 【三台机器都统一用户为es】
useradd es
passwd es
二、创建数据目录与日志目录【三台机器都一样】
mkdir -p /home/soft/elasticsearch-6.2.2/data/data/
mkdir -p /home/soft/elasticsearch-6.2.2/data/logs/
三、修改目录权限[三台机器都一样]
chown -R es:es /home/soft/elasticsearch-6.2.2
四、修改配置信息
一. 192.168.33.10 配置信息:
cluster.name: my-application
node.name: node-192-168-33-10
path.data: /home/soft/elasticsearch-6.2.2/esData/data
path.logs: /home/soft/elasticsearch-6.2.2/esData/logs
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
network.host: 192.168.33.10
http.port: 9200
discovery.zen.ping.unicast.hosts: ["192.168.33.10:9300","192.168.33.11:9300","192.168.33.12:9300"]
discovery.zen.minimum_master_nodes: 2
gateway.recover_after_nodes: 3
node.master: true
node.data: false
node.ingest: false
search.remote.connect: false
二、192.168.33.11 配置信息:
cluster.name: my-application
**node.name: node-192-168-33-11**
path.data: /home/soft/elasticsearch-6.2.2/esData/data/
path.logs: /home/soft/elasticsearch-6.2.2/esData/logs/
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
**network.host: 192.168.33.11**
http.port: 9200
discovery.zen.ping.unicast.hosts: ["192.168.33.10:9300","192.168.33.11:9300","192.168.33.12:9300"]
discovery.zen.minimum_master_nodes: 2
gateway.recover_after_nodes: 3
node.master: true
** node.data: true**
node.ingest: false
search.remote.connect: false
三、192.168.33.12 配置信息
cluster.name: my-application
**node.name: node-12**
path.data: /home/soft/elasticsearch-6.2.2/esData/data/
path.logs: /home/soft/elasticsearch-6.2.2/esData/logs/
bootstrap.memory_lock: false
bootstrap.system_call_filter: false
** network.host: 192.168.33.12**
http.port: 9200
discovery.zen.ping.unicast.hosts: ["192.168.33.10:9300","192.168.33.11:9300","192.168.33.12:9300"]
discovery.zen.minimum_master_nodes: 2
gateway.recover_after_nodes: 3
node.master: true
node.data: true
node.ingest: false
search.remote.connect: false