elasticsearch5.5.X 的head插件安装(没成功……按kibana和x-pack去了)

借鉴:原文  (在基础上改正,添加报错解决办法)

下载elasticsearch-head

下载地址:https://github.com/mobz/elasticsearch-head,下载后解压缩。

一、安装nodejs
curl -sL -o /etc/yum.repos.d/khara-nodejs.repo https://copr.fedoraproject.org/coprs/khara/nodejs/repo/epel-7/khara-nodejs-epel-7.repo


yum install -y nodejs nodejs-npm

再执行如下命令:

node -v

npm -v

结果:

[root@iZuf6g56n6ff2af11jmkfeZ plugins]# node -v
v6.12.2
[root@iZuf6g56n6ff2af11jmkfeZ plugins]# npm -v
5.6.0


二、安装grunt 
npm install  -g  grunt-cli
npm install grunt

grunt -version

版本查看结果:

[root@iZuf6g56n6ff2af11jmkfeZ plugins]# grunt -version
grunt-cli v1.2.0
grunt v1.0.1

补充报错解决办法:npm: relocation error: npm: symbol SSL_set_cert_cb, version libssl.so.10 not defined in file libssl.

1、关闭npm的https

npm config set strict-sslfalse

2、设置npm的获取地址

npm config set registry "http://registry.npmjs.org/"

三、npm安装依赖

elasticsearch-head-master目录下,运行命令:

npm install

如果速度较慢或者安装失败,可以使用国内镜像:

 npm install -g cnpm --registry=https://registry.npm.taobao.org

四、修改Elasticsearch配置文件

编辑elasticsearch-5.1.1/config/elasticsearch.yml,加入以下内容:

http.cors.enabled: true

http.cors.allow-origin: "*"

五、修改Gruntfile.js

打开elasticsearch-head-master/Gruntfile.js,找到下面connect属性,新增hostname: '0.0.0.0’'

connect: {

        server: {

            options: {

                hostname: '0.0.0.0',

                port: 9100,

                base: '.',

                keepalive: true

            }

        }

    }   

六、启动elasticsearch-head

elasticsearch-head-master/目录下,运行启动命令:

grunt server

访问http://192.168.1.124:9100/

七、后台启动elasticsearch-head

后台启动grunt server命令;

nohup grunt server &exit

如果想关闭head插件,使用Linux查找进程命令:

ps aux|grep head

结束进程:

kill进程号


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

多来哈米

还可以打赏???来试一毛

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值