下载
下载地址:http://apache.mirror.rafal.ca/activemq
选择自己需要的版本下载
这里测试我是下载的apache-activemq-5.7.0-bin.tar.gz
安装
useradd activemq
tar zxvf apache-activemq-5.7.0-bin.tar.gz
mv apache-activemq-5.7.0 /usr/local/activemq
chown -R activemq.activemq /usr/local/activemq
配置启动
vi /etc/init.d/activemq
#!/bin/bash
#
# activemq Starts ActiveMQ.
#
#
# chkconfig: 345 88 12
# description: ActiveMQ is a JMS Messaging Queue Server.
### BEGIN INIT INFO
# Provides: $activemq
### END INIT INFO
# the base directory
AMQ_DIR="/usr/local/activemq"
# run the instance as user
AMQ_USER=activemq
CMD="nohup $AMQ_DIR/bin/activemq-admin"
case "$1" in
start)
echo "Starting ActiveMQ "
/bin/su – $AMQ_USER -c "$CMD $1 >/dev/null 2>&1 &"
;;
stop)
echo "Shutting down ActiveMQ"
/bin/su – $AMQ_USER -c "kill -9 `ps -u activemq -o pid=`"
;;
restart)
$0 stop
$0 start
;;
status)
echo "you wish – not yet implemented"
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
保存并给与执行权限
chown activemq.activemq /etc/init.d/activemq
chmod +x /etc/init.d/activemq
启动验证
service activemq start
直接输入http://192.168.1.104:8161/admin/index.jsp能正常访问,就OK了
转载请注明:IT运维空间 » linux » CentOS 6.3安装apache-activemq
继续浏览有关 LINUX技术 的文章
发表评论