Centos7 安装 ActiveMq
一、使用docker 快速部署
docker run --name ActiveMq --restart=always -p 61616:61616 -p 8161:8161 -v ActiveMqdata:/opt/activemq/data -v ActiveMqconf:/opt/activemq/conf -d --restart=always rmohr/activemq:5.15.9
打开web页面访问http://{IP}:8161,默认密码admin/admin
设置延迟队列:
进入mq安装目录 进入 conf 文件夹,找到activemq.xml 配置文件 在broker 这个节点加上 schedulerSupport="true"
cd /var/lib/docker/volumes/ActiveMqconf/_data
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" schedulerSupport="true">
重启服务
docker restart ActiveMq
再次打开web页面论证
二、使用安装包部署
1、安装
# cd /usr/local/src/
# wget https://archive.apache.org/dist/activemq/5.15.9/apache-activemq-5.15.9-bin.tar.gz
# tar -xzvf apache-activemq-5.15.9-bin.tar.gz
2、启动与关闭
# cd /usr/local/src/apache-activemq-5.15.9/bin/linux-x86-64/
#启动activemq服务
# ./activemq start
Starting ActiveMQ Broker...
#关闭activemq服务
# ./activemq stop
Stopping ActiveMQ Broker...
Stopped ActiveMQ Broker.
#
3、访问
用户名和密码默认是:admin
4、开启延迟队列
进入mq安装目录 进入 conf 文件夹,找到activemq.xml 配置文件 在broker 这个节点加上 schedulerSupport="true"