Docker 安装部署RabbitMQ

作者: xiaolyuh | 来源:发表于2018-02-02 20:52 被阅读1932次

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

    获查询镜像

     docker search rabbitmq:management
    

    可以看到如下结果:

    
    [root@localhost ~]# docker search rabbitmq:management
    INDEX       NAME                                          DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
    docker.io   docker.io/macintoshplus/rabbitmq-management   Based on rabbitmq:management whit python a...   1                    [OK]
    docker.io   docker.io/transmitsms/rabbitmq-sharded        Fork of rabbitmq:management with sharded_e...   0
    [root@localhost ~]#
    

    获取镜像

    docker pull rabbitmq:management
    

    可以看到如下结果

    [root@localhost ~]# docker pull rabbitmq:management
    Trying to pull repository docker.io/library/rabbitmq ...
    management: Pulling from docker.io/library/rabbitmq
    e7bb522d92ff: Pull complete
    ad90649c4d84: Pull complete
    5a318b914d6c: Pull complete
    cedd60f70052: Pull complete
    f4ec28761801: Pull complete
    b8fa44aa9074: Pull complete
    e8002a209c24: Pull complete
    cd1206edcd43: Pull complete
    769be0727074: Pull complete
    7308b93d35af: Pull complete
    c4102ef22c29: Pull complete
    fefc8e1aa4b5: Pull complete
    a271d400045b: Pull complete
    b0d4c40c62de: Pull complete
    Digest: sha256:8761de2c22badfc86dfe89791dc9dbf122f67ff0f8981966573d267af421b97f
    [root@localhost ~]#
    

    运行镜像

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

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

    [root@localhost ~]# docker run -d -p 5672:5672 -p 15672:15672 --name rabbitmq rabbitmq:management
    e194a2dbeb52f2296dfb6d1c527cf052d82be5ed9a4c974d70dcd6af3da3eb7e
    [root@localhost ~]#
    

    访问管理界面

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

    微信截图_20180202204950.png

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

    相关文章

      网友评论

      • xiaolyuh:你能看到你的管理界面吗?
      • SoberChina:我在我服务器上部署了rabbitmq
        ```
        An unexpected connection driver error occured (Exception message: Socket closed)

        org.springframework.amqp.AmqpIOException: java.io.IOException

        at org.springframework.amqp.rabbit.support.RabbitExceptionTranslator.convertRabbitAccessException(RabbitExceptionTranslator.java:71)
        at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:376)
        at org.springframework.amqp.rabbit.connection.CachingConnectionFactory.createConnection(CachingConnectionFactory.java:573)
        at org.springframework.amqp.rabbit.core.RabbitTemplate.doExecute(RabbitTemplate.java:1436)
        at org.springframework.amqp.rabbit.core.RabbitTemplate.execute(RabbitTemplate.java:1417)
        at org.springframework.amqp.rabbit.core.RabbitTemplate.send(RabbitTemplate.java:712)
        at org.springframework.amqp.rabbit.core.RabbitTemplate.convertAndSend(RabbitTemplate.java:813)
        at org.springframework.amqp.rabbit.core.RabbitTemplate.convertAndSend(RabbitTemplate.java:803)
        ```
        我本地启动没有问题,不晓得是哪里的问题。麻烦指导一下

      本文标题:Docker 安装部署RabbitMQ

      本文链接:https://www.haomeiwen.com/subject/zztyzxtx.html