faith丶

导航

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"]

 

posted on 2020-08-20 15:18  faith丶  阅读(1917)  评论(0编辑  收藏  举报