1.下载安装
概述:Kibana是一个针对Elasticsearch的开源分析及可视化平台,用来搜索、查看交互存储在Elasticsearch索引中的数据。使用Kibana,可以通过各种图表进行高级数据分析及展示。
解压到指定目录:
tar -xzvf kibana-8.1.0-linux-x86_64.tar.gz -C /opt/module/
2.Kibana生成证书文件
在es服务器中生成证书、直接回车
cd /opt/module/elasticsearch-8.1.0/
bin/elasticsearch-certutil csr -name kibana -dns linux001
生成的证书:
解压文件 :
unzip csr-bundle.zip
移动解压后的文件到kibana的config目录中 :
cd /opt/module/elasticsearch-8.1.0/kibana/
mv kibana.csr kibana.key /opt/module/kibana-8.1.0/config/
生成crt文件:
openssl x509 -req -in kibana.csr -signkey kibana.key -out kibana.crt
3.修改配置文件kibana.yml
#服务器端口
server.port: 5601
#服务器主机名
server.host: "linux001"
#国际华-中文
il8n.locale: "zh-CN"
#Es服务器地址
elasticsearch.hosts: ["https://linux001:9200"]
#访问es服务器账号密码
elasticsearch.username: "kibana"
elasticsearch.password: "kibana"
elasticsearch.ssl.verificationMode: none
elasticsearch.ssl.certificateAuthorities: ["/opt/module/elasticsearch-8.1.0/config/certs/elasticsearch-ca.pem"]
server.ssl.enabled: true
server.ssl.certificate: /opt/module/kibana-8.1.0/config/kibana.crt
server.ssl.key: /opt/module/kibana-8.1.0/config/kibana.key
4.修改软件目录拥有者(如果是其他用户安装、这步可忽略)
chown -R es:es /opt/module/kibana-8.1.0/
5.切换用户、启动软件
切换用户:
su es
启动软件:
bin/kibana
后台启动:
[usera@linux001 logs]$ nohup /opt/module/kibana-8.1.0/bin/kibana > kibana.log 2>&1 &
使用es的用户名和密码访问 :
报错:unable to authenticate user [kibana] for REST request [/_nodes?filter_path=nodes.*.version%2Cnodes.*
处理:
# elasticsearch-reset-password -u kibana -i
warning: ignoring JAVA_HOME=/app/elasticsearch/jdk; using bundled JDK
This tool will reset the password of the [kibana_system] user.
You will be prompted to enter the password.
Please confirm that you would like to continue [y/N]y
Enter password for [kibana_system]: kibana
Re-enter password for [kibana_system]: kibana
Password for the [kibana_system] user successfully reset.