ELK5.0 (Elasticsearch Logstash Kibana) head插件安装
2017-01-11 11:25
671 查看
安装完ELK之后想装一个head管理插件
发现ELK5.0+的版本 head插件无法在elasticsearch中直接安装了 需要自行下载安装
环境:
centOS 6.8
jdk1.8
Elasticsearch 5.0
Logstash 5.0
Kibana 5.0
1.去github下载代码,先要安装git
[root@linux1 ~]# yum -y install git
2.下载head
[root@linux1 ~]# git clone git://github.com/mobz/elasticsearch-head.git
[root@linux1 ~]# mv elasticsearch-head /usr/local/elasticsearch
3.下载安装nodejs、npm
下载
[root@linux1 ~]# wgethttps://nodejs.org/dist/v4.2.2/node-v4.2.2-linux-x64.tar.gz
解压
[root@linux1 ~]# tar -zxvf node-v4.2.2-linux-x64.tar.gz
[root@linux1 ~]# mv node-v4.2.2-linux-x64 /usr/local/
设置软链接
[root@linux1 ~]# ln -s /usr/local/node-v4.2.2-linux-x64/bin/node /usr/sbin/node
[root@linux1 ~]# ln -s /usr/local/node-v4.2.2-linux-x64/bin/npm /usr/sbin/npm
设置npm代理镜像
[root@linux1 ~]# npm config set registry https://registry.npm.taobao.org
[root@linux1 ~]# npm info underscore (如果上面配置正确这个命令会有字符串response)
4.安装grunt
[root@linux1 ~]# npm install -g grunt
设置软链接
[root@linux1 ~]# ln -s /usr/local/node-v4.2.2-linux-x64/lib/node_modules/grunt/bin/grunt /usr/sbin/grunt
5.安装head
进入head目录下
[root@linux1 ~]# cd /usr/local/elasticsearch/elasticsearch-head
[root@linux1 elasticsearch-head]# npm install
6.配置head
[root@linux1 elasticsearch-head]# vi _site/app.js
找到
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";
localhost改为对应的elasticsearch的ip
[root@linux1 elasticsearch-head]# vi Gruntfile.js
找到connect下的options,添加
connect: {
server: {
options: {
hostname: "0.0.0.0",
port: 9100,
base: '.',
keepalive: true
}
}
}
7.修改elasticsearch配置
[root@linux1 elasticsearch]# vi elasticsearch.yml
在network下加入
http.host: 192.168.1.120
http.cors.enabled: true
http.cors.allow-origin: "*"
8.启动grunt
[root@linux1 elasticsearch]#cd elasticsearch-head
[root@linux1 elasticsearch-head]#grunt server &
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100
然后用浏览器打开http://192.168.1.120:9100
成功打开 并且成功连接
发现ELK5.0+的版本 head插件无法在elasticsearch中直接安装了 需要自行下载安装
环境:
centOS 6.8
jdk1.8
Elasticsearch 5.0
Logstash 5.0
Kibana 5.0
1.去github下载代码,先要安装git
[root@linux1 ~]# yum -y install git
2.下载head
[root@linux1 ~]# git clone git://github.com/mobz/elasticsearch-head.git
[root@linux1 ~]# mv elasticsearch-head /usr/local/elasticsearch
3.下载安装nodejs、npm
下载
[root@linux1 ~]# wgethttps://nodejs.org/dist/v4.2.2/node-v4.2.2-linux-x64.tar.gz
解压
[root@linux1 ~]# tar -zxvf node-v4.2.2-linux-x64.tar.gz
[root@linux1 ~]# mv node-v4.2.2-linux-x64 /usr/local/
设置软链接
[root@linux1 ~]# ln -s /usr/local/node-v4.2.2-linux-x64/bin/node /usr/sbin/node
[root@linux1 ~]# ln -s /usr/local/node-v4.2.2-linux-x64/bin/npm /usr/sbin/npm
设置npm代理镜像
[root@linux1 ~]# npm config set registry https://registry.npm.taobao.org
[root@linux1 ~]# npm info underscore (如果上面配置正确这个命令会有字符串response)
4.安装grunt
[root@linux1 ~]# npm install -g grunt
设置软链接
[root@linux1 ~]# ln -s /usr/local/node-v4.2.2-linux-x64/lib/node_modules/grunt/bin/grunt /usr/sbin/grunt
5.安装head
进入head目录下
[root@linux1 ~]# cd /usr/local/elasticsearch/elasticsearch-head
[root@linux1 elasticsearch-head]# npm install
6.配置head
[root@linux1 elasticsearch-head]# vi _site/app.js
找到
this.base_uri = this.config.base_uri || this.prefs.get("app-base_uri") || "http://localhost:9200";
localhost改为对应的elasticsearch的ip
[root@linux1 elasticsearch-head]# vi Gruntfile.js
找到connect下的options,添加
connect: {
server: {
options: {
hostname: "0.0.0.0",
port: 9100,
base: '.',
keepalive: true
}
}
}
7.修改elasticsearch配置
[root@linux1 elasticsearch]# vi elasticsearch.yml
在network下加入
http.host: 192.168.1.120
http.cors.enabled: true
http.cors.allow-origin: "*"
8.启动grunt
[root@linux1 elasticsearch]#cd elasticsearch-head
[root@linux1 elasticsearch-head]#grunt server &
Running "connect:server" (connect) task
Waiting forever...
Started connect web server on http://localhost:9100
然后用浏览器打开http://192.168.1.120:9100
成功打开 并且成功连接
相关文章推荐
- elasticsearch5.0集群+kibana5.0+head插件插件的安装
- elasticsearch5.x 集群管理工具head插件安装、nginx配置外网访问
- elasticsearch入门指南(二)elasticsearch-head插件的安装
- ELK5.0 (Elasticsearch Logstash Kibana) 初学搭建部署
- Elasticserach6.x之Head插件安装-yellowcong
- 19-linux下ElasticSearch.6.2.1与head、Kibana、X-Pack、SQL、IK、PINYIN插件的配置安装
- elasticsearch的一次体验——3.安装插件(head、kibana)
- 【参考】cents ElasticSearch 5.0及head插件安装 参考配置
- Windows下安装elasticSearch5.6.3和head插件
- RHEL7.3(Redhat) 安装配置 ElasticSearch5.5.1、ElasticHead、kibana5.5.1、X-Pack
- 20-linux下ElasticSearch.6.2.2集群安装与head、Kibana、X-Pack..插件的配置安装
- elasticsearch5.0及head插件安装
- elasticsearch5 在windows下head插件的安装
- Elasticsearch之—— 5.X head插件安装实例
- elasticseartch5.6.3安装head插件
- 14-win10下ElasticSearch.6.1.0与head、Kibana、X-Pack、SQL、IK、PINYIN插件的配置安装
- elasticsearch5.5.X 的head插件安装(没成功……按kibana和x-pack去了)
- elasticsearch5.4.2安装以及插件head的安装过程
- elasticsearch5.4.2安装以及插件head的安装过程
- Elasticsearch5 及 head插件 安装说明