download node
wget https://npm.taobao.org/mirrors/node/v6.9.5/node-v6.9.5-linux-x64.tar.gz
tar xf node-v6.9.5-linux-x64.tar.gz
add environment variable
[root@kibana ~]# cat /etc/profile
export NODE_HOME=/root/node-v6.9.5-linux-x64
export PATH=$PATH:${NODE_HOME}/bin
export NODE_PATH=${NODE_HOME}/lib/node_modules
[root@kibana ~]# source /etc/profile
Modify npm repository
npm config set registry https://registry.npm.taobao.org
npm config set disturl https://npm.taobao.org/dist
download head plugin
https://github.com/mobz/elasticsearch-head/archive/master.zip
unzip elasticsearch-head-master.zip
install grunt
cd elasticsearch-head-master
npm install -g grunt-cli
npm install
Modify the head plugin configuration file
Gruntfile.js modification
[root@kibana elasticsearch-head-master]# vi Gruntfile.js
90 connect: {
91 server: {
92 options: {
93 port: 9100,
94 base: '.',
95 keepalive: true
96 }
97 }
98 }
99
100 });
_site/app.js modification
[root@kibana _site]# vi app.js
4354 this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://192.168.19.93:9200";
start head
cd /root/elasticsearch-head-master
grunt server
Modify the configuration of the connection es node to allow head access
http.cors.enabled: true
http.cors.allow-origin: "*"