通过Docker安装ActiveMQ

本文详细介绍如何在Ubuntu14.04环境下使用Docker安装和配置ActiveMQ消息中间件,包括查找镜像、下载镜像、启动容器及访问管理页面的全过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、安装说明
OS: ubuntu 14.04
docker Version: 1.12.1
2、查找docker hub上的activemq镜像
#docker search ActiveMQ
3、下载docker ActiveMQ镜像
docker pull webcenter/activemq:5.13.2
这里如果网络不好,下载会很长,如果你使用rabbitmq,那可以用网易镜像,很快!
docker pull hub.c.163.com/library/rabbitmq:latest
可惜我在网易上,没有找到activemq镜像!
下载完成,docker images看下
4、启动activemq镜像容器
docker run --name ldb-activemq -it -d -v /data/activemq:/data/activemq -v /var/log/activemq:/var/log/activemq -p 8161:8161 -p 61616:61616 -p 61613:61613 webcenter/activemq:5.13.2

注:ActiveMQ默认使用的TCP连接端口是61616,监控管理端口:8161
-P, --publish-all=false Publish all exposed ports to the host interfaces
#自动映射容器对外提供服务的端口
-p, --publish=[] Publish a container’s port to the host
#指定端口映射 format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort (use ‘docker port’ to see the actual mapping)
–privileged=false Give extended privileges to this container
#提供更多的权限给容器
–restart="" Restart policy to apply when a container exits (no, on-failure[:max-retry], always)
–rm=false Automatically remove the container when it exits (incompatible with -d)
#如果容器退出自动移除和 -d 选项冲突 --security-opt=[] Security Options

5、查看activemq管理页面
访问http://localhost:8161/ 输入用户名、密码,然后登陆管理系统

至此,完成通过Docker安装ActiveMQ

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值