docker 部署 elasticsearch rabbitmq kibana msyql

(1) 获取镜像 docker pull elasticsearch
(2) docker run -d --name es -p 9200:9200 -p 9300:9300 -e “discovery.type=single-node” elasticsearch
(3) docker ps 查看状态
(4) http://10.1.3.49:9200/
关系型数据库 数据库 表 行 列
ElasticSearch 索引 类型 文档 字段
https://my.oschina.net/bboss/blog/1835601?tdsourcetag=s_pcqq_aiomsg
(5) 安装插件 kibana
安装 kibana
docker pull kibana
挂载到es容器资源上
docker run -d -name kibana -p 5601:5601 --link es -e ELASTICSEARCH_URL=http://10.1.3.49:9200 kibana
http://10.1.3.49:5601/app/kibana#/discover?_g=()
(1) 部署rabbitmq
docker pull rabbitmq:management
(2) 启动rabbitmq
docker run -d --hostname my-rabbit --name rabbit -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin -p 15672:15672 -p 5672:5672 -p 25672:25672 -p 61613:61613 -p 1883:1883 rabbitmq:management
iptables -A INPUT -ptcp --dport 15672-j ACCEPT
http://10.1.3.49:15672
(1) mysql
docker run --name hi-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123 -d mysql:5.6.35

docker-compose elasticsearch

 version: '2'
services:
  elasticsearch:
#    image: docker.elastic.co/elasticsearch/elasticsearch:6.3.2
    image: docker.e-tudou.com/library/elasticsearch:6.3.2
    hostname: elasticsearch
    restart: always
    ports:
      - "9200:9200"
      - "9300:9300"
    environment:
      - node.name=node-1
      - cluster.name=wazuh
      - network.host=0.0.0.0
      - bootstrap.memory_lock=true
      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    mem_limit: 2g

  kibana:
#    image: docker.elastic.co/kibana/kibana:6.3.2
    image: docker.e-tudou.com/library/kibana:6.3.2
    hostname: kibana
    restart: always
    ports:
      - "5601:5601"
    environment:
      - ELASTICSEARCH_URL=http://elasticsearch:9200
    depends_on:
      - elasticsearch
    links:
      - elasticsearch:elasticsearch

docker-compose rabbitmq

rabbit1:
  image: rabbitmq:management
  hostname: rabbit1
  ports:
    - "4369:4369"
    - "5671:5671"
    - "5672:5672"
    - "15671:15671"
    - "15672:15672"
  environment:
    - RABBITMQ_DEFAULT_USER=teleinfo
    - RABBITMQ_DEFAULT_PASS=123456 

启动 docker-compose up -d
停止 docker-compose stop
删除 docker-compose down

你可能感兴趣的:(docker,docker)