CentOS7 linux install Elasticsearch-6.7.0

CentOS7 linux install Elasticsearch-6.7.0

1. Download the installation package:

Link: https://pan.baidu.com/s/1rC–5Zwd7Df_Frq_GNhJkQ
Extraction code: zuz1

2. Installation

Use third-party software to upload the installation package to Linux and
Insert picture description here
decompress it to a specified folder. Here, the root user can decompress it to a specific folder.
tar -zxvf 安装文件 -C 指定目录位置
Insert picture description here
After the decompression is completed, directly enter the bin directory and run it will report an error
Insert picture description here
This is because the root user is not supported to run directly, you need to create a new user,
groupadd elsearchcreate an elsearch group,
useradd elsearch -g elsearchcreate an elsearch user,
passwd elsearchmodify the password,
Insert picture description here
modify the permission information of the decompressed file, and
chown -R elsearch:elsearch 解压文件
Insert picture description here
enter the bin folder

Insert picture description here
Execute the file,
Insert picture description here
open a new window
Insert picture description here
and run after login.
curl http://localhost:9200
The following result shows that the run was successful.
Insert picture description here

3. Configuration file modification

Enter the config folder and modify the elasticsearch.yml file.
Insert picture description here
Find the network, uncomment it, and modify it to 0.0.0.0.

Insert picture description here
If the network.host address is not localhost or 127.0.0.1, it will be regarded as a production environment, which requires higher environmental requirements and needs to modify the jvm .options file

Insert picture description here

Insert picture description here
Use the root user to modify the system configuration file
vim /etc/sysctl.conf
Insert picture description here

Add in the last line
vm.max_map_count=655360
Insert picture description here

Make the configuration effective
Insert picture description here

4. Start

Into the bin using the command
./elasticsearchor ./elasticsearch -dbackground to start
Insert picture description here

5. Error resolution

Insert picture description here
Solution:
modify system-level
vi /etc/security/limits.conf
Insert picture description here
files and add files at the end

* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096

Insert picture description here

After the modification is completed, you need to log in again to run the sh file.
Enter in the new window curl http://localhost:9200for verification
Insert picture description here

6. Process view

Under root user authority
jps
Insert picture description here

Stop elsearch
kill 进程号

Guess you like

Origin blog.csdn.net/Guesshat/article/details/109583070