docker安裝并運行rabbitmq的實例代碼
拉取鏡像:
[mall@VM_0_7_centos ~]$ sudo docker pull rabbitmq:3.7.15 [sudo] password for mall: 3.7.15: Pulling from library/rabbitmq 5b7339215d1d: Pull complete 14ca88e9f672: Pull complete a31c3b1caad4: Pull complete b054a26005b7: Pull complete eef17c6cb6cf: Pull complete d5a267fdfe2c: Pull complete d499647c68af: Pull complete ad88e7bd384a: Pull complete ae1d871f3f62: Pull complete 7ceac8eb91d4: Pull complete Digest: sha256:78dff08cefc9fef5c9cbaabab99d783d72d37cb7bbb66a08c4f59877ef406c1f Status: Downloaded newer image for rabbitmq:3.7.15 docker.io/library/rabbitmq:3.7.15
啟動容器中的rabbitmq:
[mall@VM_0_7_centos ~]$ sudo docker run -d --name rabbitmq \ > --publish 5671:5671 --publish 5672:5672 --publish 4369:4369 \ > --publish 25672:25672 --publish 15671:15671 --publish 15672:15672 \ > rabbitmq:3.7.15 da8896bb8f5acc5231c636f58e26109b9c59f9b6cb3bf7359343f5c5093765ce
進(jìn)入容器,開啟管理功能:
[mall@VM_0_7_centos ~]$ sudo docker exec -it rabbitmq /bin/bash root@da8896bb8f5a:/# rabbitmq-plugins enable rabbitmq_management Enabling plugins on node rabbit@da8896bb8f5a: rabbitmq_management The following plugins have been configured: rabbitmq_management rabbitmq_management_agent rabbitmq_web_dispatch Applying plugin configuration to rabbit@da8896bb8f5a... The following plugins have been enabled: rabbitmq_management rabbitmq_management_agent rabbitmq_web_dispatch started 3 plugins.
打開瀏覽器,輸入本機(jī)ip和15672端口:

使用默認(rèn)賬戶密碼guest/guest登陸,后新增用戶mall/mall:

新增虛擬主機(jī):

配置虛擬主機(jī)/mall給mall用戶,點擊下圖紅框中的mall進(jìn)去設(shè)置:


以上就是本次介紹的全部知識點內(nèi)容,感謝大家的學(xué)習(xí)和對腳本之家的支持。
相關(guān)文章
Docker compose up -d與Docker restart的區(qū)別
本文主要介紹了Docker compose up -d與Docker restart的區(qū)別,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2023-07-07
Docker可視化ui管理工具Portainer安裝及使用解析
這篇文章主要介紹了Docker可視化ui管理工具Portainer安裝及使用解析,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下2020-11-11
docker 搭建基于prometheus的監(jiān)控體系步驟實現(xiàn)
本文主要介紹了docker 搭建基于prometheus的監(jiān)控體系步驟實現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2022-05-05
docker部署elasticsearch和xpack密碼的詳細(xì)過程
本文主要介紹在docker環(huán)境下如何快速部署elasticsearch單機(jī)版本和集群版本,和增加xpack簡單用戶名密碼配置,文中有相關(guān)的代碼示例供大家參考,需要的朋友可以參考下2024-01-01
docker使用storage出現(xiàn)Exit導(dǎo)致文件無法上傳服務(wù)器的問題及解決方案
這篇文章主要介紹了docker使用storage出現(xiàn)Exit導(dǎo)致文件無法上傳服務(wù)器解決方案,本文給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-06-06

