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