ActiveMQ can be configured to start and run automatically.
-
Create a user named
activemqthat you will use to run the ActiveMQ automatic process:sudo useradd -m activemq -
Create an
init.dscript, for example, in/etc/init.d/activemqto run the ActiveMQ shell script under theactivemquser:#!/bin/bash # chkconfig: 2345 80 20 cd opt/activemq /bin/su activemq -c "bin/activemq $@" -
Make the file executable and enable the script:
chmod +x /etc/init.d/activemq chkconfig --add activemq