Elasticsearch5.5 部署Head插件

本文介绍如何在Elasticsearch5.5上部署Head插件,包括使用git下载软件包、安装Node.js及Grunt、配置Elasticsearch及Head插件等步骤,并涉及x-pack安全模块配置。

Elasticsearch5.5 部署Head插件

1、git下载软件包

yum -y install git
git clone git://github.com/mobz/elasticsearch-head.git

备注:安装包不要放到elasticsearch/plugins目录下

 

2、node安装

http://www.cnblogs.com/shhnwangjian/p/6559732.html

 

3、安装grunt

npm install -g grunt-cli

 

4、修改Elasticsearch配置文件

/etc/elasticsearch/elasticsearch.yml

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

 

5、修改Gruntfile.js

elasticsearch-head/Gruntfile.js

                connect: {
                        server: {
                                options: {
                                        hostname: '0.0.0.0',
                                        port: 9100,
                                        base: '.',
                                        keepalive: true
                                }
                        }
                }

增加hostname属性,设置为0.0.0.0

 

6、修改app.js

elasticsearch-head/_site/app.js

this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://10.10.83.163:9200";

把localhost修改成ES的服务器地址,如上面10.10.83.163

 

7、运行head

进入elasticsearch-head 目录

npm install 

启动

grunt server

页面访问:http://10.10.83.163:9100

 

8、后台启动elasticsearch-head

nohup grunt server &

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

ps aux|grep head

 

x-pack安全模块(security机制)

1、修改Elasticsearch配置文件

/etc/elasticsearch/elasticsearch.yml

http.cors.allow-headers: Authorization

 

2、页面访问

http://10.10.83.163:9100/?auth_user=elastic&auth_password=changeme

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值