# cd /usr/local
# mkdir activemq
# cd activemq
# wget http://apache.fayea.com/activemq/5.15.9/apache-activemq-5.15.9-bin.tar.gz
# tar -zxvf apache-activemq-5.15.9-bin.tar.gz
init.d 添加activemq文件
# cd /etc/init.d/
# vim activemq
添加以下内容===开始
#!/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=/
export CATALINA_HOME=/usr/local/activemq/apache-activemq-5.15.9
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 启动
测试 192.168.0.174:8161 出现界面即安装成功
ActiveMQ安装完毕。默认用户名密码为:admin/admin。
状态
# service activemq status
# service activemq start
# service activemq stop
开机是否启动
# chkconfig activemq on
# chkconfig activemq off
INFO: Loading '/usr/local/activemq/apache-activemq-5.15.9//bin/env'
ERROR: Configuration variable JAVA_HOME or JAVACMD is not defined correctly.
(JAVA_HOME='', JAVACMD='java')
# cd /etc/init.d/
# vim activemq
JAVA_HOME=/usr/local/jdk1.8.0_191