docker搭建rabbitmq集群
本文主要讲述如何用docker搭建rabbitmq的集群。
下载镜像
采用bijukunjummen该镜像。
git clone https://github.com/bijukunjummen/docker-rabbitmq-cluster.git
运行
启动集群
cd docker-rabbitmq-cluster/clusterdocker-compose up -d......Status: Downloaded newer image for bijukunjummen/rabbitmq-server:latestdocker.io/bijukunjummen/rabbitmq-server: this image was pulled from a legacy registry. Important: This registry version will not be supported in future versions of docker.Creating cluster_rabbit1_1Creating cluster_rabbit2_1Creating cluster_rabbit3_1
默认启动了三个节点
rabbit1: image: bijukunjummen/rabbitmq-server hostname: rabbit1 ports: - "5672:5672" - "15672:15672"rabbit2: image: bijukunjummen/rabbitmq-server hostname: rabbit2 links: - rabbit1 environment: - CLUSTERED=true - CLUSTER_WITH=rabbit1 - RAM_NODE=true ports: - "5673:5672" - "15673:15672"rabbit3: image: bijukunjummen/rabbitmq-server hostname: rabbit3 links: - rabbit1 - rabbit2 environment: - CLUSTERED=true - CLUSTER_WITH=rabbit1 ports: - "5674:5672"
查看
docker@default:~$ docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESba5f665bb213 bijukunjummen/rabbitmq-server "/bin/sh -c /opt/rabb" 10 minutes ago Up 10 minutes 4369/tcp, 9100-9105/tcp, 15672/tcp, 25672/tcp, 0.0.0.0:5674->5672/tcp cluster_rabbit3_1b9466e206b2b bijukunjummen/rabbitmq-server "/bin/sh -c /opt/rabb" 10 minutes ago Up 10 minutes 4369/tcp, 9100-9105/tcp, 25672/tcp, 0.0.0.0:5673->5672/tcp, 0.0.0.0:15673->15672/tcp cluster_rabbit2_1b733201aeadf bijukunjummen/rabbitmq-server "/bin/sh -c /opt/rabb" 10 minutes ago Up 10 minutes 4369/tcp, 0.0.0.0:5672->5672/tcp, 9100-9105/tcp, 0.0.0.0:15672->15672/tcp, 25672/tcp cluster_rabbit1_188196436c434 daocloud.io/daocloud/daomonit "/usr/local/bin/daomo" 37 hours ago Up 2 hours daomonit
访问:
http://192.168.99.100:15672,弹出登陆界面
输入guest/guest
上篇:
Docker镜像仓库Harbor之搭建及配置
下篇:
rancher安装容器管理: portainer
相关主题
1 Kubernetes集群日志-使用Loki实现高效日志分析和查询 2 Linux搭建Weblogic集群 3 Weblogic集群部署详解 4 使用OBD白屏部署OceanBase数据库 5 OceanBase 集群高可用部署方案简介 6 KubeSphere中部署Redis高可用集群 7 KubeSphere构建mysql集群 8 KubeSphere——常用应用UI可视化部署实战(1) 9 KubeSphere——常用应用UI可视化部署实战(2) 10 mysql每天新增加1百万数据 怎么办?有什么好的方案 11 RHCS实验 - RedHatClusterSuite 12 RHCS 红帽子集群套件
热门
焦点
视点
头条