es版本 : 6.2.2
centos 版本 : 7
官网 https://www.elastic.co/cn/downloads/elasticsearch 下载最新版本
tar -zxvf
修改 config/elasticsearch.yml
cluster.name: "modred"
node.name: cluster1
path.data: /data/es/bin
path.logs: /data/es/log
network.host: 172.16.68.83
http.port: 9200
discovery.zen.ping.unicast.hosts: ["cluster1", "cluster2","cluster3"]
discovery.zen.minimum_master_nodes: 2
第一次启动 : 发现不允许root用户启动
----创建es用户 chown -R es elsticsearch 改变es权限,并且在/data下创建es持有人的es文件夹供使用
第二次启动 : max file descriptors [4096] for elasticsearch process likely too low, increase to at least [65536]
----vi /etc/security/limits.conf
原因:无法创建本地文件问题,用户最大可创建文件数太小
解决方案:切换到root用户,编辑limits.conf配置文件, 添加类似如下内容:
* hard nofile 65536
* soft nofile 65536
max virtual memory areas vm.max_map_count [65530] likely too low, increase to at least [262144]
原因:最大虚拟内存太小
root用户执行命令:
[root@localhost ~]# sysctl -w vm.max_map_count=262144
其余两个节点进行同样操作,,打开cluster1:9200看到相应json
至此部署结束