下载node环境包
wget https://npm.taobao.org/mirrors/node/latest-v4.x/node-v4.5.0-linux-x64.tar.gz
配置下环境变量,编辑/etc/profile添加
export NODE_HOME=/usr/local/node-v4.5.0-linux-x64
export PATH= P A T H : PATH: PATH:NODE_HOME/bin/
export NODE_PATH=$NODE_HOME/lib/node_modules
source /etc/profile
安装npm
npm install -g cnpm --registry=https://registry.npm.taobao.org
npm install -g grunt
npm install -g grunt-cli --registry=https://registry.npm.taobao.org --no-proxy
下载head环境包
wget https://github.com/mobz/elasticsearch-head/archive/master.zip
下载依赖
unzip master.zip
cd elasticsearch-head-master
npm install
修改head端口
sed -i ‘s/port: 9100/port: 11111/g’ Gruntfile.js
修改elasticsearch.yml,并重启集群
http.cors.enabled: true
http.cors.allow-origin: “*”
启动
grunt server
登录
ip:11111
连接按钮前输入要修改为es集群某个节点的ip和相应的http端口