Docker搭建RabbitMQ服务

2019-09-29  本文已影响0人  小小圆公子

这里注意获取镜像的时候要获取management版本的,不要获取last版本的,management版本的才带有管理界面。

查询镜像

 docker search rabbitmq:management

可以看到如下结果:

[root@iZ2zehytrli05rv7k5kov6Z ~] docker search rabbitmq:management
NAME                                DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
macintoshplus/rabbitmq-management   Based on rabbitmq:management whit python and…   5                                       [OK]
xiaochunping/rabbitmq               xiaochunping/rabbitmq:management   2018-06-30   3                                       
transmitsms/rabbitmq-sharded        Fork of rabbitmq:management with sharded_exc…   0   

获取镜像

docker pull rabbitmq:management

可以看到如下结果

[root@iZ2zehytrli05rv7k5kov6Z /] docker pull rabbitmq:management
management: Pulling from library/rabbitmq
5667fdb72017: Pull complete 
d83811f270d5: Pull complete 
ee671aafb583: Pull complete 
7fc152dfb3a6: Pull complete 
511da93b5ba5: Pull complete 
2e439885870f: Pull complete 
5c07a284c0d9: Pull complete 
0e4528af7d06: Pull complete 
f8a8a551f015: Pull complete 
5a7a6d68d51f: Pull complete 
2210e947fea4: Pull complete 
f0ea315cdd14: Pull complete 
Digest: sha256:ff92870e678bbf18868a4da3da7a00048da04504cd34d8848d70bd2c5f64c9e9
Status: Downloaded newer image for rabbitmq:management
docker.io/library/rabbitmq:management

运行镜像

docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq rabbitmq:management

看到如下结果,变成功了:

[root@iZ2zehytrli05rv7k5kov6Z ~]# docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq rabbitmq:management
6a50ea4a543644dd64ce99a7a41fe8d24436ea9918df71c4be74b63f701f5a2d

访问管理界面

访问管理界面的地址就是 http://[宿主机IP]:15672,可以使用默认的账户登录,用户名和密码都guest,如:


image.png

到这里就完成安装部署了。

上一篇下一篇

猜你喜欢

热点阅读