There are four main methods to install JBoss EAP 7:
JBoss EAP 7 is distributed as a zip file that you can extract and execute on an operating system (OS) with Java 8, Java 11, or Java 17 installed. It contains all the libraries, configuration files, and scripts needed to start JBoss EAP, without further customization.
JBoss EAP 7 is available as an RPM package for users with a valid subscription to the JBoss Enterprise Application Platform sub-channel, in the JBoss Enterprise Application Platform group.
The yum command downloads all the RPMs to the host OS, and automatically installs all the files needed to start and manage JBoss EAP.
The RPM installation method is only valid for Red Hat Enterprise Linux (RHEL) operating system.
It is a Java based application that is responsible for providing a step-by-step way to customize the environment setup. Due to its portable nature, you can use it on multiple platforms and it requires Java 8 installed on the host OS. It can be run using either a graphical interface or a text based console. Due to its flexible nature, the installer can install JBoss EAP by using a response file, with all the options passed as an XML file. This allows the installation of JBoss EAP 7 on multiple hosts in an automated fashion.
JBoss EAP can run on containerized platforms, such us OpenShift. On containerized platforms the concept of middleware is different, because each application or service within the container platform is self-contained. A traditional Java application server serves more than one application, but a JBoss EAP running in a container serves only one application. Thus, the concept of installation of JBoss EAP is mixed with the building of an application.
You can create JBoss EAP applications for OpenShift by using three methods:
OpenShift templates for JBoss EAP
Helm chart for JBoss EAP
The JBoss EAP operator
These installation methods are out of scope for this course.
The JBoss EAP installation directory is referred throughout this book as JBOSS_HOME.
This is also the name of an OS environment variable used by the JBoss EAP startup scripts and other utility scripts to find its installation directory and also find configuration files, log files, and others.
You can use automation tools, such as Ansible, to install JBoss EAP 7 on multiple servers with uniform settings in large deployment scenarios.
Starting from Ansible 2.9, Red Hat provides the redhat.eap Ansible collections to install, configure, and deploy JBoss EAP in an automated way.
Refer to the References section to learn more about using Ansible to install, and manage JBoss EAP.
To install JBoss EAP, use one of the following commands:
The simplest way to install JBoss EAP is by extracting the ZIP file. This is the usual package choice for developers because no configuration is needed. To unzip the JBoss EAP 7 zip file, run the following command in a terminal:
$ unzip jboss-eap-7.4.0.zipTo install JBoss EAP 7 on a RHEL machine, using the RPM method, run the following command in a terminal either as root or by using the sudo command:
# yum groupinstall jboss-eap7To start the JBoss EAP Installer, enter the command:
$ java -jar jboss-eap-7.4.0-installer.jarThe following screen capture shows the JBoss EAP installer in GUI mode:
If no GUI access is available on a machine and it can only be accessed via a terminal, then you can execute the JBoss EAP Installer from a console. Both the graphical installer and the text console based installer follow the same set of steps. To launch the installer in console mode, run :
#java -jar jboss-eap-7.4.0-installer.jar -consoleSelect language : 0: eng 1: chn 2: deu 3: fra 4: jpn 5: por 6: spa Please choose [0] : END USER LICENSE AGREEMENT JBOSS(r) ENTERPRISE MIDDLEWARE(tm) ... press 1 to continue, 2 to quit, 3 to redisplay1Select the installation path: [/opt/jboss-eap-7.4]
Whether using the GUI or the console, the EAP installer creates an XML document that saves all settings. This XML document can be saved to repeat an installation without any human interaction:
$ java -jar jboss-eap-7.4.0-installer.jar myinstall.xmlReplace myinstall.xml with the appropriate name of your auto-install XML file.
This command does not require any human input, allowing you to install a custom JBoss EAP 7 instance using scripting.
Red Hat provides cumulative patches for minor version updates. For example, you can upgrade from JBoss EAP 7.4.0 to 7.4.11. You can download the cumulative patches from the Red Hat Customer Portal. The patches can be applied from the Management Console, or from the JBoss CLI tool. For example, this command applies a patch on a stopped JBoss EAP instance.
[user@host jboss-eap-7.4]$ bin/jboss-cli.sh --command="patch apply /tmp/jboss-eap-7.4.11-patch.zipThe JBoss CLI tool is explained elsewhere in this course.
You can also patch and upgrade a JBoss EAP installation from a major version to another. For example, you can upgrade from JBoss EAP 6.4 to 7.0, or from 7.3 to 7.4. The major upgrade is different depending on the installation method that you use. A major upgrade involves reinstalling the JBoss EAP binaries, configuring the new version to be the same as the old version, and redeploying the applications.
Refer to the references section to learn more about major upgrades of JBoss EAP.
Red Hat provides tools to assist you in migrating Jakarta EE applications and the JBoss EAP where they run.
The JBoss Server Migration Tool is included in the JBOSS_HOME/bin directory, and is the preferred way to update the JBoss EAP configuration files, without losing your customizations.
The Migration Toolkit for Applications (MTA) is a rule-based tool that can help developers and system administrators in the migration and modernization of Java applications. MTA inspects the application artifacts and generates a report with the main technical needs to perform a migration of a Java application.
The following is a non-exhaustive list of migration paths that MTA supports:
Upgrading the applications, and the platforms to the latest release of JBoss EAP.
Migrating applications from other application server vendors to JBoss EAP.
Containerizing applications and making them cloud-ready.
Migrating from Java Spring Boot to Quarkus.
Migrating and updating from Java SE vendors, and versions
Deploying JBoss EAP and Spring Boot applications to Microsoft Azure.
Refer to the references section to learn more about MTA.
The process to uninstall JBoss EAP 7 depends on the installation method used:
If JBoss EAP 7 was installed by using the zip file, then delete the top level directory where it was unzipped.
# rm -rf jboss-eap-7.4To uninstall JBoss EAP 7 on a RHEL machine that was installed using the RPM method, run the following command in a terminal either as root or using the sudo command:
# yum groupremove jboss-eap7If JBoss EAP 7 was installed using the JBoss EAP 7 GUI Installer or console, navigate to $JBOSS_HOME/uninstaller and run the uninstaller:
# java -jar uninstaller.jarYou can use the provided Unix shell scripts and Windows to start JBoss EAP 7 as either a standalone server, or in domain mode.
The standalone.sh, and domain.sh files are in the bin directory in the JBoss EAP installation directory.
If the JBOSS_HOME variable is not defined, it is assumed to point to the parent directory of the script.
To start JBoss EAP with default configurations, run the startup script specific for the desired operating mode:
For a standalone server:
$ ${JBOSS_HOME}/bin/standalone.shFor a managed domain host controller which is the primary controller:
$ ${JBOSS_HOME}/bin/domain.shTo stop JBoss EAP, there are three methods:
Interrupt the server instance, or host controller process by using Ctrl+C
Stop the server instance, or host controller process by using the kill
command, or a GUI task manager.
Use the management CLI.
After JBoss EAP starts, it listens for HTTP connections on port 8080. You can use a web browser to visit the http://localhost:8080 an its welcome page.
A fresh JBoss EAP installation has the following directories under JBOSS_HOME:
[user@host jboss-eap-7.4]$ tree -d -L 2
.
├── appclient
│ └── configuration
├── bin
│ ├── client
│ └── init.d
├── docs
│ ├── examples
│ ├── licenses
│ └── schema
├── domain
│ ├── configuration
│ └── tmp
├── migration
│ └── configuration
├── modules
│ └── system
├── standalone
│ ├── configuration
│ ├── deployments
│ ├── lib
│ └── tmp
└── welcome-content
├── fonts
└── imagesThe following bullets describe the main directories:
bin: Contains scripts used for starting JBoss EAP in managed domain and standalone server, start the management CLI, and other utility functions for developers.
domain: Contains configuration and data files for running JBoss EAP in a managed domain.
standalone: Contains the configuration and data files for running a JBoss EAP standalone server.
modules: Contains the code that implement Jakarta EE services in JBoss EAP.
The contents of these and other JBoss EAP installation directories are examined throughout the remainder of this book.
For now, notice that the domain, and standalone directories have similar structure, including a configuration directory that contains the XML configuration files for each operating mode, and a logs directory that might be useful in troubleshooting startup failures.
A developer can install JBoss EAP 7 into their personal home directory and run a standalone server instance or host controller under their own OS user account. For production environments, there are recommended practices to follow for any server-based software.
Please check with the senior system administrator for the specific set of recommended practices for your organization. They probably include at least the following ones for GNU/Linux operating systems:
Install to a directory reserved for third-party applications such as /opt.
The owner of the JBoss EAP installation directory and its files should be a system account, a user who is not allowed to log in to either the local server machine console or to remote sessions.
Starting JBoss EAP manually requires using either the sudo, or su commands to run the server startup script, using the system account created exclusively for JBoss EAP.
JBoss EAP standalone server instances and host controllers must start as system services, in the background, not tied to a user session. For RHEL 9, this means running JBoss EAP by using a System V init script.
Red Hat does not provide native systemctl compatible scripts. The only supported method to start JBoss EAP as a service in a RHEL system is by using the System V init script. To learn more about systemctl scripts for JBoss EAP, refer to the Knowledge Base article in the references section in this lecture.
You can add the JBoss EAP system service to RHEL by performing the following steps:
The JBoss EAP installation directory JBOSS_HOME/bin/init.d contains the jboss-eap-rhel.sh sample System V init script.
That script was written for RHEL 6, but it is still valid for more modern versions of RHEL, and you can adapt it for other Unix OSes.
The same directory also contains the jboss-eap.conf configuration file.
That file defines parameters specific for a particular installation.
For example, the file defines the correct value for the JBOSS_HOME directory.
Copy the init script to /etc/init.d, and the script configuration file to /etc/default.
Reload the systemctl in-memory configuration:
# systemctl reload-daemonUse the systemctl command to start JBoss EAP.
For example:
# systemctl start jboss-eap-rhel.shYou can use the systemctl command to stop JBoss EAP.
For example:
# systemctl stop jboss-eap-rhel.shFinally, you can use the systemctl command to automatically start JBoss EAP during the operating system boot.
# systemctl enable jboss-eap-rhel.shUsing systemctl and init scripts is a common Linux system administration task.
Please, inspect the RHEL 9 product documentation for more details, or ask for help from an experienced Unix system administrator.
The most common recommended practices just described are already implemented by the RPM installation method, but have to be implemented manually for the ZIP file method and the JAR installer.
JBoss EAP 7 also includes batch scripts and executable files for installation and running as a Windows service. The Windows installation is not covered in this course.
To download JBoss EAP 7 and the cumulative patches, navigate to the Red Hat Customer Portal download section at https://access.redhat.com/jbossnetwork/restricted/listSoftware.html?product=appplatform&downloadType=distributions
For more information about the installation methods of JBoss EAP, refer to the Installation Guide in the Red Hat JBoss EAP 7 documentation at https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4/html-single/installation_guide
For more information about how to configure JBoss EAP as a RHEL systemd service, refer to the Configuring JBoss EAP archive installation as a service on Red Hat Enterprise Linux section in the Installation Guide in the Red Hat JBoss EAP 7 documentation at https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4/html-single/installation_guide/index#configuring-jboss-eap-archive-installation-as-a-service-on-rhel_default
Knowledge Base: How to manage the JBoss EAP 7 configuration using Ansible?
Knowledge Base: Ansible Automation Platform Certified Content
Source code repository for the redhat.eap Ansible Collection
Why Kubernetes is The New Application Server
For more information about the JBoss Server Migration Tool, refer to the Use the JBoss Server Migration Tool to Migrate Server Configurations section in the Migration Guide in the Red Hat JBoss EAP 7 documentation at https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4/html-single/migration_guide/index#migration_tool_server_migration_tool
For more information about Migration Toolkit for Applications, refer to the documentation at https://access.redhat.com/documentation/en-us/migration_toolkit_for_applications/6.1/html-single/introduction_to_the_migration_toolkit_for_applications
For more information about recommended practices for performance tuning, refer to the Performance Tuning Guide in the Red Hat JBoss EAP 7 documentation at https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4/html-single/performance_tuning_guide/index