Learn how to install WildFly on CentOS 8 with our step-by-step guide. Set up this powerful Java application server easily and efficiently on your CentOS 8 system. #centlinux #linux #wildfly
JBoss WildFly, commonly referred to as just WildFly, is an open-source application server developed by Red Hat. It is designed to deploy and manage Java-based web applications and enterprise applications. Here are some key features and aspects of WildFly:
Overall, WildFly is known for its flexibility, performance, and adherence to Java EE standards, making it a popular choice for developers and organizations building Java-based applications.
WildFly and Apache Tomcat are both popular Java-based application servers, but they serve different purposes and cater to different needs. Here’s a comparison to highlight their key differences:
Recommended Books: Red Hat RHCE 8 (EX294) Cert Guide (Certification Guide) 1st Edition (PAID LINK)
Recommended Online Training: Learn Bash Shell in Linux for Beginners
We are using a minimal Red Hat Enterprise Linux 8 virtual machine with following specifications.
Read Also: How to install WildFly on CentOS 7
Connect with wildfly-01.centlinux.com as root user by using a ssh client.
Build cache for enabled yum repositories on your Linux server.
# dnf makecache
Execute following command to update your Linux operating system.
# dnf update -y
If the above command updates your Linux Kernel then reboot your Linux server with the newly installed Kernel.
# reboot
After reboot, verify the version of Linux Kernel and Linux operating system.
# uname -r 4.18.0-348.7.1.el8_5.x86_64 # cat /etc/redhat-release Red Hat Enterprise Linux release 8.5 (Ootpa)
JBoss WildFly is written in Java programming language. Therefore, it requires Java Runtime Environment for execution.
You can easily install OpenJDK, that is available through standard yum repositories.
# dnf install -y java-11-openjdk-devel
After installation, verify that the java command is available by querying its version as follows.
# java --version openjdk 11.0.13 2021-10-19 LTS OpenJDK Runtime Environment 18.9 (build 11.0.13+8-LTS) OpenJDK 64-Bit Server VM 18.9 (build 11.0.13+8-LTS, mixed mode, sharing)
You may also need wget command to download WildFly installation file. Therefore, install it now by using dnf command.
# dnf install -y wget
Create a Linux user and group to own WildFly software and processes.
# groupadd -r wildfly # useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly
WildFly is a free and open source software. Therefore, you can download latest WildFly software from their official website.
Copy the URL of your required version of WildFly software and use it with wget command to download WildFly straight from the Linux CLI.
# wget https://github.com/wildfly/wildfly/releases/download/26.0.0.Final/wildfly-26.0.0.Final.tar.gz --2022-01-07 22:40:20-- https://github.com/wildfly/wildfly/releases/download/26.0.0.Final/wildfly-26.0.0.Final.tar.gz Resolving github.com (github.com)... 13.234.176.102 Connecting to github.com (github.com)|13.234.176.102|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 217583886 (208M) [application/octet-stream] Saving to: ‘wildfly-26.0.0.Final.tar.gz’ wildfly-26.0.0.Fina 100%[===================>] 207.50M 1.05MB/s in 3m 23s 2022-01-07 22:43:45 (1.02 MB/s) - ‘wildfly-26.0.0.Final.tar.gz’ saved [217583886/217583886]
We have down TGZ file, howerver you can also download ZIP file of WildFly software.
Execute following tar command to extract WildFly TGZ file to the desired location.
# tar xf wildfly-26.0.0.Final.tar.gz -C /opt/
Create a soft link of WildFly software directory for convenience.
# ln -s /opt/wildfly-26.0.0.Final/ /opt/wildfly
Adjust ownership of extracted files as follows.
# chown -RH wildfly: /opt/wildfly
Create a directory for WildFly configuration files.
# mkdir -p /etc/wildfly
WildFly software directory contains sample configuration files. You can use these configuration files to configure a Systemd service for your JBoss WildFly server.
# cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/ # cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/ # cp /opt/wildfly/docs/contrib/scripts/systemd/launch.sh /opt/wildfly/bin/
Grant execution privileges on WildFly scripts.
# chmod +x /opt/wildfly/bin/*.sh
Enable and start WildFly service.
# systemctl daemon-reload # systemctl enable --now wildfly.service Created symlink /etc/systemd/system/multi-user.target.wants/wildfly.service → /etc/systemd/system/wildfly.service.
WildFly default service port is 8080/tcp and the Management Console uses 9990/tcp.
Therefore, you are required to allow these service ports in Linux Firewall to make the WildFly services accessible across the network.
# firewall-cmd --permanent --add-port={8080,9990}/tcp success # firewall-cmd --reload success
WildFly management console does not has a default user. Therefore, you must create an Admin user for using WildFly management console.
You can execute add-user.sh script to create a user for WildFly management console.
# /opt/wildfly/bin/add-user.sh What type of user do you wish to add? a) Management User (mgmt-users.properties) b) Application User (application-users.properties) (a): Enter the details of the new user to add. Using realm 'ManagementRealm' as discovered from the existing property files. Username : centlinux Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file. - The password should be different from the username - The password should not be one of the following restricted values {root, admin, administrator} - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s) Password : Re-enter Password : What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]: About to add user 'centlinux' for realm 'ManagementRealm' Is this correct yes/no? yes Added user 'centlinux' to file '/opt/wildfly-26.0.0.Final/standalone/configuration/mgmt-users.properties' Added user 'centlinux' to file '/opt/wildfly-26.0.0.Final/domain/configuration/mgmt-users.properties' Added user 'centlinux' with groups to file '/opt/wildfly-26.0.0.Final/standalone/configuration/mgmt-groups.properties' Added user 'centlinux' with groups to file '/opt/wildfly-26.0.0.Final/domain/configuration/mgmt-groups.properties' Is this new user going to be used for one AS process to connect to another AS process? e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server Jakarta Enterprise Beans calls. yes/no? yes To represent the user add the following to the server-identities definition <secret value="QWhtZXJAMTIzNA==" />
WildFly management console is by default configured on localhost (127.0.0.1) interface. Therefore, it is not accessible across the network.
You need to edit following configuration file to configure WildFly management console interface.
Use vim text editor to edit standalone.xml file.
# vi /opt/wildfly/standalone/configuration/standalone.xml
Locate following line in this file.
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
Remove interface=”management” then save and exit from vim text editor.
<socket-binding name="management-http" port="${jboss.management.http.port:9990}"/>
Restart WildFly service to apply changes.
# systemctl restart wildfly.service
Open http://wildfly-01.centlinux.com:8080 in a web browser.
Click on “Administration Console” and login as the admin user that you have created in previous steps.
After successful login, you have reached at the dashboard of WildFly Management Console.
Installing WildFly on CentOS 8 can significantly enhance your ability to deploy and manage Java-based applications efficiently. With the right steps and guidance, the process can be straightforward and rewarding. If you need personalized assistance or a detailed guide tailored to your specific needs, I offer professional services to help you get WildFly up and running smoothly.
For expert help on installing WildFly on CentOS 8, check out my Fiverr service where I provide comprehensive support and step-by-step guidance to ensure a successful setup. Let’s make your deployment process hassle-free and efficient!
Puppy Linux is a fast, lightweight OS designed for speed and simplicity, perfect for old…
Learn how to change Apache document root in Linux by following this step-by-step guide. Adjust…
Discover how to change Apache port in Linux easily. Follow our simple guide to modify…
Learn how to create a virtual host in Apache Server with this comprehensive guide. Set…
Discover 10 practical tasks for the RHCSA exam with step-by-step solutions. Boost your Linux skills…
Discover the ultimate Fail2ban configuration guide. Learn how to set up, customize, and optimize Fail2ban…
This website uses cookies.