Install Kibana with Docker

  1. 拉取镜像
    docker pull docker.elastic.co/kibana/kibana:7.12.0

  2. 运行并添加容器后台运行,指定Elasticsearch地址为http://localhost:9200
    docker run --name kib01 -d -p 5601:5601 -e "ELASTICSEARCH_HOSTS=http://localhost:9200" docker.elastic.co/kibana/kibana:7.12.0

  3. 设置连接Elasticsearch的用户名和密码

进入容器
docker exec -it kib01 /bin/bash
编辑配置文件
vi config/kibana.yml
添加内容

elasticsearch.username: kibana_system

From the directory where you installed Kibana, run the following commands to create the Kibana keystore and add the secure settings:

Create the Kibana keystore:

./bin/kibana-keystore create

Add the password for the kibana_system user to the Kibana keystore:

./bin/kibana-keystore add elasticsearch.password

When prompted, enter the password for the kibana_system user.
4. 重启容器
docker restart kib01

参考链接:

posted @ 2023-03-31 23:52  慧☆星  阅读(18)  评论(0编辑  收藏  举报