码迷,mamicode.com
首页 > 系统相关 > 详细

Linux将ActiveMQ修改为自启动

时间:2018-05-24 16:39:08      阅读:240      评论:0      收藏:0      [点我收藏+]

标签:syslog   技术分享   highlight   rip   /usr   开机启动   /etc   oca   一个   

 

1、在root权限下操作

2、ln -s  /usr/local/activemq/bin/activemq /etc/init.d/activemq

3、vi /etc/init.d/activemq

4、在第二行添加

#### BEGIN INIT INFO  
# Provides:             activemq  
# Required-Start:       $remote_fs $syslog  
# Required-Stop:        $remote_fs $syslog  
# Default-Start:        2 3 4 5  
# Default-Stop:         0 6  
# chkconfig: 2345 64 36  
# Short-Description:    ActiveMQ server  
### END INIT INFO  

5、在最后一个#后添加

export JAVA_HOME=/usr/local/jdk
ACTIVEMQ_HOME=/usr/local/activemq  

技术分享图片

技术分享图片

 

6、chkconfig activemq on  设置成开机启动

7、chkconfig activemq off  设置成开机不启动

8、service activemq start /stop 启动/关闭

 

 

 

Linux将ActiveMQ修改为自启动

标签:syslog   技术分享   highlight   rip   /usr   开机启动   /etc   oca   一个   

原文地址:https://www.cnblogs.com/xzlive/p/9083021.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!