Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/qq_29556507/article/details/89669575
My environment is ubuntu16.04 memory 2g
1. Install node
sudo apt install nodejs-legacy -y
2. Download
sudo git clone git://github.com/mobz/elasticsearch-head.git
sudo unzip elasticsearch-head.zip
3.
Installation grunt
cd elasticsearch-head
sudo npm install -g grunt --registry=https://registry.npm.taobao.org
npm install
In elasticsearch-head directory node_modules / grunt grunt if no binary program, you need to perform:
sudo npm install grunt --save
4. Modify the configuration file elasticsearch-head Gruntfile.js
Before modifying connect node configuration modification
Modified
Modify _site / app.js modify http: // localhost: 9200 ES fields to native IP port and modify your ip is the same
5. Modify profile elasticsearch
Modify elasticsearch.yml file add the following:
# 是否支持跨域
http.cors.enabled: true
# *表示支持所有域名
http.cors.allow-origin: "*"
6. Start the head plug service (running in the background)
/elasticsearch-head/node_modules/grunt/bin/grunt server &