elasticsearch集群配置

1、node-1

复制代码
cluster.name: cluster
node.name: node-1
node.master: true
node.data: true
path.data: /path/to/data
path.logs: /path/to/logs
network.host: 0.0.0.0
http.port: 9200
transport.tcp.port: 9300
http.cors.enabled: true
http.cros.allow-origin: "*"
discovery.seed_hosts: ["127.0.0.1:9300"]
cluster.initial_master_nodes: ["node-1"]
复制代码

2、node-2

复制代码
cluster.name: cluster
node.name: node-2
node.master: true
node.data: true
path.data: /path/to/data
path.logs: /path/to/logs
network.host: 0.0.0.0
http.port: 9201
transport.tcp.port: 9301
http.cors.enabled: true
http.cros.allow-origin: "*"
discovery.seed_hosts: ["127.0.0.1:9300", "127.0.0.1:9301"]
cluster.initial_master_nodes: ["node-1", "node-2"]
复制代码

3、node-3

复制代码
cluster.name: cluster
node.name: node-3
node.master: true
node.data: true
path.data: /path/to/data
path.logs: /path/to/logs
network.host: 0.0.0.0
http.port: 9202
transport.tcp.port: 9302
http.cors.enabled: true
http.cros.allow-origin: "*"
discovery.seed_hosts: ["127.0.0.1:9300", "127.0.0.1:9301", "127.0.0.1:9302"]
cluster.initial_master_nodes: ["node-1", "node-2", "node-3"]
复制代码

4、总结:此集群用于7版本的集群搭建,里面的参数更具需要进行调整,红色部分为集群需要配置的部分。

posted @   小不点丶  阅读(375)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
历史上的今天:
2017-03-21 解决Windows对JDK默认版本切换问题
点击右上角即可分享
微信分享提示