ELK7版本搭建参考:https://www.cnblogs.com/minseo/p/10948632.html

  node-1已经安装配置好  

  配置文件如下

[root@salt-test conf.d]# sed '/#/d' /etc/elasticsearch/elasticsearch.yml 
cluster.name: my-es
node.name: node-1
path.data: /data/es-data
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
http.port: 9200
#discovery.seed_hosts: ["192.168.1.4", "192.168.1.5"]
cluster.initial_master_nodes: ["node-1"]
http.cors.enabled: true
http.cors.allow-origin: "*"

  

  新建主机node-2修改elasticsearch配置文件

/etc/elasticsearch/elasticsearch.yml 

  

#集群名需要和node-1一致
cluster.name: my-es
#node名
node.name: node-2
path.data: /data/es-data
path.logs: /var/log/elasticsearch
network.host: 0.0.0.0
http.port: 9200
#集群中两个节点的IP
discovery.seed_hosts: ["192.168.1.4", "192.168.1.5"]
cluster.initial_master_nodes: ["node-1"]
http.cors.enabled: true
http.cors.allow-origin: "*"

  启动elasticsearch

  查看节点1和2

ELK之elasticsearch7版本集群设置

ELK之elasticsearch7版本集群设置

  数据会自动从节点1同步至节点2

  在head查看

ELK之elasticsearch7版本集群设置

 

相关文章:

  • 2021-07-24
  • 2022-12-23
  • 2022-12-23
  • 2021-12-18
  • 2021-09-24
  • 2022-02-15
  • 2021-11-25
  • 2021-07-25
猜你喜欢
  • 2021-10-13
  • 2021-08-31
  • 2021-09-30
  • 2022-02-18
  • 2021-12-01
  • 2021-11-22
  • 2021-10-16
相关资源
相似解决方案