centos install elasticsearch stand-alone environment

First, download the tar package

In this directory you can download the official website of historical versions of elasticsearch

https://www.elastic.co/cn/downloads/past-releases#elasticsearch

 

Second, create a user

Linux environment, elasticsearch is not allowed to run as root, so use another user.

 

Third, extract the tar package

After the tart package uploaded to the linux environment, use the following command to extract tart package to the destination folder.

tar -zxvf elasticsearch-6.5.4.tar.gz -C /usr/soft

 

Fourth, the read and write permissions to the file after elasticsearch unpacked folder assigned to "es" newly created users

chown es:es elasticsearch-6.5.4 -R

 

Fifth, modify the configuration file

1. 修改 elasticsearch.yml

Elasticsearch file into the folder under the config directory, edit elasticsearch.yml file.

cd /usr/soft/elasticsearch-6.5.4/config
vi elasticsearch.yml

Network.host find this line, modify the ip address of the virtual machine.


2. Modify jvm.options

Jvm.options edit files in the directory elasticsearch

vi jvm.options

Find the next chart row

change into

3. Modify the sysctl.conf

Use the following command to edit the file

vi /etc/sysctl.conf

Add a line at the end

vm.max_map_count=262144

 

Sixth, start elasticsearch

Use the following command to switch to the "es" newly created users

su - es

Elasticsearch into the bin directory

cd /usr/soft/elasticsearch-6.5.4/bin

The boot scripts

./elasticsearch

 

Seven Frequently Asked Questions

If there is an error at startup, see another blog post issue summary

https://blog.csdn.net/y506798278/article/details/94312445

 

Eight, verification

Input ip + in the browser interface, the interface is shown below represents elasticsearch started successfully, of course, to be noted linux firewall port provided outwardly open ports.

 

 

Nine, close elasticsearch

You can create a new terminal connection linux, view the running process

View command is as follows

jps

Close process

kill 1905  -- 1905为jps查询所知

 

Published 48 original articles · won praise 52 · views 20000 +

Guess you like

Origin blog.csdn.net/y506798278/article/details/94295023