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
相关推荐
灯澜忆梦9 小时前
【minio】#1 | 简介与安装
docker·对象存储·minio
yukai0800812 小时前
【203篇系列】056 我的Agent系统
大数据·elasticsearch·搜索引擎
IT大白鼠12 小时前
搜索系列 · 第 08 篇——面试收官:高频题与全景总结
elasticsearch·面试·nosql
江湖有缘19 小时前
3款开源绘图工具整理合集,可Docker一键部署!
docker·容器·开源
TTATTC19 小时前
告别协议选型内耗:深入拆解微服务“内部 gRPC + 边界 REST”混合通信架构与 Envoy 转码实战
docker·开源
光影少年20 小时前
langchain与langgraph区别以及学习路线
elasticsearch·langchain·llm
Elasticsearch21 小时前
错误最多的服务运行正常:使用 ES|QL 从日志进行根因分析
elasticsearch
Elasticsearch1 天前
将你自己的密钥用于现有 Elastic Cloud 部署
elasticsearch
IT大白鼠1 天前
搜索系列 · 第 06 篇——避坑汇总:经典生产问题
elasticsearch·nosql
光依旧2 天前
PageIndex没翻车,翻车的是我的解析器
docker·langchain·大模型·向量数据库·pdf解析·rag·pageindex