Chapter 3. Running and removing JBoss EAP as a service on Microsoft Windows Server
3.1. Running JBoss EAP as a service on Microsoft Windows server
You can configure JBoss EAP to run as a service on Microsoft Windows server. This method provides a basic default installation of a server, with configuration files and libraries placed in standard folders.
If you use the set
command to set system environment variables in a Windows Server command prompt, it does not permanently set the environment variables. You must use either the setx
command, or the System
interface in the Control Panel
.
Prerequisites
- You have installed JBoss EAP.
- You have administrator privileges on the server.
-
You have set the
JAVA_HOME
system environment variable. - You have verified that the JBoss EAP server instance is not running.
Procedure
-
Use the
setx
command to create two system environment variables:JBOSS_HOME
andNOPAUSE
. Use the
setx
command to configure the two environment variables:-
Set the path for the
JBOSS_HOME
variable to the JBoss EAP installation directory. -
The
jboss-cli.bat
script contains the"x%NOPAUSE%" == "x" pause
line of code. This code creates a status message when you issue the pause command. To disable these messages, you must specify a value for theNOPAUSE
variable. For example, setting theNOPAUSE
variable toNOPAUSE=true
disables status messages from appearing when a script completes.
-
Set the path for the
Additional resources
- To learn more about how to set environment variables on a Microsoft Windows Server, refer to the Microsoft Windows documentation.
3.2. Removing JBoss EAP service on Microsoft Windows Server
You can remove an instance of JBoss EAP and any services associated with it. Thereafter, you can install JBoss EAP by using a suitable installation method.
Prerequisites
- You have JBoss EAP installed.
Procedure
When the service is running, open the command prompt and stop the service by entering the
net
stop command with the name of the service:net stop JBossEAP7
At a command prompt, change directories to
EAP_HOME\bin
and execute the following command:service.bat uninstall