------------ Recovery content started ------------
- Ready to work
Create three virtual machines (internet communication in static Internet access mode) As shown in the figure below
192.168.1.200
192.168.1.201
192.168.1.202
200 nodes pinged, the others just show the intranet interoperability
201 nodes
202 nodes
Download and unzip elasticsearch-7.6.2 to / usr / local / elastcsearch 3 machines and do the same
Set cluster-name
set node-name
Set path.data = index directory
path.log = add, delete, change and check operation log directory
Set network settings
network.host: 0.0.0.0 #Allow external network access
network.publish_host: 192.168.1.200
#Bind internal communication port http.port: 9200
#Port http.cors.enabled: true
#Enable cross-domain http.cors .allow-origin: "*"
#Allow all node.master: true # Whether it is the master node
node.data: true # Whether to store data
Set cluster node and master node
discovery.seed_hosts: ["192.168.1.200", "192.168.1.201", "192.168.1.202"]
cluster.initial_master_nodes: ["e1"]
The three configured overall nodes are as follows
useradd esuser
chown -R esuser: esuser /usr/local/elasticsearch-7.4.2
su esuser
whoami
switch back to
cd /usr/local/elasticsearch-7.6.2/bin
and start
If there is an error
All three need to be operated.
Then you need to switch to the root user to modify the configuration as follows:
vim /etc/security/limits.conf
- soft nofile 65536
- hard nofile 131072
- soft nproc 2048
- hard nproc 4096
Then modify vim /etc/sysctl.conf
Command refresh
sysctl -p
Switch back to su esuser user to restart
After a successful restart, I directly used the es-head tool to view