Installing Elasticsearch Head tool 1 on Linux, modifying the parameters of Elasticsearch
Edit the Elasticsearch configuration file elasticsearch.yml
/data/elasticsearch/elasticsearch-5.5.3/config/elasticsearch.yml
Add the following configuration
# 增加新的参数,这样head插件可以访问eshttp.cors.enabled: truehttp.cors.allow-origin: "*"
Restart Elasticsearch Service
2. Install node and install Grunt
Slightly
3. Modify head Source code
Headhttps://github.com/mobz/elasticsearch-head
Download the installation package Elasticsearch-head-master.zip, upload to the/data/elasticsearch/directory
Because the head code is also version 2.6, there are many restrictions on direct execution, such as the inability to access across machines. So users need to modify two places:
Modify Server Listener Address
Directory:head/Gruntfile.js
connect: { server: { options: { port: 9100, hostname: ‘*‘, base: ‘.‘, keepalive: true } }}
Add hostname
property, set to*
To modify the connection address:
Directory:head/_site/app.js
To modify the connection address of the head:
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";
Change localhost to the server address of your ES, such as:
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://10.10.10.10:9200";
4. Running Head
First turn on Elasticsearch.
Then in head目录
, execute npm install
the package since the download:
install
Finally, start Nodejs
grunt server
Visit: Http://192.168.1.124:9100/
This time, access to http://xxx:9100 can access the head plugin.
5. Background start Elasticsearch-head
Background start grunt Server command;
nohup grunt server &exit
nohup grunt server &
If you want to close the head plugin, use the Linux find process command:
ps aux|grep head
End Process:
Kill Process Number
Reference
head官方文档 https://github.com/mobz/elasticsearch-head#running-with-built-in-serverhttp://www.cnblogs.com/xing901022/p/6030296.htmlhttp://blog.csdn.net/hit0803107/article/details/54669909
5, permission 6, set up firewall 7, boot up
Install the Elasticsearch Head tool on Linux. MD