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 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 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_HOME and PATH environment 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. Note You 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: For Windows Server, right-click the archive file and select Extract All . Note EAP_HOME is the top-level directory for the JBoss EAP installation. The directory is created by extracting the archive. Additional resources See Setting up the EAP_HOME variable in the JBoss EAP Installation Guide . For more information about authentication and authorization options, see Management Users in the JBoss EAP Configuration Guide . 2.3. JBoss EAP configuration file 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. Note 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 . Note 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 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.conf file by opening the jboss-eap.conf in 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/default directory. Copy the service startup script to the /etc/init.d directory and give it execute permissions: Add the new jboss-eap-rhel.sh service to the list of automatically started services using the chkconfig service management command: Verify that the service has been installed correctly by using one of the following commands. For Red Hat Enterprise Linux 6: For Red Hat Enterprise Linux 7 and 8: The 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: Note Red Hat Enterprise Linux 9 does not have the initscripts package in the default build. This package includes the /etc/init.d/functions file used by the jboss-eap-rhel.sh service. The /etc/init.d/functions file is required to start JBoss EAP as a service; therefore, install the initscripts package using the following command: Restart systemctl : Start JBoss EAP: Optional: To make the service start automatically when the Red Hat Enterprise Linux server starts, run the following command: Verification To check the permissions of a file, enter the ls -l command in the directory containing the file. To check that the automatic service start is enabled, enter the following command: Additional resources For more information about controlling the state of services, see Management system services in the JBoss EAP Configuring basic system settings guide . For more information about viewing error logs, see Bootup logging in the JBoss EAP Configuration Guide . 2.5. Removing JBoss EAP service on RHEL 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: For Red Hat Enterprise Linux 7 and later: Remove JBoss EAP from the list of services: Delete the configuration file and startup script: 2.6. Installing JBoss EAP archive installation as a service on Microsoft Windows Server 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. , 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 the jbcs-jsvc-<VERSION> directory: Install the service by opening the terminal and changing the directories to EAP_HOME\bin . For a list of all possible options, run service.bat without any arguments Note If you specify the /jbossuser and /jbosspass parameters, 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 install command 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: For a server in a managed domain: Use the /host parameter to specify the name of the JBoss EAP host controller being controlled by the service. You can see valid values for the name by executing ls /host in the management CLI. In the following command, replace EAP_HOST_NAME with your JBoss EAP host controller name. If you specify the /host parameter without providing a JBoss EAP host controller name, the name defaults to master . 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 . Note 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 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. Warning 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 setx command to create two system environment variables: JBOSS_HOME and NOPAUSE . Use the setx command to configure the two environment variables: Configure the path for the JBOSS_HOME variable to the JBoss EAP installation directory. The jboss-cli.bat script contains the if "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 the NOPAUSE variable. For example, setting the NOPAUSE variable to NOPAUSE=true disables status messages from appearing when a script completes. Additional resources To learn more about how to set environment variables on a Microsoft Windows Server, refer to the Microsoft Windows documentation. 2.8. Starting and stopping the JBoss EAP service on Microsoft Windows Server 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: To stop the service, at the command prompt issue the following command: 2.9. Removing JBoss EAP service on Microsoft Windows Server 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 stop command with the name of the service: At a command prompt, change directories to EAP_HOME\bin and execute the following command: 2.10. Installing and starting JBoss EAP archive installation by using Jsvc 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). Note 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. , 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: Optional: The command examples for using Jsvc to start JBoss EAP assume that a jboss user has been created. If you have not already created a user for JBoss EAP, run the following commands to create the jboss user and group: Additional resources To learn more about controlling JBoss Core Services, see Configuring the Apache HTTP Server Installation in the Apache HTTP Server Installation Guide . 2.11. Jsvc commands to start or stop JBoss EAP as a standalone server 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. Table 2.1. File Locations of Paths File Reference in Instructions File Location JSVC_BIN EAP_HOME /../jbcs-jsvc- <VERSION> /sbin/jsvc JSVC_JAR EAP_HOME /../jbcs-jsvc- <VERSION> /lib/commons-daemon.jar CONF_DIR EAP_HOME /standalone/configuration LOG_DIR EAP_HOME /standalone/log The following example demonstrates starting a standalone JBoss EAP server using Jsvc with a JSVC_BIN \ path: The following example demonstrates stopping a standalone JBoss EAP server using Jsvc with a JSVC_BIN \ path: 2.12. Jsvc commands to start or stop JBoss EAP on a managed domain 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. Table 2.2. File Locations of Paths File Reference in Instructions File Location JSVC_BIN EAP_HOME /../jbcs-jsvc- <VERSION> /sbin/jsvc JSVC_JAR EAP_HOME /../jbcs-jsvc- <VERSION> /lib/commons-daemon.jar CONF_DIR EAP_HOME /domain/configuration LOG_DIR EAP_HOME /domain/log 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: The following example demonstrates stopping a JBoss EAP managed domain using Jsvc: 2.13. Uninstalling a JBoss EAP archive installation 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.

Commands:
unzip jboss-eap-7.4.0.zip
sudo cp EAP_HOME /bin/init.d/jboss-eap.conf /etc/default
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
sudo chkconfig --add jboss-eap-rhel.sh
sudo service jboss-eap-rhel.sh start
sudo service jboss-eap-rhel start
sudo dnf install initscripts
sudo systemctl daemon-reload
sudo service jboss-eap-rhel start
sudo chkconfig jboss-eap-rhel.sh on
sudo chkconfig --list jboss-eap-rhel.sh
sudo service jboss-eap-rhel.sh stop
sudo service jboss-eap-rhel stop
sudo chkconfig --del jboss-eap-rhel.sh
sudo rm /etc/init.d/jboss-eap-rhel.sh sudo rm /etc/default/jboss-eap.conf
C:\Program Files ├── jboss-eap-7.4 │ ├── bin │ └── └── jbcs-jsvc- <VERSION>
service.bat install /loglevel INFO
service.bat install /host EAP_HOST_NAME /loglevel INFO
net start JBossEAP7
net stop JBossEAP7
net stop JBossEAP7
service.bat uninstall
/var/opt/ ├── jboss-eap-7.4 │ ├── bin │ └── └── jbcs-jsvc- <VERSION>
groupadd -f -g 185 -r jboss useradd -r -u 185 -g jboss -d EAP_HOME -s /sbin/nologin -c "JBoss" jboss
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
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
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 "USD{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 "USD{JAVA_HOME}"/bin/java \
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 \