Elasticsearch 7.6.2 cluster setup
1. Environmental preparation
Install Elasticsearch 7.6.2
Server: 192.168.232.4 (Master)
192.168.232.5
192.168.232.6
To install Elasticsearch, please refer to https://www.cnblogs.com/jhtian/p/12664890.html
The directories after installation are as follows:
2. Configure the cluster
修改 elasticsearch.yml
The configuration information is as follows:
cluster.name: test-es-cluster
node.name: es-node1
path.data: /usr/local/elasticsearch-7.6.2/data
path.logs: /usr/local/elasticsearch-7.6.2/logs
network.host: 0.0.0.0
http.port: 9200
http.cors.enabled: true
http.cors.allow-origin: "*"
node.master: true
node.data: true
discovery.seed_hosts:["192.168.232.4","192.168.232.5","192.168.232.6"]
cluster.initial_master_nodes: ["es-node1"]
Note: ":" and the value require a space directly
After the above configuration information is configured, enter the bin directory, start Elasticsearch, and then access the IP + port through the browser.
Access to view to get the following information, here the configuration is successful!