大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
本篇内容主要讲解“docker搭建rabbitmq集群环境的步骤”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“docker搭建rabbitmq集群环境的步骤”吧!
超过十余年行业经验,技术领先,服务至上的经营模式,全靠网络和口碑获得客户,为自己降低成本,也就是为客户降低成本。到目前业务范围包括了:成都网站制作、成都做网站、外贸营销网站建设,成都网站推广,成都网站优化,整体网络托管,微信小程序,微信开发,重庆APP软件开发,同时也可以让客户的网站和网络营销和我们一样获得订单和生意!
下载镜像
采用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集群环境的步骤”有了更深的了解,不妨来实际操作一番吧!这里是创新互联网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!