mac通过docker搭建elasticsearch:8.9.2以及kibana:8.9.2

1.elasticsearch.yml配置修改:

复制代码
cluster.name: "docker-cluster"
network.host: 0.0.0.0
http.port: 9200
#discovery.seed_hosts: ["172.17.0.2"]

#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically
# generated to configure Elasticsearch security features on 09-09-2023 06:34:17
#
# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: true

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: false  #这里一定要改成false,否则kinaba访问不同
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
#----------------------- END SECURITY AUTO CONFIGURATION -------------------------


# 跨域
http.cors.allow-origin: "*"
http.cors.enabled: true
http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

2.执行命令运行elasticsearch容器:

复制代码
docker run -d --name elasticsearch-dev \
-p 9200:9200 \
-p 9300:9300 \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms64m -Xmx512m" \
-e TAKE_FILE_OWNERSHIP=true \
-v /Users/本地路径/work/software/elasticsearch/logs:/usr/share/elasticsearch/logs \
-v /Users/本地路径/work/software/elasticsearch/data:/usr/share/elasticsearch/data \
-v /Users/本地路径/work/software/elasticsearch/plugins:/usr/share/elasticsearch/plugins \
-v /Users/本地路径/work/software/elasticsearch/config:/usr/share/elasticsearch/config \
elasticsearch:8.9.2

3.kibana.yml配置如下:

复制代码
#
# ** THIS IS AN AUTO-GENERATED FILE **
#

# Default Kibana configuration for docker target
server.host: 0.0.0.0
server.shutdownTimeout: "5s"
#172.17.0.2这个IP是es起来后分配的
elasticsearch.hosts: [ "http://172.17.0.2:9200" ]
monitoring.ui.container.elasticsearch.enabled: true
i18n.locale: "zh-CN"

elasticsearch.username: "kibana_system"
#注意这里需要修改kibana_system用户的密码
elasticsearch.password: "kibana_system"

4.执行命令运行kibana容器:

复制代码
docker run -d --name kibana-dev -p 5601:5601 -v /Users/本地路径/work/software/kibana/config:/usr/share/kibana/config kibana:8.9.2

5.访问kinaba:

复制代码
http://localhost:5601
相关推荐
014-code1 分钟前
手把手带你解读 Dockerfile - 最快上手方法
java·docker·容器·持续部署
江湖有缘6 分钟前
基于华为openEuler系统部署MicroBin粘贴板工具
华为·docker·华为云·openeuler
白宇横流学长21 分钟前
Elasticsearch集群搭建
大数据·elasticsearch·搜索引擎
刘一说1 小时前
OpenClaw 在 Docker 容器中的部署实战——零配置启动
运维·docker·容器
MarsLord2 小时前
ElasticSearch快速入门实战(3)-集群、分片、同步MySQL数据
大数据·elasticsearch·搜索引擎
东方隐侠安全团队-千里2 小时前
Docker青龙面板挖矿入侵事件应急复盘
运维·docker·容器
王码码20352 小时前
Flutter for OpenHarmony:es_compression — 高性能 Brotli 与 Zstd 算法实战
算法·flutter·elasticsearch
2301_816997883 小时前
Elasticsearch 概述与安装
大数据·elasticsearch·jenkins
猫头虎3 小时前
Docker 安装 OpenClaw 报错排查完全手册(续):如何解决pairing required,`EACCES: permission denied`Docker 拉取镜像提示 `denied
运维·docker·容器·开源·github·aigc·ai编程
Elastic 中国社区官方博客3 小时前
需要知道某个同义词是否实际匹配了你的 Elasticsearch 查询吗?
大数据·数据库·elasticsearch·搜索引擎·全文检索