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
decompress it to a specified folder. Here, the root user can decompress it to a specific folder.
tar -zxvf 安装文件 -C 指定目录位置
After the decompression is completed, directly enter the bin directory and run it will report an error
This is because the root user is not supported to run directly, you need to create a new user,
groupadd elsearch
create an elsearch group,
useradd elsearch -g elsearch
create an elsearch user,
passwd elsearch
modify the password,
modify the permission information of the decompressed file, and
chown -R elsearch:elsearch 解压文件
enter the bin folder
Execute the file,
open a new window
and run after login.
curl http://localhost:9200
The following result shows that the run was successful.
3. Configuration file modification
Enter the config folder and modify the elasticsearch.yml file.
Find the network, uncomment it, and modify it to 0.0.0.0.
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
Use the root user to modify the system configuration file
vim /etc/sysctl.conf
Add in the last line
vm.max_map_count=655360
Make the configuration effective
4. Start
Into the bin using the command
./elasticsearch
or ./elasticsearch -d
background to start
5. Error resolution
Solution:
modify system-level
vi /etc/security/limits.conf
files and add files at the end
* soft nofile 65536
* hard nofile 131072
* soft nproc 2048
* hard nproc 4096
After the modification is completed, you need to log in again to run the sh file.
Enter in the new window curl http://localhost:9200
for verification
6. Process view
Under root user authority
jps
Stop elsearch
kill 进程号