# export SUNJMX="-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote=true"To stop the service, simply type
# sudo {path to ActiveMQ}/bin/activemq-admin start &
# export SUNJMX=""
# sudo {path to ActiveMQ}/bin/activemq-admin stop
Below is the startup script, create a file /etc/init.d/activemq
#!/bin/bashNote:
# the base directory
AMQ_DIR="/opt/activemq"
CMD="$AMQ_DIR/bin/activemq-admin"
case "$1" in
start)
echo "Starting ActiveMQ "
export SUNJMX="-Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote=true"
$CMD $1 >/dev/null 2>&1 &
;;
stop)
echo "Shutting down ActiveMQ"
$CMD $1
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
- Login as root
- Change the owner to root:root
- Change permission to 755
沒有留言:
發佈留言