elasticsearch集群部署-ubuntu

1 es部署参考单节点部署

参考博客:https://blog.csdn.net/qq_35875008/article/details/115242056

 

2 多节点只需修改配置文件

master节点(3节点)

master1节点:
#集群名称
cluster.name: es-cluster

#节点名称
node.name: es-master-01

#是否是master节点,master节点存元数据
node.master: true
#是否是data数据节点,data数据节点存数据
node.data: false
#是否是ingest节点,ingest节点可以在数据真正进入index前,通过配置pipline拦截器对数据ETL
node.ingest: false

#数据目录,可挂载多个盘
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/logs

#http host和port
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
#设置是否压缩tcp上交互传输的数据
transport.tcp.compress: true

#设置集群中的Master节点的初始列表,可以通过这些节点来自动发现其他新加入集群的节点
discovery.zen.ping.unicast.hosts: [es-master-01,es-master-02,es-master-03]

#指定集群初始节点
cluster.initial_master_nodes: es-master-01

#防止脑裂配置,注意在多master时,这个值应该等于 Math.floor(master候选节点数/2)+1,#意思是master候选节点的数目最少达到多少个,才去选举master
discovery.zen.minimum_master_nodes: 2

# 设置跨域问题,方便使用elasticsearch-head来检测集群状态
http.cors.enabled: true
http.cors.allow-origin: /.*/

xpack.watcher.enabled: true
xpack.security.enabled: false
xpack.monitoring.enabled: true
xpack.monitoring.collection.enabled: true





master2节点:
#集群名称
cluster.name: es-cluster

#节点名称
node.name: es-master-02

#是否是master节点,master节点存元数据
node.master: true
#是否是data数据节点,data数据节点存数据
node.data: false
#是否是ingest节点,ingest节点可以在数据真正进入index前,通过配置pipline拦截器对数据ETL
node.ingest: false

#数据目录,可挂载多个盘
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/logs

#http host和port
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
#设置是否压缩tcp上交互传输的数据
transport.tcp.compress: true

#设置集群中的Master节点的初始列表,可以通过这些节点来自动发现其他新加入集群的节点
discovery.zen.ping.unicast.hosts: [es-master-01,es-master-02,es-master-03]

#指定集群初始节点
cluster.initial_master_nodes: es-master-01

#防止脑裂配置,注意在多master时,这个值应该等于 Math.floor(master候选节点数/2)+1,#意思是master候选节点的数目最少达到多少个,才去选举master
discovery.zen.minimum_master_nodes: 2

# 设置跨域问题,方便使用elasticsearch-head来检测集群状态
http.cors.enabled: true
http.cors.allow-origin: /.*/

xpack.watcher.enabled: true
xpack.security.enabled: false
xpack.monitoring.enabled: true
xpack.monitoring.collection.enabled: true





master3节点:
#集群名称
cluster.name: es-cluster

#节点名称
node.name: es-master-03

#是否是master节点,master节点存元数据
node.master: true
#是否是data数据节点,data数据节点存数据
node.data: false
#是否是ingest节点,ingest节点可以在数据真正进入index前,通过配置pipline拦截器对数据ETL
node.ingest: false

#数据目录,可挂载多个盘
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/logs

#http host和port
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
#设置是否压缩tcp上交互传输的数据
transport.tcp.compress: true

#设置集群中的Master节点的初始列表,可以通过这些节点来自动发现其他新加入集群的节点
discovery.zen.ping.unicast.hosts: [es-master-01,es-master-02,es-master-03]

#指定集群初始节点
cluster.initial_master_nodes: es-master-01

#防止脑裂配置,注意在多master时,这个值应该等于 Math.floor(master候选节点数/2)+1,#意思是master候选节点的数目最少达到多少个,才去选举master
discovery.zen.minimum_master_nodes: 2

# 设置跨域问题,方便使用elasticsearch-head来检测集群状态
http.cors.enabled: true
http.cors.allow-origin: /.*/

xpack.watcher.enabled: true
xpack.security.enabled: false
xpack.monitoring.enabled: true
xpack.monitoring.collection.enabled: true

 

node节点(3节点)

node1节点:
#集群名称
cluster.name: es-cluster

#节点名称
node.name: es-node-01

#是否是master节点,master节点存元数据
node.master: false
#是否是data数据节点,data数据节点存数据
node.data: true
#是否是ingest节点,ingest节点可以在数据真正进入index前,通过配置pipline拦截器对数据ETL
node.ingest: false

#数据目录,可挂载多个盘
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/logs

#http host和port
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
#设置是否压缩tcp上交互传输的数据
transport.tcp.compress: true
#bootstrap.memory_lock: true

#设置集群中的Master节点的初始列表,可以通过这些节点来自动发现其他新加入集群的节点
discovery.zen.ping.unicast.hosts: [es-master-01,es-master-02,es-master-03]

#指定集群初始节点
cluster.initial_master_nodes: es-master-01

# 设置跨域问题,方便使用elasticsearch-head来检测集群状态
http.cors.enabled: true
http.cors.allow-origin: /.*/

xpack.watcher.enabled: true
xpack.security.enabled: false
xpack.monitoring.enabled: true
xpack.monitoring.collection.enabled: true




node2节点:
#集群名称
cluster.name: es-cluster

#节点名称
node.name: es-node-02

#是否是master节点,master节点存元数据
node.master: false
#是否是data数据节点,data数据节点存数据
node.data: true
#是否是ingest节点,ingest节点可以在数据真正进入index前,通过配置pipline拦截器对数据ETL
node.ingest: false

#数据目录,可挂载多个盘
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/logs

#http host和port
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
#设置是否压缩tcp上交互传输的数据
transport.tcp.compress: true

#设置集群中的Master节点的初始列表,可以通过这些节点来自动发现其他新加入集群的节点
discovery.zen.ping.unicast.hosts: [es-master-01,es-master-02,es-master-03]

#指定集群初始节点
cluster.initial_master_nodes: es-master-01

# 设置跨域问题,方便使用elasticsearch-head来检测集群状态
http.cors.enabled: true
http.cors.allow-origin: /.*/

xpack.watcher.enabled: true
xpack.security.enabled: false
xpack.monitoring.enabled: true
xpack.monitoring.collection.enabled: true






node3节点:
#集群名称
cluster.name: es-cluster

#节点名称
node.name: es-node-03

#是否是master节点,master节点存元数据
node.master: false
#是否是data数据节点,data数据节点存数据
node.data: true
#是否是ingest节点,ingest节点可以在数据真正进入index前,通过配置pipline拦截器对数据ETL
node.ingest: false

#数据目录,可挂载多个盘
path.data: /data/elasticsearch/data
path.logs: /data/elasticsearch/logs

#http host和port
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
#设置是否压缩tcp上交互传输的数据
transport.tcp.compress: true

#设置集群中的Master节点的初始列表,可以通过这些节点来自动发现其他新加入集群的节点
discovery.zen.ping.unicast.hosts: [es-master-01,es-master-02,es-master-03]

#指定集群初始节点
cluster.initial_master_nodes: es-master-01

# 设置跨域问题,方便使用elasticsearch-head来检测集群状态
http.cors.enabled: true
http.cors.allow-origin: /.*/

xpack.watcher.enabled: true
xpack.security.enabled: false
xpack.monitoring.enabled: true
xpack.monitoring.collection.enabled: true

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

我是一颗大白菜

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值