Linux上Elasticsearch5版本集群管理工具head安装

来源:互联网 发布:淘宝抠图兼职 编辑:程序博客网 时间:2024/06/05 02:06

原文地址:http://blog.csdn.net/qq942477618/article/details/53637817

1、下载head插件源码

https://github.com/mobz/elasticsearch-head


由于elasticsearch5.0版本变化较大,目前elasticsearch5.0 暂时不支持直接安装,但是head作者提供了另一种安装方法。



2、下载nodejs

nodejs官网下载地址https://nodejs.org/dist/

 

wget https://nodejs.org/dist/v6.9.2/node-v6.9.2-linux-x64.tar.xz

 

3、配置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 –v
v6.9.2
# npm –v
3.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',

QQ图片20161214113021

5、elasticsearch配置允许跨域访问

修改elasticsearch配置文件elasticsearch.yml

http.cors.enabled: true
http.cors.allow-origin: "*"

 

6、重启elasticsearch,并启动node

cd elasticsearch-head
node_modules/grunt/bin/grunt server

 

image

 

访问http://192.168.62.200:9100

image



原创粉丝点击