大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
这篇文章主要介绍了docker怎么搭建rabbitmq集群环境的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇docker怎么搭建rabbitmq集群环境文章都会有所收获,下面我们一起来看看吧。
创新互联是一家专注于网站设计、成都网站设计与策划设计,宁远网站建设哪家好?创新互联做网站,专注于网站建设10年,网设计领域的专业建站公司;建站业务涵盖:宁远等地区。宁远做网站价格咨询:18980820575
下载镜像
采用该镜像。
git clone https://github.com/bijukunjummen/docker-rabbitmq-cluster.git
运行
启动集群
cd docker-rabbitmq-cluster/cluster docker-compose up -d ...... status: downloaded newer image for bijukunjummen/rabbitmq-server:latest docker.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_1 creating cluster_rabbit2_1 creating 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 ps container id image command created status ports names ba5f665bb213 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_1 b9466e206b2b 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_1 b733201aeadf 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_1 88196436c434 daocloud.io/daocloud/daomonit "/usr/local/bin/daomo" 37 hours ago up 2 hours daomonit
访问
http://192.168.99.100:15672,弹出登陆界面
输入guest/guest
关于“docker怎么搭建rabbitmq集群环境”这篇文章的内容就介绍到这里,感谢各位的阅读!相信大家对“docker怎么搭建rabbitmq集群环境”知识都有一定的了解,大家如果还想学习更多知识,欢迎关注创新互联行业资讯频道。