一、环境准备
版本:Elasticsearch:7.6.2 、Kibana:7.6.2
#开启防火墙
firewall-cmd --zone=public --add-port=9200/tcp --permanent
systemctl restart firewalld.service
mkdir -p /home/kibana/config
编写配置文件:
# kibana.yml
# Kibana is served by a back end server. This setting specifies the port to use.
# 服务端口号
server.port: 5601
# Specifies the address to which the Kibana server will bind. IP addresses and host names are both valid values.
# The default is 'localhost', which usually means remote machines will not be able to connect.
# To allow connections from remote users, set this parameter to a non-loopback address.
#服务器主机
server.host: '0.0.0.0'
# The Kibana server's name. This is used for display purposes.
server.name: 'my-kibana'
# The URL of the Elasticsearch instance to use for all your queries.
# 配置ES服务器地址
elasticsearch.hosts: ['http://192.168.198.241:9200']
二、启动容器
docker pull kibana:7.6.2
docker run -d --name kibana --privileged=true -p 5601:5601 -v/home/kibana/config/kibana.yml:/usr/share/kibana/config/kibana.yml kibana:7.6.2
三、使用
访问:http://192.168.198.241:5601/