Chapter 2. Application Server Management
2.1. Start JBoss EAP 6
2.1.1. Start JBoss EAP 6
2.1.2. Start JBoss EAP 6 as a Standalone Server
This topic covers the steps to start JBoss EAP 6 as a Standalone Server.
Procedure 2.1. Start the Platform Service as a Standalone Server
For Red Hat Enterprise Linux.
Run the command:EAP_HOME/bin/standalone.sh
For Microsoft Windows Server.
Run the command:EAP_HOME\bin\standalone.bat
Optional: Specify additional parameters.
To print a list of additional parameters to pass to the start-up scripts, use the-h
parameter.
The JBoss EAP 6 Standalone Server instance starts.
2.1.3. Start JBoss EAP 6 as a Managed Domain
The domain controller must be started before any slave servers in any server groups in the domain. Use this procedure first on the domain controller, and then on each associated host controller and each other host associated with the domain.
Procedure 2.2. Start the Platform Service as a Managed Domain
For Red Hat Enterprise Linux.
Run the command:EAP_HOME/bin/domain.sh
For Microsoft Windows Server.
Run the command:EAP_HOME\bin\domain.bat
Optional: Pass additional parameters to the start-up script.
For a list of parameters you can pass to the start-up script, use the-h
parameter.
The JBoss EAP 6 Managed Domain instance starts.
2.1.4. Start JBoss EAP 6 with an Alternative Configuration
Prerequisites
- Before using an alternate configuration file, prepare it using the default configuration as a template. For a Managed Domain, the configuration file needs to be placed in the
EAP_HOME/domain/configuration/
directory. For a Standalone Server, the configuration file should be placed in theEAP_HOME/standalone/configuration/
directory.
Note
EAP_HOME/docs/examples/configs/
directory. Use these examples to enable extra features such as clustering or the Transactions XTS API.
Procedure 2.3. Start the Instance with an Alternative Configuration
Managed Domain
For a Managed Domain, provide the file name of the configuration file as an option to the--domain-config
parameter. The file must be present in theEAP_HOME/domain/configuration/
directory, and you need to specify the path relative to that directory.Example 2.1. Using an alternate configuration file for a Managed Domain in Red Hat Enterprise Linux
[user@host bin]$ ./domain.sh --domain-config=
domain-alternate.xml
This example uses theEAP_HOME/domain/configuration/domain-alternate.xml
configuration file.Example 2.2. Using an alternate configuration file for a Managed Domain in Microsoft Windows Server
C:\EAP_HOME\bin> domain.bat --domain-config=
domain-alternate.xml
This example uses theEAP_HOME\domain\configuration\domain-alternate.xml
configuration file.Standalone server
For a Standalone Server, provide the filename of the configuration file as an option to the--server-config
parameter. The configuration file must be located in theEAP_HOME/standalone/configuration/
directory, and you need to specify the file path relative to that directory.Example 2.3. Using an alternate configuration file for a Standalone Server in Red Hat Enterprise Linux
[user@host bin]$ ./standalone.sh --server-config=
standalone-alternate.xml
This example uses theEAP_HOME/standalone/configuration/standalone-alternate.xml
configuration file.Example 2.4. Using an alternate configuration file for a Standalone Server in Microsoft Windows Server
C:\EAP_HOME\bin> standalone.bat --server-config=
standalone-alternate.xml
This example uses theEAP_HOME\standalone\configuration\standalone-alternative.xml
configuration file.
JBoss Enterprise Application Platform is now running, using your alternate configuration file.
2.1.5. Stop JBoss EAP 6
Note
Procedure 2.4. Stop a standalone instance of JBoss EAP 6
Stop an instance which was started interactively from a command prompt.
PressCtrl-C
in the terminal where JBoss EAP 6 is running.Stop an instance which was started as an operating system service.
Depending on your operating system, use one of the following procedures.Red Hat Enterprise Linux
For Red Hat Enterprise Linux, if you have written a service script, use itsstop
facility. This needs to be written into the script. Then you can useservice scriptname stop
, where scriptname is the name of your script.Microsoft Windows Server
In Microsoft Windows, use thenet service
command, or stop the service from the Services applet in the Control Panel.
Stop an instance which is running in the background (Red Hat Enterprise Linux)
- Locate the instance from the process list. One option is to run the command
ps aux |grep "[j]ava -server"
. This returns one result for each JBoss EAP 6 instance that is running on the local machine. - Send the process the
TERM
signal, by runningkill process_ID
, where process_ID is the number in the second field of theps aux
command above.
Each of these alternatives shuts JBoss EAP 6 down cleanly so that data is not lost.
2.1.6. Reference of Switches and Arguments to pass at Server Runtime
standalone.xml
, domain.xml
and host.xml
configuration files. This might include starting the server with an alternative set of socket bindings or a secondary configuration. A list of these available parameters can be accessed by passing the help switch at startup.
Example 2.5.
-h
or --help
switches. The results of the help switch are explained in the table below.
[localhost bin]$ standalone.sh -h
Table 2.1. Table of runtime switches and arguments
Argument or Switch | Description |
---|---|
--admin-only | Set the server's running type to ADMIN_ONLY. This will cause it to open administrative interfaces and accept management requests, but not start other runtime services or accept end user requests. |
-b=<value> | Set system property jboss.bind.address to the given value. |
-b <value> | Set system property jboss.bind.address to the given value. |
-b<interface>=<value> | Set system property jboss.bind.address.<interface> to the given value. |
-c=<config> | Name of the server configuration file to use. The default is standalone.xml . |
-c <config> | Name of the server configuration file to use. The default is standalone.xml . |
--debug [<port>] | Activate debug mode with an optional argument to specify the port. Only works if the launch script supports it. |
-D<name>[=<value>] | Set a system property. |
-h | Display the help message and exit. |
--help | Display the help message and exit. |
-P=<url> | Load system properties from the given URL. |
-P <url> | Load system properties from the given URL. |
--properties=<url> | Load system properties from the given URL. |
-S<name>[=<value>] | Set a security property. |
--server-config=<config> | Name of the server configuration file to use. The default is standalone.xml . |
-u=<value> | Set system property jboss.default.multicast.address to the given value. |
-u <value> | Set system property jboss.default.multicast.address to the given value. |
-V | Display the application server version and exit. |
-v | Display the application server version and exit. |
--version | Display the application server version and exit. |