...
- Switch to activemq account
su - activemq
- If needed, create an instance wide setup file
/usr/local/apache-activemq-x.y.z/bin/activemq setup ~activemq/.activemqrc
. (ActiveMQ doesn't seem to To use per instance rc files any more?)activemqrc files (named~/.activemqrc-instance-$(INSTANCE_NAME)
) the start script used to start the instance must start with*activemq-instance-$(INSTANCE_NAME)
. - Create broker instance configuration
/usr/local/apache-activemq-x.y.z/bin/activemq create $(INSTANCE_NAME)
- Configure broker
vim $(INSTANCE_NAME)/conf/{activemq,jetty}.xml
- Optional: Set up key and trust stores in
$(INSTANCE_NAME)/conf/broker.{k,t}s
- Optional: Add broker to the service script, so that the broker may be automatically started on reboot.
...
No Format |
---|
# activemq-start.sh #!/bin/bash echo Starting ActiveMQ.... sh /home/activemq/test-broker-1/bin/test-broker-1 start sh /home/activemq/test-broker-2/bin/test-broker-2 start # activemq-stop.sh #!/bin/bash echo Stopping ActiveMQ.... sh /home/activemq/test-broker-1/bin/test-broker-1 stop sh /home/activemq/test-broker-2/bin/test-broker-2 stop # activemq #!/bin/bash # # activemq Starts ActiveMQ. # # chkconfig: 345 88 12 # description: ActiveMQ is a JMS Messaging Queue Server. ### BEGIN INIT INFO # Provides: $activemq ### END INIT INFO # Source function library. . /etc/init.d/functions [ -f /home/activemq/activemq-start.sh ] || exit 0 [ -f /home/activemq/activemq-stop.sh ] || exit 0 RETVAL=0 umask 077 start() { echo -n $"Starting ActiveMQ: " daemon su -c /home/activemq/activemq-start.sh activemq echo return $RETVAL } stop() { echo -n $"Shutting down ActiveMQ: " daemon su -c /home/activemq/activemq-stop.sh activemq echo return $RETVAL } restart() { stop start } case "$1" in start) start ;; stop) stop ;; restart|reload) restart ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 esac exit $? |