The elasticsearch5.0 version has a large gap with the 2.0 version due to the recent release. So, at present, we are still unfamiliar with some 5.0 of the use. This is the first way to write about the head plug-in, but also a record of their own.
Linux under head installation.
1. Under Https://github.com/mobz/elasticsearch-head, download the head package and upload it to the server.
(You can also use git to download: Git clone git://github.com/mobz/elasticsearch-head.git)
2. Unpack the Elasticsearch-head-master.zip package
Unzip Elasticsearch-head-master.zip
And go to the current directory
CD Elasticsearch-head-master
3. Download node. js
wget https://nodejs.org/dist/v4.6.1/node-v4.6.1-linux-x64.tar.gz
Or go to https://nodejs.org/dist/to find the corresponding version and the number of bits of the package uploaded to Linux for decompression
4. In the extracted directory node-v4.6.1-linux-x64 there is a bin directory, which is configured into the environment variable.
such as: Vim/etc/profile
In the final position, the
Export Path=/data/elasticsearch/node-v4.6.1-linux-x64/bin: $PATH configured in
After exiting, source/etc/profile the configuration file to the effect.
5. Use the node. JS installation for NPM install in the Elasticsearch-head-master directory.
Tip: Because node uses a foreign mirror by default. In the case of non-agent is slower, so it is recommended to redirect mirroring, such as:
NPM install-g cnpm--registry=https://registry.npm.taobao.org
6. Installing Grunt
NPM install–g GRUNT–CLI
After the installation is complete, you need to set some settings before starting grunt.
Open Gruntfile.js, and edit
Add a hostname: ' 0.0.0.0 ', note: You must use single quotes, and use 0.0.0.0, so that it can be accessed through all addresses
After that, you have to revise Elsearch's elasticsearch.yml and add it under the network.
http.host:192.168.10.253
Http.cors.enabled:true
Http.cors.allow-origin: "*"
after the modification is complete, or under the Elasticsearch-head-master directory, Grunt server starts the service
Then open ip:9100 to access the head plugin.