我是靠谱客的博主 眼睛大发卡,这篇文章主要介绍CentOS 7.X 下安装ElasticSearch-Head插件,现在分享给大家,希望可以做个参考。

一、安装nodejs和rpm

复制代码
1
2
3
4
1. su - root 2. yum install epel-release 3. yum install nodejs npm

二、下载并安装elasticsearch-head

复制代码
1
2
3
4
5
6
1. git clone https://github.com/mobz/elasticsearch-head.git 2. cd elasticsearch-head 3. npm install 4. npm run start 5. open http://localhost:9100 or http://you IP Address:9100

三、安装elasticsearch,修改elasticsearch参数,以便于head插件访问es

复制代码
1
2
3
4
5
6
7
8
9
1. 在elasticsearch下的elasticsearch.yml下新增一下两行: http.cors.enabled: true http.cors.allow-origin: "*" 2. 重启elastsearch systemctl restart elasticsearch.service 或者 cd /es ./bin/elasticsearch

四、修改es-head的localhost地址

复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
1. cd ./elasticsearch-head #(elasticsearch-head源码文件夹) 2. vim Gruntfile.js 3. Add hostname connect: { server: { options: { hostname: '0.0.0.0', port: 9100, base: '.', keepalive: true } } }

五、修改head的连接地址

复制代码
1
2
3
4
5
6
1. cd ./elasticsearch-head #(elasticsearch-head源码文件夹) 2. vim ./_site/app.js 3. 将localhost修改为ESdeIP地址 修改前:this.base_uri = this.config.base_uri; 修改后: this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://you ip address:9200";

六、启动elasticsearch-head

复制代码
1
2
3
1. cd elasticsearch-head(elasticsearch-head源码目录) 2. ./node_modules/grunt/bin/grunt server

最后

以上就是眼睛大发卡最近收集整理的关于CentOS 7.X 下安装ElasticSearch-Head插件的全部内容,更多相关CentOS内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(77)

评论列表共有 0 条评论

立即
投稿
返回
顶部