rhq-server.sh script can be managed by the
init process so that the server starts automatically when the system boots. This also allows the server process to be managed by services like
rhq-server.sh script into the
cp serverRoot/bin/rhq-server.sh /etc/init.d/
/etc/init.d/rhq-server.sh script to set the
RHQ_SERVER_HOME variable to the JBoss ON server install directory and the
RHQ_SERVER_JAVA_HOME variable to the appropriate directory for the JVM. For example:
/etc/init.d/rhq-server.sh script, and add the following lines to the top of the file, directly under
#description: JBoss Operations Network Server
The last two numbers in the
#chkconfig: 2345 95 20 line specify the start and stop priority, respectively, for the JBoss ON server.
Add the service to the
chkconfig service management command, and verify that it was added properly.
chkconfig --add rhq-server.sh
chkconfig rhq-server.sh --list
rhq-server.sh service to run at run level 5.
chkconfig --level 5 rhq-server.sh on