Chapter 2. Archive installation of JBoss EAP
You can use the archive installer to install, configure, and uninstall a JBoss EAP instance. You can use the archive installation on all platforms supported by JBoss EAP.
2.1. Downloading JBoss EAP archive Copy linkLink copied to clipboard!
You can use the JBoss EAP archive file on the Red Hat Customer Portal to install JBoss EAP. The archive file installation is platform-independent.
Prerequisites
- Set up an account on the Red Hat Customer Portal.
- Review the JBoss EAP 7 supported configurations and ensure that your system is supported.
Procedure
- Log in to the Red Hat Customer Portal.
- Click Downloads.
- Select Red Hat JBoss Enterprise Application Platform in the Product Downloads list.
- In the Version drop-down list, select 7.4.
- Find Red Hat JBoss Enterprise Application Platform 7.4.0 in the list and click the Download link.
2.2. Installing JBoss EAP by using the archive Copy linkLink copied to clipboard!
You can use the archive installation method to install JBoss EAP. This method is the simplest way to install JBoss EAP and the method provides a basic default installation of a server, with configuration files and libraries placed in standard folders.
Prerequisites
- Set up an account on the Red Hat Customer Portal.
- Review the JBoss EAP 7 supported configurations and ensure that your system is supported.
- Download the JBoss EAP installation package.
- Install a supported Java Development Kit (JDK).
-
If you are using Windows, set the
JAVA_HOMEandPATHenvironment variables. If you do not have this set up, shortcuts do not work.
Procedure
- Log in to the Red Hat Customer Portal.
- Click Downloads.
- Select Red Hat JBoss Enterprise Application Platform in the Product Downloads list.
- From the Version drop-down list, select 7.4
- Find Red Hat JBoss Enterprise Application Platform 7.4.0 in the list and select the Download link.
Optional: Move the archive file to the server and location where you want to install JBoss EAP.
NoteYou must have read and write access to this directory.
Depending on your operating system, choose one of the following options:
For Red Hat Enterprise Linux, extract the archive file by entering the following command in the management CLI:
$ unzip jboss-eap-7.4.0.zip- For Windows Server, right-click the archive file and select Extract All.
EAP_HOME is the top-level directory for the JBoss EAP installation. The directory is created by extracting the archive.
2.3. JBoss EAP configuration file Copy linkLink copied to clipboard!
You can configure options provided in the configuration file by uncommenting and editing the respective lines. If you do not edit the configuration file, the service defaults to starting a standalone JBoss EAP server using the default configuration file, standalone.xml.
The startup script and an associated configuration file are located in the EAP_HOME/bin/init.d/ directory.
Several configurable options exist in the jboss-eap.conf file. You must provide the correct values for JBOSS_HOME and the JBOSS_USER.
If you want to start JBoss EAP in a managed domain, add JBOSS_MODE=domain to jboss-eap.conf. For example, to specify custom domain configuration files, add JBOSS_DOMAIN_CONFIG=DOMAIN_CONFIG_FILE.xml and JBOSS_HOST_CONFIG=HOST_CONFIG_FILE.xml.
By default, JBoss EAP uses domain.xml and host-master.xml as the domain configuration files.
2.4. Configuring JBoss EAP archive installation as a service on RHEL Copy linkLink copied to clipboard!
You can configure the archive installation to run as a service in Red Hat Enterprise Linux (RHEL).
Prerequisites
- Install JBoss EAP as an archive installation.
- Ensure that you administrator privileges on the server.
Procedure
-
Configure the start-up options in the
jboss-eap.conffile by opening thejboss-eap.confin a text editor and set the options for your JBoss EAP installation. Copy the service initialization and configuration files into the system directories:
Copy the modified service configuration file to the
/etc/defaultdirectory.$ sudo cp EAP_HOME/bin/init.d/jboss-eap.conf /etc/defaultCopy the service startup script to the
/etc/init.ddirectory and give it execute permissions:$ sudo cp EAP_HOME/bin/init.d/jboss-eap-rhel.sh /etc/init.d $ sudo chmod +x /etc/init.d/jboss-eap-rhel.sh $ sudo restorecon /etc/init.d/jboss-eap-rhel.sh
Add the new
jboss-eap-rhel.shservice to the list of automatically started services using thechkconfigservice management command:$ sudo chkconfig --add jboss-eap-rhel.shVerify that the service has been installed correctly by using one of the following commands.
For Red Hat Enterprise Linux 6:
$ sudo service jboss-eap-rhel.sh startFor Red Hat Enterprise Linux 7 and 8:
$ sudo service jboss-eap-rhel startThe service starts. If the service does not start and you get an error message, check the error logs and make sure that the options in the configuration file are set correctly.
For Red Hat Enterprise Linux 9:
NoteRed Hat Enterprise Linux 9 does not have the
initscriptspackage in the default build. This package includes the/etc/init.d/functionsfile used by thejboss-eap-rhel.shservice. The/etc/init.d/functionsfile is required to start JBoss EAP as a service; therefore, install theinitscriptspackage using the following command:$ sudo dnf install initscriptsRestart
systemctl:$ sudo systemctl daemon-reloadStart JBoss EAP:
$ sudo service jboss-eap-rhel start
Optional: To make the service start automatically when the Red Hat Enterprise Linux server starts, run the following command:
$ sudo chkconfig jboss-eap-rhel.sh on
Verification
-
To check the permissions of a file, enter the
ls -lcommand in the directory containing the file. To check that the automatic service start is enabled, enter the following command:
$ sudo chkconfig --list jboss-eap-rhel.sh
2.5. Removing JBoss EAP service on RHEL Copy linkLink copied to clipboard!
Depending on your work environment, the archive installation method might not meet the needs of your environment. You can remove the instance of JBoss EAP and any services associated with it. Thereafter, you can install JBoss EAP using a suitable installation method.
Procedure
If the service is running, open a terminal and stop the service with one of the following commands:
For Red Hat Enterprise Linux 6:
$ sudo service jboss-eap-rhel.sh stopFor Red Hat Enterprise Linux 7 and later:
$ sudo service jboss-eap-rhel stop
Remove JBoss EAP from the list of services:
$ sudo chkconfig --del jboss-eap-rhel.shDelete the configuration file and startup script:
$ sudo rm /etc/init.d/jboss-eap-rhel.sh $ sudo rm /etc/default/jboss-eap.conf
2.6. Installing JBoss EAP archive installation as a service on Microsoft Windows Server Copy linkLink copied to clipboard!
You can install JBoss EAP on Microsoft Windows Server by using the archive installation method. This method provides a basic default installation of a server, with configuration files and libraries placed in standard folders. The default installation of the server contains a service.bat script that you can use with Jsvc to stop and start JBoss EAP.
Prerequisites
- Ensure that you have administrator privileges on the server.
- Set the JAVA_HOME system environment variable.
Procedure
Install the JBoss EAP Core Services Jsvc package:
- Open a browser and log in to the Red Hat Customer Portal’s Software Downloads page.
- From the Product drop-down list, select Apache Jsvc.
- From the Version drop-down list, select the latest version.
- From the Releases list, select Red Hat JBoss Core Services Apache Jsvc. Ensure that you select the correct platform and architecture for your system. Next, select the Download link.
Extract the downloaded archive file into the directory containing your JBoss EAP installation directory. This results in a
jbcs-jsvc-<VERSION>directory at the same depth as your JBoss EAP installation directory. The following example shows the path to thejbcs-jsvc-<VERSION>directory:C:\Program Files ├── jboss-eap-7.4 │ ├── bin │ └── ... └── jbcs-jsvc-<VERSION>Install the service by opening the terminal and changing the directories to
EAP_HOME\bin. For a list of all possible options, runservice.batwithout any argumentsNoteIf you specify the
/jbossuserand/jbosspassparameters, you must ensure that your JBoss EAP user’s password does not contain a hash (#) or a semicolon (;).The following examples show a basic
service.bat installcommand that is needed to create a new service for either a standalone server, or a server in a managed domain.Enter the following command, adjusting the log level for the service as required:
For a standalone server:
$ service.bat install /loglevel INFOFor a server in a managed domain:
Use the
/hostparameter to specify the name of the JBoss EAP host controller being controlled by the service. You can see valid values for the name by executingls /hostin the management CLI.In the following command, replace
EAP_HOST_NAMEwith your JBoss EAP host controller name. If you specify the/hostparameter without providing a JBoss EAP host controller name, the name defaults tomaster.$ service.bat install /host EAP_HOST_NAME /loglevel INFO
-
A new Windows service is created with the name
JBossEAP7.
Verification
- Verify the new service in the Services console by opening the Windows Services console (services.msc) and checking that the service is created.
If the default service name was used, in the list of Windows services the new service is displayed as JBossEAP7.
From the Services console you can start and stop the service, and change its settings of how and when it starts.
2.7. Configuring JBoss EAP archive installation as a service on Microsoft Windows Server Copy linkLink copied to clipboard!
You can install JBoss EAP on Microsoft Windows Server using the archive installation method. 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
- Install JBoss EAP as an archive installation.
- Ensure that you have administrator privileges on the server.
- Set the JAVA_HOME system environment variable.
- Verify that the JBoss EAP server instance is not running.
Procedure
-
Use the
setxcommand to create two system environment variables:JBOSS_HOMEandNOPAUSE. Use the
setxcommand to configure the two environment variables:-
Configure the path for the
JBOSS_HOMEvariable to the JBoss EAP installation directory. -
The
jboss-cli.batscript contains theif "x%NOPAUSE%" == "x" pauseline of code. This code creates a status message when you issue thepausecommand. To disable these messages, you must specify a value for theNOPAUSEvariable. For example, setting theNOPAUSEvariable toNOPAUSE=truedisables status messages from appearing when a script completes.
-
Configure the path for the
2.8. Starting and stopping the JBoss EAP service on Microsoft Windows Server Copy linkLink copied to clipboard!
In certain situations, you might need to use the command prompt to either stop or start the service. For instance, if you make any registry changes, you must stop the service and then restart it to force the service to re-read the registry.
Prerequisites
- Install JBoss EAP as an archive installation.
Procedure
- To start the service, at the command prompt issue the following command:
$ net start JBossEAP7
- To stop the service, at the command prompt issue the following command:
$ net stop JBossEAP7
2.9. Removing JBoss EAP service on Microsoft Windows Server Copy linkLink copied to clipboard!
Depending on your work environment, the archive installation method might not meet the needs of your environment. You can remove the instance of JBoss EAP and any services associated with it. Thereafter, you can install JBoss EAP using a suitable installation method.
Procedure
If the service is running, open the command prompt and stop the service by entering the
net stopcommand with the name of the service:net stop JBossEAP7At a command prompt, change directories to
EAP_HOME\binand execute the following command:service.bat uninstall
2.10. Installing and starting JBoss EAP archive installation by using Jsvc Copy linkLink copied to clipboard!
You can use the Apache Java Service (Jsvc) component of the JBoss Core Services Apache HTTP Server Installation Guide collection to run JBoss EAP as a detached process, daemon, on Red Hat Enterprise Linux (RHEL).
Although Jsvc works on RHEL, we strongly recommend that you use the native methods for running JBoss EAP as a service on RHEL.
Jsvc is a set of libraries and applications that provide Java applications the ability to run as a background service. Applications run using Jsvc can perform operations as a privileged user, then switch identity to a non-privileged user.
Procedure
- Open a browser and log in to the Red Hat Customer Portal’s Software Downloads page.
- From the Product drop-down list, select Apache Jsvc.
- From the Version drop-down list, select the latest version.
- From the Releases list, select Red Hat JBoss Core Services Apache Jsvc. Ensure that you select the correct platform and architecture for your system. Next, select the Download link.
Extract the downloaded archive file into the directory containing your JBoss EAP installation directory.
This results in a
jbcs-jsvc-<VERSION>directory at the same depth as your JBoss EAP installation directory. For example:/var/opt/ ├── jboss-eap-7.4 │ ├── bin │ └── ... └── jbcs-jsvc-<VERSION>Optional: The command examples for using Jsvc to start JBoss EAP assume that a
jbossuser has been created. If you have not already created a user for JBoss EAP, run the following commands to create thejbossuser and group:# groupadd -f -g 185 -r jboss # useradd -r -u 185 -g jboss -d EAP_HOME -s /sbin/nologin -c "JBoss" jboss
2.11. Jsvc commands to start or stop JBoss EAP as a standalone server Copy linkLink copied to clipboard!
Using Java Service (Jsvc), you can enter various commands for starting or stopping JBoss EAP. The following table shows a list of paths that are needed for the commands for an archive JBoss EAP installation.
| File Reference in Instructions | File Location |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
The following example demonstrates starting a standalone JBoss EAP server using Jsvc with a JSVC_BIN \ path:
$ JSVC_BIN \
-outfile LOG_DIR/jsvc.out.log \
-errfile LOG_DIR/jsvc.err.log \
-pidfile LOG_DIR/jsvc.pid \
-user jboss \
-D[Standalone] -XX:+UseCompressedOops -Xms1303m \
-Xmx1303m -XX:MaxPermSize=256m \
-Djava.net.preferIPv4Stack=true \
-Djboss.modules.system.pkgs=org.jboss.byteman \
-Djava.awt.headless=true \
-Dorg.jboss.boot.log.file=LOG_DIR/server.log \
-Dlogging.configuration=file:CONF_DIR/logging.properties \
-Djboss.modules.policy-permissions \
-cp EAP_HOME/jboss-modules.jar:JSVC_JAR \
-Djboss.home.dir=EAP_HOME \
-Djboss.server.base.dir=EAP_HOME/standalone \
@org.jboss.modules.Main -start-method main \
-mp EAP_HOME/modules \
-jaxpmodule javax.xml.jaxp-provider \
org.jboss.as.standalone
The following example demonstrates stopping a standalone JBoss EAP server using Jsvc with a JSVC_BIN \ path:
$ JSVC_BIN \
-stop \
-outfile LOG_DIR/jsvc.out.log \
-errfile LOG_DIR/jsvc.err.log \
-pidfile LOG_DIR/jsvc.pid \
-user jboss \
-D[Standalone] -XX:+UseCompressedOops -Xms1303m \
-Xmx1303m -XX:MaxPermSize=256m \
-Djava.net.preferIPv4Stack=true \
-Djboss.modules.system.pkgs=org.jboss.byteman \
-Djava.awt.headless=true \
-Dorg.jboss.boot.log.file=LOG_DIR/server.log \
-Dlogging.configuration=file:CONF_DIR/logging.properties \
-Djboss.modules.policy-permissions \
-cp EAP_HOME/jboss-modules.jar:JSVC_JAR \
-Djboss.home.dir=EAP_HOME \
-Djboss.server.base.dir=EAP_HOME/standalone \
@org.jboss.modules.Main -start-method main \
-mp EAP_HOME/modules \
-jaxpmodule javax.xml.jaxp-provider \
org.jboss.as.standalone
2.12. Jsvc commands to start or stop JBoss EAP on a managed domain Copy linkLink copied to clipboard!
Using Java Service (Jsvc), you can enter various commands for starting or stopping JBoss EAP. The following tables show the path that is needed for the commands for an archive JBoss EAP installation.
| File Reference in Instructions | File Location |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Before you issue the following command, set the JAVA_HOME system environment variable.
The following example demonstrates starting a JBoss EAP managed domain using Jsvc:
$ JSVC_BIN \
-outfile LOG_DIR/jsvc.out.log \
-errfile LOG_DIR/jsvc.err.log \
-pidfile LOG_DIR/jsvc.pid \
-user jboss \
-nodetach -D"[Process Controller]" -server -Xms64m \
-Xmx512m -XX:MaxPermSize=256m \
-Djava.net.preferIPv4Stack=true \
-Djboss.modules.system.pkgs=org.jboss.byteman \
-Djava.awt.headless=true \
-Dorg.jboss.boot.log.file=LOG_DIR/process-controller.log \
-Dlogging.configuration=file:CONF_DIR/logging.properties \
-Djboss.modules.policy-permissions \
-cp "EAP_HOME/jboss-modules.jar:JSVC_JAR" \
org.apache.commons.daemon.support.DaemonWrapper \
-start org.jboss.modules.Main -start-method main \
-mp EAP_HOME/modules org.jboss.as.process-controller \
-jboss-home EAP_HOME -jvm "${JAVA_HOME}"/bin/java \
-mp EAP_HOME/modules -- \
-Dorg.jboss.boot.log.file=LOG_DIR/host-controller.log \
-Dlogging.configuration=file:CONF_DIR/logging.properties \
-Djboss.modules.policy-permissions \
-server -Xms64m -Xmx512m -XX:MaxPermSize=256m \
-Djava.net.preferIPv4Stack=true \
-Djboss.modules.system.pkgs=org.jboss.byteman \
-Djava.awt.headless=true -- -default-jvm "${JAVA_HOME}"/bin/java \
The following example demonstrates stopping a JBoss EAP managed domain using Jsvc:
$ JSVC_BIN \
-stop \
-outfile LOG_DIR/jsvc.out.log \
-errfile LOG_DIR/jsvc.err.log \
-pidfile LOG_DIR/jsvc.pid \
-user jboss \
-nodetach -D"[Process Controller]" -server -Xms64m \
-Xmx512m -XX:MaxPermSize=256m \
-Djava.net.preferIPv4Stack=true \
-Djboss.modules.system.pkgs=org.jboss.byteman \
-Djava.awt.headless=true \
-Dorg.jboss.boot.log.file=LOG_DIR/process-controller.log \
-Dlogging.configuration=file:CONF_DIR/logging.properties \
-Djboss.modules.policy-permissions \
-cp "EAP_HOME/jboss-modules.jar:JSVC_JAR" \
org.apache.commons.daemon.support.DaemonWrapper \
-start org.jboss.modules.Main -start-method main \
2.13. Uninstalling a JBoss EAP archive installation Copy linkLink copied to clipboard!
You can use the the archive installation method to install JBoss EAP in a single directory.
Depending on your work environment, the archive installation method might not meet the needs of your environment. You can remove the instance of JBoss EAP and any services associated with it. Thereafter, you can install JBoss EAP using a suitable installation method.
Prerequisites
- Optional: Back up any modified configuration files and deployments that may be reused.
Procedure
- Delete the installation directory to uninstall JBoss EAP.
- Delete any scripts that depend on JBoss EAP being installed on your machine.