14.2. Running JBoss Fuse as a Service on a Headless Server
Prerequisites
- Install JBoss EAP 6 or later
- Administrator privileges on the server are required.
Summary
Use the following procedure to install JBoss Fuse as a service on Red Hat Enterprise Linux when the installation has been done using the graphical installer.
Procedure 14.1. Setup the Service
Locate the start-up script and configuration file
The start-up script and an associated configuration file are located in theEAP_HOME/bin/init.d/directory. Open the configuration filejboss-as.confto edit it.Customize the start-up options in the
jboss-as.conffileThere are several options within thejboss-as.conffile. At the minimum, specify the correct values forJBOSS_HOMEand theJBOSS_USERvariables. If these variables are absent, add them.Copy files into system directories
- Copy the modified configuration file to the
/etc/jboss-asdirectory.[user@host init.d]$sudo mkdir /etc/jboss-as[user@host init.d]$sudo cp jboss-as.conf /etc/jboss-as/ - Copy the start-up script to the
/etc/init.ddirectory.[user@host init.d]$sudo cp jboss-as-standalone.sh /etc/init.d
Add the start-up script as a service.
Add the newjboss-as-standalone.shservice to list of automatically started services, using the chkconfig service management command.[user@host init.d]$sudo chkconfig --add jboss-as-standalone.shStart the service.
Test that the service has been installed correctly by using the standard syntax for starting Red Hat Enterprise Linux services.[user@host bin]$sudo service jboss-as-standalone.sh startIf everything has gone correctly, you should get a green [OK]. If you get an error, check the error logs and make sure your paths are correct in the configuration file.Make the service start automatically when you restart your server.
To add the service to the list of services which start automatically when your server restarts, issue the following command.[user@host init.d]$sudo chkconfig jboss-as-standalone.sh on
Result
JBoss Fuse starts automatically when Red Hat Enterprise Linux reaches its default run-level, and stops automatically when the operating system goes through its shutdown routine.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.