ActiveMQ加入到系统服务


ActiveMQ加入到系统服务

cp bin/activemq /etc/init.d
vim /etc/init.d/activemq

#!/bin/sh

### BEGIN INIT INFO
#Provides: activemq
#Required-Start: $remote_fs $network $syslog
#Required-Stop: $remote_fs $network $syslog
#Default-Start: 3 5
#Default-Stop: 0 1 6
#Short-Description: Starts ActiveMQ
#Description: Starts ActiveMQ Message Broker Server
### END INIT INFO

// 在上面这部分代码后面添加:

export JAVA_HOME=/your_java_home
ACTIVEMQ_HOME=/your_active_home

chmod +x activemq
chkconfig –add activemq
chkconfig activemq on
service activemq start

我这里用的版本是5.15.8,如果没有### BEGIN INIT INFO —— ### END INIT INFO之间的内容,添加即可。

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注