linux系统下,docker-compose安装Elasticsearch+kibana

  1. 安装docker-ce
  2. 安装docker-compose
  3. 创建docker-compose.yml文件
    version: '2'
    services:
    
      elasticsearch:
        image: elasticsearch:6.7.2
        environment:
          - discovery.type=single-node
        mem_limit: 2gb
        expose:
          - 9200
        ports:
          - "9200:9200"
        volumes:
          - /media/hch/G1/linux/database/es:/usr/share/elasticsearch/data
    
      kibana:
        image: kibana:6.7.2
        links:
          - "elasticsearch"
        ports:
          - "5601:5601"
  4. 在docker-compose.yml所在目录输入docker-compose up -d 启动
  5. 输入http://localhost:5601可访问kibana界面

 

你可能感兴趣的:(docker)