linux下.xz文件的解压方式
安装xz:yum -y install xz
xz -d .tar.xz //生成了.tar文件
tar -xvf .tar
解压.xz文件
xz -d node-v10.15.0-linux-x64.tar.xz
解压tar文件
tar -xvf node-v10.15.0-linux-x64.tar
配置NODE_HOME
vim /etc/profile
export NODE_HOME=/usr/local/software/node-v10.15.0-linux-x64
export PATH=$PATH:$JAVA_HOME/bin:$NODE_HOME/bin
source /etc/profile
[root@node02 ~]# node -v
v10.15.0
[root@node02 ~]# npm -v
6.4.1
安装unzip包
yum -y install unzip
解压zip包
unzip elasticsearch-head-master.zip
grunt安装:
进入下载的elasticsearch-head-master
cd elasticsearch-head
修改elasticsearch.yml文件
1 2 3 4 |
|
修改Gruntfile.js文件,修改服务监听地址(增加hostname属性,将其值设置为*)
修改head/_site/app.js,修改head连接es的地址(修改localhost为本机的IP地址)
启动插件(后台启动方式)
cd /usr/share/elasticsearch-head/node_modules/grunt/bin/
nohup ./grunt server & exit