系统环境:centos7
所需资源下载
nodejs和grunt安装 https://download.csdn.net/download/sinat_39562444/11500840
head安装 https://download.csdn.net/download/sinat_39562444/11500894
一、安装node.js和grunt
1. 上传 head-node.tar.gz
tar -xvf head-node.tar.gz -C /usr/local/
2. 建立软连接
ln -s /usr/local/node-v10.16.1-linux-x64/bin/node /usr/bin/node ln -s /usr/local/node-v10.16.1-linux-x64/bin/npm /usr/bin/npm ln -s /usr/local/node-v10.16.1-linux-x64/bin/grunt /usr/bin/grunt
3. 查看版本
二、安装head
1. elasticsearch-head-master.tar.gz
tar -xvf elasticsearch-head-master.tar.gz
2. 启动head
grunt server
三、浏览器访问+修改es配置
1. 浏览器访问http://192.168.0.95:9100/
2. 修改es配置
现在es-head已经运行了,但是需要配置es集群才可以访问
#修改elasticsearch.yml配置文件 vim config/elasticsearch.yml #加入下面配置 http.cors.enabled: true http.cors.allow-origin: "*"
3. 重启es
systemctl restart elasticsearch
四、 遗留问题
nohup grunt server &
用该命令启动后不能关闭ssh 窗口,关闭窗口就掉了,在vmware虚拟机登录后使用该命令可以
/usr/local/node下的权限为500:500 并非root,是否有影响