下载地址
https://activemq.apache.org/components/classic/download/
测试版本: apache-activemq-5.16.2-bin.tar.gz
1、解压到指定目录,例如/root/activitymq
2、在/etc/init.d/下新增activitymq文件
vim activitymq
#!/bin/sh
#
# /etc/init.d/activemq
# chkconfig: 345 63 37
# description: activemq servlet container.
# processname: activemq 5.14.1
# Source function library.
#. /etc/init.d/functions
# source networking configuration.
#. /etc/sysconfig/network
export JAVA_HOME=你的jdk路径
export CATALINA_HOME=你的activitymq路径
case $1 in
start)
sh $CATALINA_HOME/bin/activemq start
;;
stop)
sh $CATALINA_HOME/bin/activemq stop
;;
restart)
sh $CATALINA_HOME/bin/activemq stop
sleep 1
sh $CATALINA_HOME/bin/activemq start
;;
esac
exit 0
chmod 777 activemq
设置开机启动
chkconfig activemq on
service activemq start
http://localhost:8161/
默认密码admin,admin
此时只能使用localhost访问
修改配置文件
vim activitymq/conf/jetty.xml
host修改为0.0.0.0
同时记得在防火墙开放这个端口
之后重启mq
service activemq restart