Mac本地docker安装Kibana+ElasticSearch

Kibana是ElasticSearch协同的经典工具,这里尝试在Mac以Docker快速搭建Kibana+ElasticSearch,相关指令同样适用于其他linux平台。

假设Docker已安装,详细安装过程参考如下链接。

https://docs.docker.com/desktop/setup/install/mac-install/

Docker若不能正常pull,可能需要修改配置,详细过程参考如下链接。

https://blog.csdn.net/liliang199/article/details/150279652

1 ES安装

1.1 ES镜像

获取ES wolfi镜像

如果要使用wolfi,docker容器启动时增加-wolfi

docker pull docker.elastic.co/elasticsearch/elasticsearch-wolfi:9.1.3

为ES和Kibana创建docker网络

docker network create elastic

获取ES镜像

docker pull docker.elastic.co/elasticsearch/elasticsearch:9.1.3

1.2 ES启动

启动ES容器

docker run --name es01 --net elastic -p 9200:9200 -it -m 1GB docker.elastic.co/elasticsearch/elasticsearch:9.1.3

生成ES用户elastic的登录密码和enrollment tokens

docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic

docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana

2 Kibana安装

2.1 kibana安装

获取Kibana镜像

docker pull docker.elastic.co/kibana/kibana:9.1.3

启动Kibana容器

docker run --name kib01 --net elastic -p 5601:5601 docker.elastic.co/kibana/kibana:9.1.3

启动后,会提示登录http://localhost:5601/

2 Kibana登录

用户名是elastic,密码是之前生成的密码,enrollment tokens之前为kibana生成的tokens。

另外,可以为kibana重新生成登录tokens

docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -s kibana

也可以重新为elastic生成密码

docker exec -it es01 /usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic

成功登录后,界面如下

2.3 镜像删除

删除命令如下所示。

Remove the Elastic network

docker network rm elastic

Remove the Elasticsearch container

docker rm es01

Remove the Kibana container

docker rm kib01

reference


Install Kibana with Docker

https://www.elastic.co/docs/deploy-manage/deploy/self-managed/install-kibana-with-docker

Mac M1探索AnythingLLM + Docker SearXNG

https://blog.csdn.net/liliang199/article/details/150279652

docker install docshttps://docs.docker.com/desktop/setup/install/mac-install/

相关推荐
zoutao981 小时前
Gitea Actions 自定义 Runner 镜像与自动化部署实战
ci/cd·docker·gitea
小马同学-3 小时前
nerdctl实战:Docker风格的Containerd操作利器
docker·容器·containerd
九皇叔叔4 小时前
Kubernetes 命令式对象配置详解:使用 YAML 管理 Kubernetes 资源
docker·容器·k8s
CVer儿5 小时前
docker内llama.cpp和TRT-LLM win11本机部署qwen3.8
docker
萤火夜5 小时前
Docker(四) Docker介绍
docker·容器
.冰块.6 小时前
Docker 镜像深度学习:分层 Copy‑on‑Write、Dockerfile 语法、Harbor 私有仓库实操
docker·容器·harbor·镜像·dockerfile·images
szephyr6 小时前
Docker 镜像瘦身实战:从 1.2GB 压到 85MB 的完整过程
docker·容器·部署·多阶段构建·镜像优化
Elasticsearch6 小时前
没有小到无法记录的日志文件:Elastic Agent 如何跟踪低于 1 KiB 阈值的文件
elasticsearch
Liekkas Kono8 小时前
macOS 27 安装 VMware Fusion 和 Win11 经验
macos·win11·vmware
溪语流沙8 小时前
Django + Vue电商项目第001讲:开篇|注册登录加增删改查,那不是电商
redis·python·mysql·docker·typescript·django·vue