tar -zxvf elasticsearch-6.3.1
cd elasticsearch-6.3.1
cd conf
配置两个文件
A: elasticserach.yml
cluster.name: aubin-cluster #必须相同
# 集群名称(不能重复)
node.name: els1(必须不同)
# 节点名称,仅仅是描述名称,用于在日志中区分(自定义)
#指定了该节点可能成为 master 节点,还可以是数据节点
node.master: true
node.data: true
path.data: /opt/data
# 数据的默认存放路径(自定义)
path.logs: /opt/logs
# 日志的默认存放路径
network.host: 192.168.0.1
# 当前节点的IP地址
http.port: 9200
# 对外提供服务的端口
transport.tcp.port: 9300
#9300为集群服务的端口
discovery.zen.ping.unicast.hosts: ["172.18.68.11", "172.18.68.12","172.18.68.13"]
# 集群个节点IP地址,也可以使用域名,需要各节点能够解析
discovery.zen.minimum_master_nodes: 2
# 为了避免脑裂,集群节点数最少为 半数+1
jvm.options
-Xms2g
-Xmx2g
注意:
nofile - 打开文件的最大数目
noproc - 进程的最大数目
soft 指的是当前系统生效的设置值
hard 表明系统中所能设定的最大值
* hard nofile 655360
* soft nofile 131072
* hard nproc 4096
* soft nproc 2048
vm.max_map_count=655360
fs.file-max=655360
未完成...
原文:https://www.cnblogs.com/pex1130/p/14491748.html