首先将提供的两个软件包上传到服务器的/opt/soft目录下
cd /opt/soft/
tar xf node-v10.0.0-linux-x64.tar.gz
mv node-v10.0.0-linux-x64 /usr/local/
vim /etc/profile.d/node.sh
tar xf elasticsearch-head-master.tar
mv elasticsearch-head-master /usr/local/
vim /etc/profile.d/node.sh
export NODE_HOME=/usr/local/node-v10.0.0-linux-x64/
export PATH=$PATH:$NODE_HOME/bin
export DODE_PATH=$NODE_HOME/lib/node_modules
export GRUNT_HOME=/root/elasticsearch-head-master/node_modules/grunt-cli/
export PATH=$PATH:$GRUNT_HOME/bin
source /etc/profile.d/node.sh
启动 es插件
nohup grunt server &
使用
netstat -lntup | grep 9100
查看端口号
写入到开机自启动文件中
vim /etc/rc/local
cd /usr/local/elasticsearch-head-master/ && nohup grunt server &