Elasticsearch5.5 部署Head插件

Elasticsearch5.5 部署Head插件

第一种方法 git下载软件包

1、yum -y install git
git clone git://github.com/mobz/elasticsearch-head.git
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://192.168.1.57:9200";
把localhost修改成ES的服务器地址,如上面192.168.1.57

7启动插件
 cd  /usr/local/elasticsearch-head/node_modules/grunt/bin/
./grunt server

浏览器访问 http://192.168.1.57:9100/

第二种简单快捷 安装谷歌浏览器插件

猜你喜欢

转载自blog.csdn.net/chenjiale0102/article/details/78615009
今日推荐