1.安装node
es-head需要nodejs环境
https://nodejs.org/en/download/
链接:https://pan.baidu.com/s/1IN5Byik3zbZ8pHEHujRvgg
提取码:ybto
tar -xvJf node-v16.13.1-linux-x64.tar.xz
配置
vim /etc/profile
export NODE_HOME=/usr/local/node/node-v16.13.1-linux-x64
export PATH=$PATH:$NODE_HOME/bin
source /etc/profile
node -v
2.下载 Head插件
git clone git://github.com/mobz/elasticsearch-head.git
3.安装grunt
启动head需要grunt
在安装之前修改下npm源,默认是海外的速度慢,修改成淘宝的
npm config get registry
npm config set registry https://registry.npm.taobao.org
忽略phantomjs-prebuilt@2.1.16
npm install phantomjs-prebuilt@2.1.16 --ignore-scripts
4. 启动head
npm run start
nohup npm run start(后台启动)
浏览器访问
http://192.168.192.128:9100/
elasticsearch服务与elasticsearch-head之间可能存在跨越,修改elasticsearch.yzm配置添加内容
http.cors.enabled: true
http.cors.allow-origin: "*"
启动es