CentOS安装Kibana

一、下载

下载地址: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
image-20200329013431337.png
image-20200329013903827.png
指定配置文件启动

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
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • pyspark.sql模块 模块上下文 Spark SQL和DataFrames的重要类: pyspark.sql...
    mpro阅读 9,932评论 0 13
  • 阅读目录: 1. ELK Stack 简介 2. 环境准备 3. 安装 Elasticsearch 4. 安装 K...
    foveni阅读 1,334评论 0 3
  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc阅读 2,996评论 0 0
  • 真心觉得自己所感受到这个社会上真实的亲情都是基于将心比心的掂量,不仅子女父母心中都有各自的考量,互相都要做出反应的...
    d6c652c0a0ff阅读 187评论 0 11
  • 七月中旬的时候,邱邱打来电话问我什么时候到家,赶在婚礼前一起聚聚先。我说红包倒是一早备好了,就是假不好请,行程也定...
    汀甘棠阅读 584评论 1 6

友情链接更多精彩内容