Language and Page Formatting Options
6.2. Install JBoss Enterprise Application Platform as a Service in Red Hat Enterprise Linux
Use the following procedure to install JBoss Enterprise Application Platform 6 as a service on Red Hat Enterprise Linux.
You need administrator access to complete this task.
Procedure 6.1. Task
Copy the start-up script to the
/etc/init.d/directoryThe start-up script and an associated configuration file are located in the
EAP_HOME/bin/init.d/directory. Copy each of these files to the
sudo cp jboss-as-standalone.sh jboss-as.conf /etc/init.d
Add the start-up script as a service.Add the new
jboss-as-standalone.shservice to list of automatically started services, using the
chkconfigservice management command.
sudo chkconfig --add jboss-as-standalone.sh
Edit the script options.If desired, edit the
jboss-as.conffile to customize start-up options for JBoss Enterprise Application Platform and the JVM. Use the comments in the file as guidance. It is recommended to set the
JBOSS_HOMEvariable in this file, to point to the directory where you extracted JBoss Enterprise Application Platform 6. Do not add a trailing slash (/) at the end of the directory name.
Edit the script itself.You may need to edit the start-up script itself. It makes certain assumptions about the name of your start-up file and the location of your JBoss Enterprise Application Platform instance. Customize the script, paying special attention to the following variables, which you will need to customize to start JBoss Enterprise Application Platform 6 as a managed domain.
JBOSS_HOME- the location where JBoss Enterprise Application Platform 6 is extracted
JBOSS_USER- the user with the ability to run JBoss Enterprise Application Platform. This should be a non-privileged user, as no superuser privileges as required.
JBOSS_CONFIG- the name of the configuration file used to start JBoss Enterprise Application Platform 6, such as
JBOSS_SCRIPT- the script used to start JBoss Enterprise Application Platform 6, such as
Start the service.If desired, start the new service using the standard syntax for starting Red Hat Enterprise Linux services.
sudo service jboss-as-standalone.sh start
JBoss Enterprise Application Platform 6 starts automatically when the Red Hat Enterprise Linux reaches its default run-level, and stops automatically when the operating system goes through its shutdown routine.