码迷,mamicode.com
首页 > 其他好文 > 详细

搭建Elasticsearch5.6.8 分布式集群

时间:2018-02-28 17:28:46      阅读:844      评论:0      收藏:0      [点我收藏+]

标签:集群搭建   通过   数据   enable   blog   分布式集群   nbsp   log   机器   

准备2台机器,我这里有192.168.4.213 和 192.168.101.177

192.168.4.213 作为master 

192.168.101.177作为普通node

1、master[192.168.4.213] 配置elasticsearch.yml

#集群名称 所有节点要相同
cluster.name: my-application
#本节点名称
node.name: node-111

network.host: 0.0.0.0
http.port: 9200
# head插件设置
http.cors.enabled: true
#设置可以访问的ip 这里全部设置通过
http.cors.allow-origin: "*"
#作为master节点
node.master: true
#是否存储数据
node.data: true
#设置节点 访问的地址 设置master所在机器的ip
discovery.zen.ping.unicast.hosts: ["192.168.4.213"]

2、node[192.168.101.177] 配置elasticsearch.yml

#集群名称 所有节点要相同
cluster.name: my-application
#本节点名称
node.name: node-112

network.host: 0.0.0.0
http.port: 9200
# head插件设置
http.cors.enabled: true
#设置可以访问的ip 这里全部设置通过
http.cors.allow-origin: "*"
#作为master节点
node.master: false
#是否存储数据
node.data: true
#设置节点 访问的地址 设置master所在机器的ip
discovery.zen.ping.unicast.hosts: ["192.168.4.213"]

 3.集群搭建成功

技术分享图片

 

 

 

 

 

 

 

 

http://blog.csdn.net/opera95/article/details/78683831

搭建Elasticsearch5.6.8 分布式集群

标签:集群搭建   通过   数据   enable   blog   分布式集群   nbsp   log   机器   

原文地址:https://www.cnblogs.com/cnki/p/8484450.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!