直接上代码
elasticsearch.yml
http: host: 0.0.0.0 xpack.security.enabled: false xpack.security.enrollment.enabled: true xpack.security.http.ssl: enabled: false
kibana.yml
server.name: kibana # kibana的主机地址 0.0.0.0可表示监听所有IP server.host: "0.0.0.0" # # 这边设置自己es的地址, elasticsearch.hosts: [ "http://elasticsearch:9200" ] elasticsearch.username: 'kibana' elasticsearch.password: '123456' # # 显示登陆页面 xpack.monitoring.ui.container.elasticsearch.enabled: true # 开启中文模式 i18n.locale: "zh-CN"
安装docker-compose.yml文件新建本地目录
version: '3' networks: es: services: elasticsearch: image: elasticsearch:8.6.0 container_name: elasticsearch restart: always environment: - discovery.type=single-node volumes: - ./config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml - ./data:/usr/share/elasticsearch/data - ./plugins:/usr/share/elasticsearch/plugins - ./logs:/usr/share/elasticsearch/logs ports: - "9200:9200" networks: - "es" privileged: true kibana: image: kibana:8.6.0 container_name: kibana restart: always networks: - "es" volumes: - ./kibana.yml:/usr/share/kibana/config/kibana.yml ports: - "5601:5601" privileged: trueq
启动命令
页面效果查看
localhost:9200
localhost:5601
标签:compose,0.0,kibana,elasticsearch,usr,docker,yml,es From: https://www.cnblogs.com/guoshuai-yangxu/p/17130945.html