打赏

Kibana安装(图文详解)(多节点的ELK集群安装在一个节点就好)

 

 

 

 

 

 

  对于Kibana ,我们知道,是Elasticsearch/Logstash/Kibana的必不可少成员。

 

 

前提:

Elasticsearch-2.4.3的下载(图文详解)

Elasticsearch-2.4.3的单节点安装(多种方式图文详解)

Elasticsearch-2.4.3的3节点安装(多种方式图文详解)

Logstash安装(图文详解)(多节点的ELK集群安装在一个节点就好)

kibana-4.6.3的下载(图文详解)

 

 

 

 

 

 第一步:上传

  注意,对于,多节点的ELK集群安装在一个节点就好。我这里以主节点,HadoopMaster。

[hadoop@HadoopMaster app]$ pwd
/home/hadoop/app
[hadoop@HadoopMaster app]$ ll
total 3096
drwxrwxr-x.  9 hadoop hadoop    4096 Feb 22 06:05 elasticsearch-2.4.3
-rw-r--r--.  1 hadoop hadoop  908862 Jan 10 11:38 elasticsearch-head-master.zip
-rw-r--r--.  1 hadoop hadoop 2228252 Jan 10 11:38 elasticsearch-kopf-master.zip
drwxr-xr-x. 10 hadoop hadoop    4096 Oct 31 17:15 hadoop-2.6.0
drwxr-xr-x. 15 hadoop hadoop    4096 Nov 14  2014 hadoop-2.6.0-src
drwxrwxr-x.  8 hadoop hadoop    4096 Nov  2 18:20 hbase-1.2.3
drwxr-xr-x.  8 hadoop hadoop    4096 Apr 11  2015 jdk1.7.0_79
drwxrwxr-x.  9 hadoop hadoop    4096 Feb 25 19:18 tomcat-7.0.73
drwxr-xr-x. 10 hadoop hadoop    4096 Nov  1 23:39 zookeeper-3.4.6
[hadoop@HadoopMaster app]$ rz

[hadoop@HadoopMaster app]$ ll
total 36432
drwxrwxr-x.  9 hadoop hadoop     4096 Feb 22 06:05 elasticsearch-2.4.3
-rw-r--r--.  1 hadoop hadoop   908862 Jan 10 11:38 elasticsearch-head-master.zip
-rw-r--r--.  1 hadoop hadoop  2228252 Jan 10 11:38 elasticsearch-kopf-master.zip
drwxr-xr-x. 10 hadoop hadoop     4096 Oct 31 17:15 hadoop-2.6.0
drwxr-xr-x. 15 hadoop hadoop     4096 Nov 14  2014 hadoop-2.6.0-src
drwxrwxr-x.  8 hadoop hadoop     4096 Nov  2 18:20 hbase-1.2.3
drwxr-xr-x.  8 hadoop hadoop     4096 Apr 11  2015 jdk1.7.0_79
-rw-r--r--.  1 hadoop hadoop 34135857 Mar 24 23:34 kibana-4.6.3-linux-x86_64.tar.gz
drwxrwxr-x.  9 hadoop hadoop     4096 Feb 25 19:18 tomcat-7.0.73
drwxr-xr-x. 10 hadoop hadoop     4096 Nov  1 23:39 zookeeper-3.4.6
[hadoop@HadoopMaster app]$ 

 

 

 

 

 

 

 

 第二步:解压

[hadoop@HadoopMaster app]$ tar -zxvf kibana-4.6.3-linux-x86_64.tar.gz 

 

 

 

 第三步:删除安装包,并修改所属组和用户

[hadoop@HadoopMaster app]$ ll
total 36436
drwxrwxr-x.  9 hadoop hadoop     4096 Feb 22 06:05 elasticsearch-2.4.3
-rw-r--r--.  1 hadoop hadoop   908862 Jan 10 11:38 elasticsearch-head-master.zip
-rw-r--r--.  1 hadoop hadoop  2228252 Jan 10 11:38 elasticsearch-kopf-master.zip
drwxr-xr-x. 10 hadoop hadoop     4096 Oct 31 17:15 hadoop-2.6.0
drwxr-xr-x. 15 hadoop hadoop     4096 Nov 14  2014 hadoop-2.6.0-src
drwxrwxr-x.  8 hadoop hadoop     4096 Nov  2 18:20 hbase-1.2.3
drwxr-xr-x.  8 hadoop hadoop     4096 Apr 11  2015 jdk1.7.0_79
drwxrwxr-x. 11 hadoop hadoop     4096 Nov  4 23:24 kibana-4.6.3-linux-x86_64
-rw-r--r--.  1 hadoop hadoop 34135857 Mar 24 23:34 kibana-4.6.3-linux-x86_64.tar.gz
drwxrwxr-x.  9 hadoop hadoop     4096 Feb 25 19:18 tomcat-7.0.73
drwxr-xr-x. 10 hadoop hadoop     4096 Nov  1 23:39 zookeeper-3.4.6
[hadoop@HadoopMaster app]$ rm kibana-4.6.3-linux-x86_64.tar.gz 
[hadoop@HadoopMaster app]$ ll
total 3100
drwxrwxr-x.  9 hadoop hadoop    4096 Feb 22 06:05 elasticsearch-2.4.3
-rw-r--r--.  1 hadoop hadoop  908862 Jan 10 11:38 elasticsearch-head-master.zip
-rw-r--r--.  1 hadoop hadoop 2228252 Jan 10 11:38 elasticsearch-kopf-master.zip
drwxr-xr-x. 10 hadoop hadoop    4096 Oct 31 17:15 hadoop-2.6.0
drwxr-xr-x. 15 hadoop hadoop    4096 Nov 14  2014 hadoop-2.6.0-src
drwxrwxr-x.  8 hadoop hadoop    4096 Nov  2 18:20 hbase-1.2.3
drwxr-xr-x.  8 hadoop hadoop    4096 Apr 11  2015 jdk1.7.0_79
drwxrwxr-x. 11 hadoop hadoop    4096 Nov  4 23:24 kibana-4.6.3-linux-x86_64
drwxrwxr-x.  9 hadoop hadoop    4096 Feb 25 19:18 tomcat-7.0.73
drwxr-xr-x. 10 hadoop hadoop    4096 Nov  1 23:39 zookeeper-3.4.6
[hadoop@HadoopMaster app]$ 

 

 

 

第四步:认识目录结构并,修改kibana.yml配置文件

 

[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ pwd
/home/hadoop/app/kibana-4.6.3-linux-x86_64
[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ ll
total 48
drwxrwxr-x.  2 hadoop hadoop 4096 Nov  4 23:24 bin
drwxrwxr-x.  2 hadoop hadoop 4096 Nov  4 23:24 config
drwxrwxr-x.  2 hadoop hadoop 4096 Nov  4 23:24 data
drwxrwxr-x.  2 hadoop hadoop 4096 Nov  4 23:24 installedPlugins
-rw-rw-r--.  1 hadoop hadoop  562 Nov  4 23:24 LICENSE.txt
drwxrwxr-x.  6 hadoop hadoop 4096 Nov  4 23:24 node
drwxrwxr-x. 83 hadoop hadoop 4096 Nov  4 23:24 node_modules
drwxrwxr-x.  3 hadoop hadoop 4096 Nov  4 23:24 optimize
-rw-rw-r--.  1 hadoop hadoop  701 Nov  4 23:24 package.json
-rw-rw-r--.  1 hadoop hadoop 2322 Nov  4 23:24 README.txt
drwxrwxr-x.  8 hadoop hadoop 4096 Nov  4 23:24 src
drwxrwxr-x.  2 hadoop hadoop 4096 Nov  4 23:24 webpackShims
[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ cd config/
[hadoop@HadoopMaster config]$ ll
total 4
-rw-rw-r--. 1 hadoop hadoop 3200 Nov  4 23:24 kibana.yml
[hadoop@HadoopMaster config]$ vim kibana.yml 

 

   更多,请见

kibana.yml(中文配置详解)

 

 

   很多其实,我们不需改,只是Kibana需要与ElasticSearch结合,需要更改如下地方:

 

   最后得到,

 

server.host: "192.168.80.10"        
server.port: 5601
elasticsearch.url: "http://192.168.80.10:9200"
kibana.index: ".kibana"


对于server.host,最好别0.0.0.0,不安全。不建议

 

 

 

 

 

 

 

 

 

第五步:在Kibana里,安装marvel插件

 

[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ bin/kibana plugin --install elasticsearch/marvel/latest

   在这里,需要一段较长时间,如果在线安装不了的话,就选择离线方式来安装吧。

 

  在这一步,我遇到了如下问题。

 

   具体怎么做,请见

ELK(Elasticsearch/Logstash/Kibana)安装时常见错误总结

   的问题九。

   说明的是,每次最新稳定版本,是变化的。所以若用离线来安装的话,则先复制那个网址下载就好。

 

 

  查看Kibana里是否安装marverl插件成功!

[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ pwd
/home/hadoop/app/kibana-4.6.3-linux-x86_64
[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ ll
total 48
drwxrwxr-x.  2 hadoop hadoop 4096 Nov  4 23:24 bin
drwxrwxr-x.  2 hadoop hadoop 4096 Mar 25 07:55 config
drwxrwxr-x.  2 hadoop hadoop 4096 Nov  4 23:24 data
drwxrwxr-x.  3 hadoop hadoop 4096 Mar 25 18:49 installedPlugins
-rw-rw-r--.  1 hadoop hadoop  562 Nov  4 23:24 LICENSE.txt
drwxrwxr-x.  6 hadoop hadoop 4096 Nov  4 23:24 node
drwxrwxr-x. 83 hadoop hadoop 4096 Nov  4 23:24 node_modules
drwxrwxr-x.  3 hadoop hadoop 4096 Nov  4 23:24 optimize
-rw-rw-r--.  1 hadoop hadoop  701 Nov  4 23:24 package.json
-rw-rw-r--.  1 hadoop hadoop 2322 Nov  4 23:24 README.txt
drwxrwxr-x.  8 hadoop hadoop 4096 Nov  4 23:24 src
drwxrwxr-x.  2 hadoop hadoop 4096 Nov  4 23:24 webpackShims
[hadoop@HadoopMaster kibana-4.6.3-linux-x86_64]$ cd installedPlugins/
[hadoop@HadoopMaster installedPlugins]$ ll
total 4
drwxrwxr-x. 6 hadoop hadoop 4096 Mar 25 18:49 marvel
[hadoop@HadoopMaster installedPlugins]$ cd marvel/
[hadoop@HadoopMaster marvel]$ ll
total 88
-rw-rw-r--.   1 hadoop hadoop  2366 Dec 21 10:26 index.js
-rw-rw-r--.   1 hadoop hadoop 43681 Dec 21 10:26 LICENSE.txt
drwxrwxr-x. 486 hadoop hadoop 20480 Mar 25 18:48 node_modules
-rw-rw-r--.   1 hadoop hadoop   150 Dec 21 10:26 NOTICE.txt
-rw-rw-r--.   1 hadoop hadoop  1410 Jan  6 07:41 package.json
drwxrwxr-x.   8 hadoop hadoop  4096 Mar 25 18:48 public
drwxrwxr-x.   4 hadoop hadoop  4096 Mar 25 18:48 server
drwxrwxr-x.   2 hadoop hadoop  4096 Mar 25 18:48 webpackShims
[hadoop@HadoopMaster marvel]$ 

 

 

 

 

 

 

第六步:启动Kibana

  在启动之前,先启动Elasticsearch,请移步

Elasticsearch-2.4.3的3节点安装(多种方式图文详解)

 

[hadoop@HadoopMaster elasticsearch-2.4.3]$ pwd
/home/hadoop/app/elasticsearch-2.4.3
[hadoop@HadoopMaster elasticsearch-2.4.3]$ jps
2083 Jps
[hadoop@HadoopMaster elasticsearch-2.4.3]$ bin/elasticsearch -d
[hadoop@HadoopMaster elasticsearch-2.4.3]$ jps
2117 Jps
2104 Elasticsearch
[hadoop@HadoopMaster elasticsearch-2.4.3]$

 

 其实啊,或者通过es的这种后台来启动也是可以的。

  这里,我们可以使用bin/elasticsearch -help来查知怎么使用。

bin/elasticsearch  -d  -p /home/hadoop/data/elasticsearch-2.4.3/pid

 

 

[hadoop@HadoopSlave1 elasticsearch-2.4.3]$ jps
1900 Jps
[hadoop@HadoopSlave1 elasticsearch-2.4.3]$ bin/elasticsearch -d
[hadoop@HadoopSlave1 elasticsearch-2.4.3]$ jps
1991 Jps
1921 Elasticsearch
[hadoop@HadoopSlave1 elasticsearch-2.4.3]$ 

 

 其实啊,或者通过es的这种后台来启动也是可以的。

  这里,我们可以使用bin/elasticsearch -help来查知怎么使用。

bin/elasticsearch  -d  -p /home/hadoop/data/elasticsearch-2.4.3/pid

 

 

[hadoop@HadoopSlave2 elasticsearch-2.4.3]$ pwd
/home/hadoop/app/elasticsearch-2.4.3
[hadoop@HadoopSlave2 elasticsearch-2.4.3]$ jps
1908 Jps
[hadoop@HadoopSlave2 elasticsearch-2.4.3]$ bin/elasticsearch -d
[hadoop@HadoopSlave2 elasticsearch-2.4.3]$ jps
1929 Elasticsearch
1997 Jps
[hadoop@HadoopSlave2 elasticsearch-2.4.3]$ 

 

 

 其实啊,或者通过es的这种后台来启动也是可以的。

  这里,我们可以使用bin/elasticsearch -help来查知怎么使用。

bin/elasticsearch  -d  -p /home/hadoop/data/elasticsearch-2.4.3/pid

 

 

 

 

 

 

 

   Kibana 启动

1.前台启动

  bin/kibana

2.后台启动

  nohup /home/ybxiang/kibana/kibana-4.5.1-linux-x64/bin/kibana & exit

   为了更好的演示给大家,我这另开一窗口,来特意启动Kibana进程。

 

注意:

  启动kibana时一直卡在[listening] Server running at http://0.0.0.0:5601,界面打开什么都没有,出现

No Marvel Data Found (marvel error)

[error][status][plugin:elasticsearch@1.0.0] Status changed from red to red - Service Unavailable?

[error][status][plugin:elasticsearch@1.0.0] Status changed from red to red - Elasticsearch is still initializing the kibana index.

 

   解决办法,请移步

ELK(Elasticsearch/Logstash/Kibana)安装时常见错误总结

  的问题十。

 

 

  然后,得到:

 

  更详细的,一般在Kibana里安装插件marverl,之后的浏览界面,如下:

ElasticSearch、Kibana 启动(含前台和后台启动)

 

 

 

 

 

 

 

 

  因为之前啊,我们搭建过Logstash,所以。可以直接用了。这里很简单,不多赘述。

Logstash安装(图文详解)(多节点的ELK集群安装在一个节点就好)

 

 

  继续更新!

 

 

 

posted @ 2017-03-25 00:03  大数据和AI躺过的坑  阅读(8918)  评论(0编辑  收藏  举报