docker搭建rabbitmq集群环境的方法
作者:xixicat 时间:2022-09-13 11:53:07
本文主要讲述如何用docker搭建rabbitmq的集群。分享给大家,希望此文章对各位有所帮助。
下载镜像
采用bijukunjummen该镜像。
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-cluster
tutum/rabbitmq
来源:https://segmentfault.com/a/1190000004394741
标签:docker,rabbitmq,集群
0
投稿
猜你喜欢
win2003服务器安全设置教程
2008-01-29 10:07:00
做站要做具有“生命力”的网站
2008-06-06 11:26:00
雅虎重回中国设北京研发中心踢馆中国雅虎
2009-12-03 09:03:00
解决Ubuntu 18.04安装VMwareTools错误问题
2022-10-18 10:56:48
别走进误区 谈谈网站内容以及高质量外链
2009-01-23 10:27:00
让SEO更大的作用
2009-01-16 16:39:00
Keepass+PuTTYPortable+Winscp一键登录实例详解
2023-11-04 06:48:00
PHPCMS开发文档里看到PHP编码规范
2009-08-18 11:17:00
“称霸赛场”3连冠 载入《商业大亨》名人册
2009-10-22 10:47:00
Linux常用命令mkdir详解
2023-08-17 23:02:27
VMware Workstation 14 Pro安装与激活图文教程
2022-05-11 05:47:14
网页游戏倍受白领和学生青睐
2008-03-10 11:12:00
centos7.0之Lnmp和Lamp详细介绍
2022-09-26 04:37:59
新版Firefox可侦测笔记本方向 传给应用程序
2009-10-14 13:42:00
如何设置Discuz!7.0分类信息功能
2009-02-02 12:50:00
创新过程中的收购
2009-07-26 10:00:00
CentOS 7中 Minimal 安装JDK 1.8的教程
2023-05-11 12:01:14
关于IIS7.0出错的解决方案
2008-06-11 10:35:00
应用:数据中心备份的十三种最佳做法
2009-10-11 11:47:00
Serv-U3.0的Domain设置(下)
2007-11-19 13:33:00