视频教程:https://www.bilibili.com/video/BV1xv4y1S7kA/
https://hub.docker.com/网站搜索rabbitmq,确定其安装版本,这里安装rabbitmq:3.8.12-management版,带“-management”版本的Rabbit含有Web管理界面;
[root@bogon ~]# docker pull rabbitmq:3.8.12-management
Trying to pull repository docker.io/library/rabbitmq ...
3.8.12-management: Pulling from docker.io/library/rabbitmq
d519e2592276: Pull complete
…省略…
58d01d029bec: Pull complete
Digest: sha256:9d340b284990eb7f465616504f3fb058948ce58065997aa54d802aab0e8e60c2
Status: Downloaded newer image for docker.io/rabbitmq:3.8.12-management
[root@bogon ~]#
[root@bogon ~]# docker run --name rabbitmq -d -p 5672:5672 -p 15672:15672 rabbitmq:3.8.12-management
680dc7ecb7cb9a53b539bdb218e2df5b16a18b01be1a0b4272fd16745db59c23
[root@bogon ~]#
[root@bogon ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
680dc7ecb7cb rabbitmq:3.8.12-management "docker-entrypoint..." 2 minutes ago Up 2 minutes 4369/tcp, 5671/tcp, 0.0.0.0:5672->5672/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp rabbitmq
[root@bogon ~]#
说明:
5672:rabbitMq编程语言客户端连接端口;
15672:rabbitMq管理界面端口;
25672:rabbitMq集群端口;
[root@bogon ~]# firewall-cmd --zone=public --add-port=5672/tcp --add-port=15672/tcp --permanent
success
[root@bogon ~]# firewall-cmd --reload
success
[root@bogon ~]#
启动浏览器—>访问http://192.168.1.100:15672
注:用户名和密码均为guest