ELK7 version build Reference: https://www.cnblogs.com/minseo/p/10948632.html
node-1 is installed, configured
Configuration files are as follows
[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: "*"
New Host node-2 modified profile elasticsearch
/etc/elasticsearch/elasticsearch.yml
# Cluster name and node-1 requires consistent cluster.name: My-ES #node name node.name: Node-2 Path.Data: / Data / ES-Data path.logs: / var / log / elasticsearch network.host: 0.0.0.0 http.port,: 9200 # two nodes in the cluster IP discovery.seed_hosts: [ "192.168.1.4", "192.168.1.5"] cluster.initial_master_nodes: [ "node-. 1"] http.cors.enabled: to true http.cors.allow-Origin: "*"
Start elasticsearch
View nodes 1 and 2
Data is automatically synchronized from node 1 to node 2
Check in head