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
相关推荐
Fan20 分钟前
Elasticsearch 下载安装及使用总结
大数据·elasticsearch·jenkins
神秘的土鸡1 小时前
Linux中Docker容器构建MariaDB数据库教程
linux·运维·服务器·数据库·docker·mariadb
TO_ZRG2 小时前
使用jenkins打包unity工程
运维·unity·jenkins
liujiangxu2 小时前
jenkins声明式流水线语法详解
运维·自动化·jenkins
Connie14512 小时前
filebeat采集挂载出来的/home/Logs下的日志过程
elasticsearch
攸攸太上3 小时前
Docker学习
java·网络·学习·docker·容器
Sylvan Ding3 小时前
Docker+PyCharm远程调试&环境隔离解决方案
docker·容器·pycharm
周全全4 小时前
Elasticsearch 检索优化:停用词的应用
大数据·elasticsearch·jenkins
码爸5 小时前
flink自定义process,使用状态求历史总和(scala)
大数据·elasticsearch·flink·kafka·scala
_道隐_6 小时前
如何在Windows上安装Docker
windows·docker