Laze

If I rest I rust !

  博客园  :: 首页  :: 新随笔  ::  ::  :: 管理

 

1,编辑启动文件

vim /etc/init.d/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=/usr/java/jdk1.7.0_79
export CATALINA_HOME=/usr/home/local/services/activemq/activemq
 
case $1 in
    start)
        sh $CATALINA_HOME/bin/activemq start
    ;;
    stop)
        sh $CATALINA_HOME/bin/activemq stop
    ;;
    status)
     sh $CATALINA_HOME/bin/activemq status
;; restart) sh $CATALINA_HOME
/bin/activemq stop sleep 1 sh $CATALINA_HOME/bin/activemq start ;; esac exit 0

 

2,添加执行权限

chmod +x /etc/init.d/activemq

 

3,添加到开机启动

chkconfig  --add activemq

 

posted on 2018-11-16 20:53  CollinTsui  阅读(1462)  评论(0)    收藏  举报