xiayu 发表于 2019-1-29 12:08:02

elasticsearch5 版本集群管理工具head安装

  1、下载head插件源码
  https://github.com/mobz/elasticsearch-head
  2、下载nodejs
  nodejs官网下载地址https://nodejs.org/dist/
wget https://nodejs.org/dist/v6.9.2/node-v6.9.2-linux-x64.tar.xz3、配置node环境变量
xz –d node-v6.9.2-linux-x64.tar.xz
tar –xvf node-v6.9.2-linux-x64.tar
mv node-v6.9.2-linux-x64 /data/PRG/node
vim /etc/profile
export NODE_HOME=/data/PRG/node
export PATH=$PATH:$NODE_HOME/bin
source /etc/profile
# node –vv6.9.2
# npm –v3.10.9  4、安装grunt
  如果生产环境无法联网在线安装grunt,可以找一台能联网的主机配置好node,安装好grunt后将elasticsearch-head目录下的node_models打包上传
cd elasticsearch-head
npm install -g grunt --registry=https://registry.npm.taobao.org  
  修改head目录下的Gruntfile.js配置,head默认监听127.0.0.1
  # vim Gruntfile.js
  hostname: '0.0.0.0',
http://s3.运维网.com/wyfs02/M02/8B/8B/wKiom1hQ1OqzVJsaAAAgHT7_DeY867.png
  5、elasticsearch配置允许跨域访问
  修改elasticsearch配置文件elasticsearch.yml
http.cors.enabled: true

http.cors.allow-origin: "*"  6、重启elasticsearch,并启动node
cd elasticsearch-head

node_modules/grunt/bin/grunt serverhttp://s3.运维网.com/wyfs02/M02/8B/88/wKioL1hQ1OvA4mOKAAAovKYYLcY389.png
  访问http://192.168.62.200:9100
http://s3.运维网.com/wyfs02/M00/8B/88/wKioL1hQ1OyDmtADAABJ62j1ucQ332.png
安装资源
百度云盘http://pan.baidu.com/s/1skT4zCx
  




页: [1]
查看完整版本: elasticsearch5 版本集群管理工具head安装