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/

相关推荐
a***728916 小时前
Java进阶(ElasticSearch的安装与使用)
java·elasticsearch·jenkins
李老师的Java笔记16 小时前
如何解决Mac升级完nodejs没有生效的问题?
macos
逸Y 仙X16 小时前
文章十八:Elasticsearch 多条件组合查询实战运用
大数据·elasticsearch·搜索引擎
开开心心_Every16 小时前
轻量级PDF阅读器,仅几M大小打开秒开
linux·运维·服务器·安全·macos·pdf·phpstorm
Chengbei1116 小时前
轻量化 Web 安全日志分析神器 星川智盾日志威胁检测、地理溯源、MITRE ATT&CK 映射,支持 Windows/macOS/Linux
前端·人工智能·安全·web安全·macos·系统安全·安全架构
空中海17 小时前
Docker入门到精通
java·docker·eureka
生而为虫17 小时前
在VScode中使用Claude Code agent并配置模型(仅mac电脑实际操作,windows电脑未实际操作如有问题可留言)
windows·vscode·macos
BduL OWED18 小时前
Docker:基于自制openjdk8镜像 or 官方openjdk8镜像,制作tomcat镜像
docker·容器·tomcat
.柒宇.18 小时前
AI掘金头条项目 Docker Compose 部署完整教程(附踩坑记录)
运维·后端·python·docker·容器·fastapi
大飞记Python18 小时前
刚从 Win 转 Mac?鼠标滚轮反向、触控板乱跑、第三方鼠标卡顿——这一篇就够了
macos·计算机外设·mac鼠标