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版本的集群搭建,里面的参数更具需要进行调整,红色部分为集群需要配置的部分。