1、安装npm
sudo yum install npm
2、下载elasticsearch-head
cd /home/packages
sudo git clone https://github.com/mobz/elasticsearch-head.git
3、将npm镜像换为国内镜像
npm config set registry http://registry.npm.taobao.org/
4、安装phantomjs
sudo npm install phantomjs@2.1.1 --ignore
5、安装依赖环境
cd elasticsearch-head
sudo npm install
6、配置防火墙允许端口
sudo firewall-cmd --zone=public --add-port=9100/tcp --permanent
sudo firewall-cmd --reload
7、创建后台运行的日志文件es_head.log并设置所属用户
cd ../packages
sudo touch es_head.log
sudo chown -R lidamt:lidamt es_head.log
8、后台运行elasticsearch-head
nohup npm run start > /home/packages/es_head.log 2>&1 &
9、测试连接,内网连接需要挂vpn