Elastic Search 8.6.2 cluster installation and deployment
Elasticsearch is a distributed, RESTful search and data analysis engine capable of solving a variety of emerging use cases. At the heart of the Elastic Stack, Elasticsearch centralizes your data so you can search quickly, fine-tune relevance, perform powerful analytics, and scale easily.
1. Installation version
JDK: Use Elastic Search’s built-in JDK [Elastic Search 8 and above all come with JDK]
Elastic Search 8.6.2 latest version download address:
https://www.elastic.co/cn/downloads/elasticsearch
2. Server planning
Host name address remarks
node1 10.1.43.74
node2 10.1.43.75
node3 10.1.43.76
3. Create users and user groups
Do not use the root user when installing Elastic Search. You need to create a normal user elasticsearch to install. Subsequent execution commands are executed as the elasticsearch user. Use sudo to execute where you need to increase the permissions:
groupadd elasticsearch
useradd elasticsearch -g elasticsearh
sudo chown -R elasticsearch.elasticsearh /usr/local/setup
Upload the elasticsearch-8.6.2-linux-x86_64.tar.gz package to /usr/local/setup
4. Installation and deployment
Modify the maximum number of connections
sudo vi /etc/security/limits.conf
soft nofile 65535
hard nofile 65535
soft nproc 32000
hard nproc 32000
-------Explanation-------
soft nproc: The maximum number of processes for a single user. If it exceeds, a warning will be issued.
Hard nproc: The maximum number of processes for a single user. If it exceeds, an error will be reported.
soft nofile: The maximum number of files that can be opened. If it exceeds, an error will be reported. A warning will be given about
hard nofile: the maximum number of files that can be opened. If it exceeds the limit, an error will be reported.
Adjust virtual memory
sudo vi /etc/sysctl.conf
vm.max_map_count=262144