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

  1. Download the Native Components archive

    Navigate to http://access.redhat.com and download the Native Components archive which matches the host's architecture.
    Extract the native directory (and any sub-directories) contained in the archive to $JBOSS_HOME.
  2. Open a command prompt with elevated privileges.

    Navigate to C:\Windows\System32 and right-click on cmd.exe. Select Run as Administrator .
  3. Change to the JBoss Enterprise Application Platform directory where the service installation script is located.

    cd $JBOSS_HOME\native\sbin
  4. Edit service.bat to specify the profile and local IP address to be used.

    The service.bat file by default uses the default profile and binds to IP address 127.0.0.1, neither of which are suitable for production use.
    Change SVCPROFILE=default, replacing default with the required profile's name.
    Change set SVCBINDIP=127.0.0.1, replacing 127.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.
  5. Run the service installation script.

    service.bat install
  6. Check that the service is installed.

    Under the Windows services list you will find this listed by the short name JBAS52SVC and the long name JBoss Application Server 5.2.

4.1.1. Removing the Service

To remove the service, do the following:
  1. Stop the service.

    Stop the service using Service Manager.
  2. Delete the service.

    Issue the following command from the command prompt with elevated privileges: sc delete JBAS52SVC