Chapter 4. Server as a Service
On Red Hat Enterprise Linux, Windows, and UNIX systems, you can run the JBoss Enterprise Application Platform as a service.
4.1. Running as a Service on Microsoft Windows
Download the Native Components archive
Navigate to http://access.redhat.com and download the Native Components archive which matches the host's architecture.Extract thenative
directory (and any sub-directories) contained in the archive to$JBOSS_HOME
.Open a command prompt with elevated privileges.
Navigate toC:\Windows\System32
and right-click oncmd.exe
. Select Run as Administrator .Change to the JBoss Enterprise Application Platform directory where the service installation script is located.
cd
$JBOSS_HOME\native\sbin
Edit
service.bat
to specify the profile and local IP address to be used.Theservice.bat
file by default uses thedefault
profile and binds to IP address127.0.0.1
, neither of which are suitable for production use.ChangeSVCPROFILE=default
, replacingdefault
with the required profile's name.Changeset SVCBINDIP=127.0.0.1
, replacing127.0.0.1
with the required IP address.Note
For a full list of profiles and the services they include, refer to the Standard Server Profiles section of the Administration and Configuration Guide.Run the service installation script.
service.bat install
Check that the service is installed.
Under the Windows services list you will find this listed by the short nameJBAS52SVC
and the long nameJBoss Application Server 5.2
.
4.1.1. Removing the Service
To remove the service, do the following:
Stop the service.
Stop the service using Service Manager.Delete the service.
Issue the following command from the command prompt with elevated privileges:sc delete JBAS52SVC