Last Updated on February 5, 2024 by cscontents
Introduction
JBoss EAP is one of the most popular Java EE-based application server runtime platforms. It is written in Java and developed by Red Hat.
Welcome to this comprehensive guide on installing JBoss EAP (Enterprise Application Platform), a powerful and versatile Java EE application server. JBoss EAP provides a robust foundation for developing, deploying, and managing Java-based applications. This step-by-step practical guide aims to simplify the installation process, empowering you to seamlessly integrate JBoss EAP into your development environment.
In the ever-evolving landscape of Java EE, JBoss EAP stands out for its adherence to industry standards, scalability, and extensive feature set. From its support for Java EE specifications, including Servlets, JavaServer Faces (JSF), and Enterprise JavaBeans (EJB), to its robust security and management capabilities, JBoss EAP is a trusted choice for mission-critical applications.
By the end of this guide, you’ll have a fully operational JBoss EAP instance ready to host and manage your Java applications. Let’s dive into the world of enterprise-grade Java application servers.
In this article, we will see installation of JBoss EAP on a Linux (RHEL) machine.
JBoss EAP can be installed in multiple ways –
- ZIP installation (preferred) – installation binaries are in a ZIP file.
- Installer installation – installation is done from the JBoss EAP installer file
- RPM installation – using Red Hat Package Manager. This requires a subscription.
We will discuss the ZIP installation steps.
Prerequisite
- You need to have a Linux machine.
- Basic Knowledge of JBoss EAP
- Experience in using basic Linux commands.
Steps to install JBoss EAP manually
We will install JBoss EAP 7.4, you can apply similar steps for another version of JBoss. If there is a change in the major version of JBoss EAP (for example, if you install JBoss EAP 6.4), then you need to follow the official document from Red Hat and make the changes in the steps.
We will perform the steps as root user.
Step 1: Log into the Linux machine
This is the first step; log into the VM on which JBoss EAP will be installed.
Step 2: Download the binaries
Download the JBoss EAP binaries.
- To download the binaries, we need to create an account on Red Hat Customer Portal
- Once we create an account and log in, then we can download the binaries and put them in some repository like Nexus, JFrog artifactory, etc.
- And finally, we can use the curl command to download it from the repository.
In our case, we have already downloaded it in the /opt
directory.
[root@RHEL01 opt]# ls jboss-eap-7.4.zip jdk-18.0.2.1
Curl command to download,
curl -u “user:password” -X GET “URL_of_JBoss_EAP” -o jboss-eap-7.4.zip
Step 3: Unzip the binaries
After downloading the ZIP file, we need to unzip it.
Command to unzip,
[root@RHEL01 opt]# unzip jboss-eap-7.4.zip
After unzipping it will create a new folder.
[root@RHEL01 opt]# ls jboss-eap-7.4 jboss-eap-7.4.zip jdk-18.0.2.1
Step 4: Create a user for JBoss EAP
We need to create a user for JBoss EAP to run.
[root@RHEL01 opt]# useradd jboss-user
After creating the jboss user, we need to change the owner & group of the JBoss EAP folder.
[root@RHEL01 opt]# chown -R jboss-user:jboss-user jboss-eap-7.4/
Step 5: Edit the JBoss EAP configuration file
We need to edit the /opt/jboss-eap-7.4/bin/init.d/jboss-eap.conf
file. The below lines need to be added –
JAVA_HOME=/opt/jdk-18.0.2.1
JBOSS_HOME=/opt/jboss-eap-7.4
JBOSS_USER=jboss-user
You need to modify the above values according to your environment. After adding the above lines, save the file.
If you want to install Java through automation, then head over to the below article –
Automation of Java installation – using Ansible
Step 6: Update /etc/profile file
Now we need to edit the /etc/profile file. We need to add the below line.
export JBOSS_HOME=/opt/jboss-eap-7.4
export PATH=$PATH:$JBOSS_HOME/bin
Once you added the above line and save the file, then run the below command to reload the profile.
[root@RHEL01 ~]# source /etc/profile
Now we should get below output.
[root@RHEL01 ~]# echo $JAVA_HOME /opt/jdk-18.0.2.1 [root@RHEL01 ~]# echo $JBOSS_HOME /opt/jboss-eap-7.4
Step 7: Configuring the JBoss EAP Service file
We need to copy the below two files.
- Copy
/opt/jboss-eap-7.4/bin/init.d/jboss-eap.conf
file to/etc/default
- Copy
/opt/jboss-eap-7.4/bin/init.d/jboss-eap-rhel.sh
file to/etc/init.d/
(Before copying the jboss-eap-rhel.sh file ensure that it has executable permission)
[root@RHEL01 init.d]# pwd /opt/jboss-eap-7.4/bin/init.d [root@RHEL01 init.d]# [root@RHEL01 init.d]# ls jboss-eap.conf jboss-eap-rhel.sh [root@RHEL01 init.d]# [root@RHEL01 init.d]# cp jboss-eap.conf /etc/default/ [root@RHEL01 init.d]# cp jboss-eap-rhel.sh /etc/init.d/ [root@RHEL01 init.d]#
Next, we need to run two commands below –
[root@RHEL01 opt]# restorecon /etc/init.d/jboss-eap-rhel.sh [root@RHEL01 opt]# chkconfig --add jboss-eap-rhel.sh
Step 8: Enable & Start JBoss EAP service
Run the below commands to enable the JBoss EAP service (it will ensure that you JBoss EAP service starts automatically when the server boots up). In the below commands, ‘sudo’ must be used if you are running them as a non-root user.
sudo systemctl enable jboss-eap-rhel
To start the JBoss EAP,
sudo systemctl start jboss-eap-rhel
Step 9: Check the status of JBoss EAP
Run the below command to check the status of the JBoss EAP service.
systemctl status jboss-eap-rhel
Output:
* jboss-eap-rhel.service - SYSV: JBoss EAP startup script Loaded: loaded (/etc/rc.d/init.d/jboss-eap-rhel.sh; static; vendor preset: disabled) Active: active (running) since Sat 2022-11-26 07:24:02 UTC; 3h 25min ago Docs: man:systemd-sysv-generator(8) Process: 6495 ExecStart=/etc/rc.d/init.d/jboss-eap-rhel.sh start (code=exited, status=0/SUCCESS) Tasks: 53 (limit: 23900) Memory: 428.0M CGroup: /system.slice/jboss-eap-rhel.service |-6514 /bin/sh /opt/jboss-eap-7.4/bin/standalone.sh -c standalone.xml `-6639 /opt/jdk-18.0.2.1/bin/java -D[Standalone] -server -Xlog:gc*:file=/opt/jboss-eap-7.4/standalone/log/gc.log:tim> Nov 26 07:23:31 RHEL01 systemd[1]: Starting SYSV: JBoss EAP startup script... Nov 26 07:23:31 RHEL01 runuser[6512]: pam_unix(runuser:session): session opened for user jboss-user by (uid=0) Nov 26 07:23:31 RHEL01 runuser[6512]: pam_unix(runuser:session): session closed for user jboss-user Nov 26 07:23:31 RHEL01 jboss-eap-rhel.sh[6495]: Starting jboss-eap: / Nov 26 07:24:02 RHEL01 jboss-eap-rhel.sh[6495]: [ OK ] Nov 26 07:24:02 RHEL01 systemd[1]: Started SYSV: JBoss EAP startup script.
This is all for now, we have installed JBoss EAP successfully.
Thank You.
If you are interested in learning DevOps, please have a look at the below articles, which will help you greatly.
- Kubernetes Series: Part 1 – Introduction to Kubernetes | Background of Kubernetes
- Kubernetes Series: Part 2 – Components of Kubernetes cluster | Kubernetes cluster in detail
- Kubernetes Series: Part 3 – What is Minikube and How to create a Kubernetes cluster (on Linux) using Minikube?
- Introduction to Ansible | High-Level Understanding of Ansible
- Basics of automation using Ansible | Automate any task
- Automation of Java installation – using Ansible
- 10 frequently used Ansible modules with example
- Jenkins Pipeline as code – High-level information
- Jenkins pipeline script to build Java applications and push artifacts into the repository
- Jenkins pipeline script to build & deploy application on web server
- What is End-to-End Monitoring of any web application, and Why do we need it?
- What is “Monitoring” in DevOps? Why do we need to Monitor App/DB servers, Transactions, etc.?
- DevOps Engineer or Software Developer Engineer which is better for you?- Let’s discuss
- How To Be A Good DevOps Engineer?
- How to do git push, git pull, git add, git commit, etc. with Bitbucket