《Centos7中Docker安装RabbitMQ.docx》由会员分享,可在线阅读,更多相关《Centos7中Docker安装RabbitMQ.docx(5页珍藏版)》请在金锄头文库上搜索。
1、Centos7中Docker安装RabbitMQ一、选择相应得镜像访问:https:/ pull rabbitmq:3.7.17-managementrootshendu # docker pull rabbitmq:3.7.17-managementTrying to pull repository docker.io/library/rabbitmq . 3.7.17-management: Pulling from docker.io/library/rabbitmq35c102085707: Pull complete 251f5509d51d: Pull complete 8e829
2、fe70a46: Pull complete 6001e1789921: Pull complete 79bdb7145cce: Pull complete a53ba598956f: Pull complete 78be6aa88825: Pull complete 78743b5c9607: Pull complete af023e02a847: Pull complete 2259c0afa940: Pull complete 347b67546dd0: Pull complete a139db4173f7: Pull complete Digest: sha256:9fb2ba3cb4
3、6fbf88486ce522858c65bbcdfe80cc8c67eaf2a06be2cec0144fe6Status: Downloaded newer image for docker.io/rabbitmq:3.7.17-management查看是否拉取成功rootshendu # docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEdocker.io/rabbitmq 3.7.17-management 7601e834fa14 46 hours ago 177 MBrootshendu # 二、启动RabbitMQrootshendu
4、# docker run -d -p 5672:5672 -p 15672:15672 -name myrabbitmq 7601e834fa14-d:后台运行-p:映射端口-p 5672:5672 :把主机的5672端口映射成rabbitMQ的5672端口-p 15672:15672 : web管理界面的name :起个名字7601e834fa14:镜像的id查询状态rootshendu # rootshendu # docker run -d -p 5672:5672 -p 15672:15672 -name myrabbitmq 7601e834fa14346c168369d2d63e4
5、4c48fa0a25ac84a41a21463df084c0b8233f0dd5160441brootshendu # rootshendu # rootshendu # docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES346c168369d2 7601e834fa14 docker-entrypoint. 9 seconds ago Up 8 seconds 4369/tcp, 5671/tcp, 0.0.0.0:5672-5672/tcp, 15671/tcp, 25672/tcp, 0.0.0.0:15672-15672/tcp myrabbitmqrootshendu # 测试是否访问成功在浏览器中输入:http:/安装RabbitMQ的主机IP:15672出现如下界面代表访问成功输入默认的账号密码:账号:guest密码:guest