一、下载
下载地址:https://www.elastic.co/downloads/kibana
历史版本:https://www.elastic.co/downloads/past-releases#kibana
如果机器可以访问外网,也可以直接wget下载
shell> wget wget https://artifacts.elastic.co/downloads/kibana/kibana-5.6.4-linux-x86_64.tar.gz
关于版本的选择,可以查看官方文档Elasticsearch与Kibana的兼容性:https://www.elastic.co/support/matrix#matrix_compatibility
另外,官网还有一段描述:
Kibana should be configured to run against an Elasticsearch node of the same version. This is the officially supported configuration.Running different major version releases of Kibana and Elasticsearch (e.g. Kibana 5.x and Elasticsearch 2.x) is not supported, nor is running a minor version of Kibana that is newer than the version of Elasticsearch (e.g. Kibana 5.1 and Elasticsearch 5.0).
Running a minor version of Elasticsearch that is higher than Kibana will generally work in order to faciliate an upgrade process where Elasticsearch is upgraded first (e.g. Kibana 5.0 and Elasticsearch 5.1). In this configuration, a warning will be logged on Kibana server startup, so it’s only meant to be temporary until Kibana is upgraded to the same version as Elasticsearch.
Running different patch version releases of Kibana and Elasticsearch (e.g. Kibana 5.0.0 and Elasticsearch 5.0.1) is generally supported, though we encourage users to run the same versions of Kibana and Elasticsearch down to the patch version.
总之,建议大家安装时选择完全一致的版本号,这样就一定不会有问题
二、安装
解压
shell> tar -zxvf kibana-5.6.4-linux-x86_64.tar.gz -C /usr/local/
配置
shell> cd /usr/local/kibana-5.6.4-linux-x86_64/config/
shell> vim kibana.yml
编辑以下内容
# 默认值5601,没有需要可以不修改
server.port: 5601
# 允许远程访问,也可以直接设置为“0.0.0.0”
server.host: "192.168.1.10"
# 默认值http://localhost:9200
elasticsearch.url: "http://192.168.1.10:9200"
三、启动
shell> cd /usr/local/kibana-5.6.4-linux-x86_64/
shell> ./bin/kibana
指定配置文件启动
Kibana 默认情况下从 $KIBANA_HOME/config/kibana.yml
加载配置文件,也可以通过-c
或--config
选项指定配置文件
shell> ./bin/kibana -c /path/to/config/kibana.yml
后台启动
shell> nohup ./bin/kibana >/dev/null 2>&1 &
但是通过上面的命令启动会有个问题,如果想停止kibana会找不到进程
shell> ps aux|grep kibana
root 5566 0.0 0.0 112712 968 pts/0 S+ 02:25 0:00 grep --color=auto kibana
shell> ps -ef|grep kibana
root 5615 1856 0 02:25 pts/0 00:00:00 grep --color=auto kibana
可以通过如下几种方式找到进程并杀死
lsof -i:5601
shell> lsof -i:5601
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
node 6030 root 9u IPv4 49052 0t0 TCP *:esmagent (LISTEN)
node 6030 root 11u IPv4 50383 0t0 TCP VM_2_24_centos:esmagent->111.196.219.22:65303 (ESTABLISHED)
node 6030 root 12u IPv4 50384 0t0 TCP VM_2_24_centos:esmagent->111.196.219.22:65304 (ESTABLISHED)
node 6030 root 13u IPv4 50390 0t0 TCP VM_2_24_centos:esmagent->111.196.219.22:65306 (ESTABLISHED)
node 6030 root 14u IPv4 50399 0t0 TCP VM_2_24_centos:esmagent->111.196.219.22:65309 (ESTABLISHED)
node 6030 root 15u IPv4 50401 0t0 TCP VM_2_24_centos:esmagent->111.196.219.22:65310 (ESTABLISHED)
node 6030 root 16u IPv4 50392 0t0 TCP VM_2_24_centos:esmagent->111.196.219.22:65307 (ESTABLISHED)
netstat -tunlp|grep 5601
shell> netstat -tunlp|grep 5601
tcp 0 0 0.0.0.0:5601 0.0.0.0:* LISTEN 6030/./bin/../node/
fuser -n tcp 5601
shell> fuser -n tcp 5601
5601/tcp: 6030
找到PID后,杀掉进程即可停止kibana
shell> kill -9 6030
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。