ActiveMQ can be configured to start and run automatically.
-
Create a user named activemq that you will use to run the ActiveMQ
automatic process:
sudo useradd -m activemq
-
Create an init.d script; for example, in
/etc/init.d/activemq to run the ActiveMQ shell script under the
activemq user:
#!/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