官网或镜像下载
wget http://mirror.bit.edu.cn/apache//activemq/5.14.5/apache-activemq-5.14.5-bin.tar.gz
解压到你喜欢的位置
cd /opt/
tar xvzf xxxx/apache-activemq-5.14.5.tar.gz
创建启动用户和链接
ln -s apache-activemq-5.14.5 activemq
adduser activemq
chown -R activemq.activemq apache-activemq-5.14.5
ln -sf /opt/activemq/bin/activemq /etc/init.d/
update-rc.d activemq defaults
创建默认启动配置
# echo "ACTIVEMQ_USER=activemq" >> /etc/default/activemq
# echo "ACTIVEMQ_DATA=/opt/activemq/data" >> /etc/default/activemq
用service来管理
service activemq start
service activemq stop