您好,登錄后才能下訂單哦!
本篇內(nèi)容主要講解“docker搭建rabbitmq集群環(huán)境的步驟”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實用性強。下面就讓小編來帶大家學(xué)習(xí)“docker搭建rabbitmq集群環(huán)境的步驟”吧!
下載鏡像
采用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
默認(rèn)啟動了三個節(jié)點
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集群環(huán)境的步驟”有了更深的了解,不妨來實際操作一番吧!這里是億速云網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。