4.9.3. Configure JBoss EAP 6 as a Service in Microsoft Windows Server (Zip, Installer)
Prerequisites
- Install JBoss EAP 6 using the Zip installation, Graphical Installer, or Text-based Installer:
- Administrator privileges on the server are required.
- The
JAVA_HOMEsystem environment variable must be set. - The JBoss EAP 6 server instance must not be running.
Important
set command at a Windows Server command prompt will not permanently set the environment variable. You must use either the setx command, or the System interface in the Control Panel.
Use the following procedures to configure JBoss EAP 6 as a service on Microsoft Windows Server.
Procedure 4.19. Configure a Service for JBoss EAP 6 in Microsoft Windows Server
Create system environment variables
Create two system environment variables:JBOSS_HOMEpointing to the JBoss EAP 6 installation directory.NOPAUSE=1
If not already configured, download and extract the Native Utilities package for your architecture
If the Native Utilities for Windows Server package has not been installed as part of the JBoss EAP 6 installation, download the relevant 32-bit or 64-bit package from the Red Hat Customer Portal at https://access.redhat.com. Extract the Native Utilities zip archive over the JBoss EAP 6 installation.This will result in anativedirectory in the following location in the JBoss EAP 6 installation:EAP_HOME\modules\system\layers\base\Install the service
Open a terminal, and change directories toEAP_HOME\modules\system\layers\base\native\sbinA new service can be created with theservice installcommand, with the available options shown in the following table.Table 4.3.
service installoptionsArgument or Switch Description /controller HOST:PORT The host and port of the management interface. If omitted, the default islocalhost:9999./host [DOMAIN_HOST] Indicates that domain mode is to be used, optionally specifying the name of the domain controller. If the domain controller name is omitted, the default name ismaster./loglevel LEVEL The log level for the service, either:ERROR,INFO,WARNorDEBUG. If omitted, the default isINFO/name SERVICE_NAME The name of the service to be created, must not contain spaces. If omitted, the default isJBossEAP6/desc "DESCRIPTION" The description of the service. If omitted, the default is"JBoss Enterprise Application Platform 6"/serviceuser DOMAIN\USERNAME Specifies the name of the account under which the service will run. Use an account name in the format of DOMAIN\USERNAME. If omitted, the service runs as the Local System account./servicepass PASSWORD Password for /serviceuser account./jbossuser USERNAME Optional, the JBoss EAP 6 username to use for the shutdown command./jbosspass PASSWORD Password for /jbossuser account, required if /jbossuser is specified.Below are basic examples of aninstallcommand to create a new service in either standalone or domain mode. Execute the following command, adjusting the log level for the service as required:- Standalone mode:
service.bat install /loglevel INFO - Domain mode:If you are not using the default master for your JBoss EAP 6 domain controller, replace master with the correct host name or alias of the JBoss EAP 6 domain controller.
service.bat install /host master /loglevel INFO
A new Windows service will be created with nameJBossEAP6.Verify the new service in the Services console
Execute the following command in a terminal to open the Windows Services console:services.mscIf the default service name was used, in the list of Windows services, the new service will have the display name:JBoss Enterprise Application Platform 6. From the Services console you can start and stop the service, as well change its settings on how and when it starts.Starting and stopping the JBoss EAP 6 service from a terminal
To start the service from a terminal, use the following command, changing the service name if necessary:net start JBossEAP6To stop the service from a terminal, use the following command, changing the service name if necessary:net stop JBossEAP6
A JBoss EAP 6 service is configured in Microsoft Windows Server.
Procedure 4.20. Uninstall the JBoss EAP 6 service from Microsoft Windows Server
- If the service is running, first open a terminal and stop the service by executing the
net stopcommand with the name of the service:net stop JBossEAP6In a terminal, change directories toEAP_HOME\modules\system\layers\base\native\sbinand execute the following command:service uninstall
The JBoss EAP 6 service has been removed from Microsoft Windows Server.

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.