Install WildFly on Debian 11 - Step by step guide ?
Debian
WildFly formerly known as JBoss is an application server written in Java and developed by Red Hat. WildFly is a flexible, lightweight, managed application runtime that helps you build amazing applications.
Here at Fixwebnode , as part of our Server Management Services , we regularly help our Customers to perform related Linux system application installation queries.
In this context, we shall look into how to install WildFly on Debian 11.
Table of contents [Show]
Why choose WildFly:
- The quick boot of WildFly combined with the easy-to-use Arquillian framework allows for test driven development using the real environment your code will be running in.
- Configuration in WildFly is centralized, simple and user-focused.
- WildFly is an open source community project sponsored by Red Hat(TM) and is available for use and distrubution under the LGPL v2.1 license meaning that it's available for you to download and use at no cost.
Steps to Install WildFly on Debian 11 Bullseye
1. Perform System Update
Before we install any software, it's important to make sure your system is up to date by running the following apt commands in the terminal:
$ sudo apt update
$ sudo apt upgrade
2. Install Java
WildFly (JBoss) requires Java to be installed on your server. Now run the following command to install Java :
$ sudo apt install default-jdk
Verify Java version using the following command:
$ java -version
3. Create User and Group for Wildfly
Now we create a user and group to run the Wildfly application using the following command:
$ groupadd -r wildfly
$ useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly
4. Install WildFly on the system
By default, WildFly is not available on Debian 11 base repository. Now we download the latest stable release WildFly from GitHub:
$ wget https://github.com/wildfly/wildfly/releases/download/25.0.1.Final/wildfly-25.0.1.Final.zip
Next, extract the downloaded file:
$ unzip wildfly-25.0.1.Final.zip
$ mv wildfly-25.0.1.Final /opt/wildfly
Then, change the directory ownership to user and group WildFly:
$ chown -RH wildfly:wildfly /opt/wildfly
5. Configure WildFly
Now we create a Wildfly configuration directory inside /etc using the following command below:
$ mkdir -p /etc/wildfly
After that, copy all necessary files from the Wildfly directory to the /etc/wildfly directory:
$ 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/
Next, set execution permission to all shell script files:
$ chmod +x /opt/wildfly/bin/*.sh
Finally, start and enable the Wildfly service using the following command below:
$ sudo systemctl daemon-reload
$ sudo systemctl start wildfly
$ sudo systemctl enable wildfly
6. Configure Wildfly Admin Console
By default, the Wildfly admin console is disabled. We recommended to enable it to manage the Wildfly application:
$ nano /etc/wildfly/wildfly.conf
Change the following configuration lines:
WILDFLY_BIND=127.0.0.1
WILDFLY_CONSOLE_BIND=127.0.0.1
Save and close the file then edit the Wildfly launcher script and enable the admin console:
$ nano /opt/wildfly/bin/launch.sh
Change the following configuration lines:
if [[ "$1" == "domain" ]]; then
$WILDFLY_HOME/bin/domain.sh -c $2 -b $3 -bmanagement $4
else
$WILDFLY_HOME/bin/standalone.sh -c $2 -b $3 -bmanagement $4
fi
Save and close the file then edit the Wildfly systemd file:
$ nano /etc/systemd/system/wildfly.service
Change the following configuration lines:
ExecStart=/opt/wildfly/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND $WILDFLY_CONSOLE_BIND
Finally, start and enable the Wildfly service using the following command below:
$ sudo systemctl daemon-reload
$ sudo systemctl restart wildfly
$ sudo systemctl status wildfly
7. Configure Wildfly Admin User
Now we create an admin user to access the Wildfly admin console. You can create it by running the following command below:
$ sh /opt/wildfly/bin/add-user.sh
8. Configure the Firewall
If your server is protected by a firewall and you want to access the WildFly interface from the outside of your local network you need to open port 8080:
$ sudo ufw allow 8080/tcp
How to access WildFly Web Interface ?
- Once successfully installed, open your web browser and access the WildFly using the URL https://your-IP-address:8080 .
- You will be redirected to the 'Welcome to WildFly ' page
- To access the Wildfly admin console type the URL http://your-IP-address:9990/console in your web browser.
- You will be asked to provide an admin username and password.
[Need help in fixing open-source Software Installation issues ? We can help you . ]
This article covers how a Debian administrator can install and configure Wildfly on their system. In fact, WildFly is written in Java and helps you in building great applications.