最新消息:时间抓起来说是金子,抓不住就是流水。

CentOS 6.3安装apache-activemq

Mq 老子黑牵翻 5136浏览 0评论
下载
下载地址: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了

转载请注明:LINUX服务器运维架构技术分享 » CentOS 6.3安装apache-activemq

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址