Download the installation package
Download Elasticsearch-head
: Https://github.com/mobz/elasticsearch-head (or Baidu search Elasticsearch head GitHub)
Select Master, then download ZIP and get elasticsearch-head-master.zip after download
Unzip the installation
Put the downloaded elasticsearch-head-master.zip into the/opt directory, log in with the root account, and extract the command upzip in the/opt directory elasticsearch-head-master.zip
Remove the compressed package, using the command rm-f elasticsearch-head-master.zip
Installing Nodejs
: https://nodejs.org/en/
Here we download get node-v4.8.3-linux-x64.tar.gz, put it in the/OPT directory, unzip the installation, use the command TAR-ZXVF node-v4.8.3-linux-x64.tar.gz
After the installation is complete, in the current directory, get node-v4.8.3-linux-x64 This directory, enter the directory, use the command CD node-v4.8.3-linux-x64, and then print to get the address of the current directory, using the command pwd , and then configure the environment variables, using the command vim/etc/profile , the APPEND environment variable is configured as follows:
Run source/etc/profileto make the/etc/profile file effective
Enter node-v to check if the installation was successful, the installation will show the node version
Installing NPM
Go to the Elasticsearch-head-master directory and use the command cd/opt/elasticsearch-head-master
Then run the command npm install, if it is slow or the installation fails, you can use a domestic image:npm install-g cnpm--registry=https://registry.npm.taobao.org
Then run the command npm install-g grunt-cli
Modifying the Elasticsearch configuration file
Using the command vim config/elasticsearch.yml, append the following three lines of information at the end (if localhost is local access, the first line IP address is not added):
Modify Gruntfile.js
Still under the Elasticsearch-head-master directory, use the command vim gruntfile.js to modify the parameters as follows (write the current IP):
Start Elasticsearch-head
Under the elasticsearch-head-master/directory, run the start command Grunt server
The page can then be accessed via the ip:9100 port
Background boot Elasticsearch-head
Background start Grunt Server command nohup Grunt Server &exit
If you want to close the head plugin, use the Linux find Process command PS aux|grep Head
End Process Kill process number
Linux under Elasticsearch5.0 Head plug-in installation