当前位置:   article > 正文

docker-compose安装elk6.8.8_take_file_ownership="true

take_file_ownership="true

      - TAKE_FILE_OWNERSHIP=true #允许挂载,不然es容器启动不了

  1. version: '3'
  2. services:
  3. elasticsearch:
  4. image: elasticsearch:6.8.8
  5. container_name: elasticsearch6
  6. environment:
  7. - "cluster.name=elasticsearch" #设置集群名称为elasticsearch
  8. - "discovery.type=single-node" #以单一节点模式启动
  9. - "ES_JAVA_OPTS=-Xms4096m -Xmx4096m" #设置使用jvm内存大小
  10. - TAKE_FILE_OWNERSHIP=true #允许挂载,不然es容器启动不了
  11. volumes:
  12. - /data/elasticsearch6/plugins:/usr/share/elasticsearch/plugins #插件文件挂载
  13. - /data/elasticsearch6/data:/usr/share/elasticsearch/data #数据文件挂载
  14. - /data/elasticsearch6/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml #配置文件挂载
  15. ports:
  16. - 9200:9200
  17. - 9300:9300
  18. kibana:
  19. image: kibana:6.8.8
  20. container_name: kibana6
  21. depends_on:
  22. - elasticsearch #kibana在elasticsearch启动之后再启动
  23. environment:
  24. - "elasticsearch.hosts=http://127.0.0.1:9200" #设置访问elasticsearch的地址
  25. volumes:
  26. - /data/kibana6/config:/usr/share/kibana/config #配置文件挂载
  27. ports:
  28. - 5601:5601

下面是elasticsearch和kibana的配置文件,放到对应的路径

  1. cat elasticsearch.yml
  2. cluster.name: "docker-cluster"
  3. node.name: node-1
  4. network.host: 0.0.0.0
  5. http.port: 9200
  1. cat kibana.yml
  2. server.name: kibana
  3. server.host: "0"
  4. elasticsearch.hosts: [ "http://elasticsearch:9200" ]
  5. i18n.locale: "zh-CN"

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/68358
推荐阅读
相关标签
  

闽ICP备14008679号