Elasticsearch7 集群配置文件(解决elasticsearch head无法连接elasticsearch问题)


1.主节点配置文件

[root@es_master ~]# cat  /home/wx/elasticsearch-7.9.0/config/elasticsearch.yml
cluster.name: ELK-Cluster
node.name: elk-node1
# 开启跨域访问支持,默认为false(不开启elasticsearch head插件无法链接elasticsearch)
http.cors.enabled: true # 跨域访问允许的域名地址(不开启elasticsearch head插件无法链接elasticsearch)
http.cors.allow-origin: "*" # 通过为 cluster.initial_master_nodes 参数设置符合主节点条件的节点的 IP 地址来引导启动集群
cluster.initial_master_nodes: ["elk-node1"]
path.data: /home/wx/elasticsearch-7.9.0/data
path.logs: /home/wx/elasticsearch-7.9.0/logs
bootstrap.memory_lock: true
network.host: 0.0.0.0
http.port: 9200
discovery.zen.ping.unicast.hosts: ["192.168.56.30","192.168.56.31"]

2.从节点配置文件

[root@ex_node ~]# cat  /home/wx/elasticsearch-7.9.0/config/elasticsearch.yml
cluster.name: ELK-Cluster
node.name: elk-node2
cluster.initial_master_nodes: ["elk-node1"]
path.data: /home/wx/elasticsearch-7.9.0/data
path.logs: /home/wx/elasticsearch-7.9.0/logs
bootstrap.memory_lock: true
network.host: 0.0.0.0
http.port: 9200
discovery.zen.ping.unicast.hosts: ["192.168.56.30","192.168.56.31"]

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM