Step by Step to Install & Configure WildFly (JBoss) on Ubuntu 20.04

WildFly is a free & open source application server.It is also known as JBoss AS, or JBoss.WildFly is a Java web application platform,written in java.It provides a java platform with JVM extension & complate runtime environment.We can easily create & manage the databases.

There are few steps to install & configure WildFly (JBoss) on ubuntu:

Step 1: Update the system.

apt-get update

Step 2: Install Java.

apt-get install default-jdk

  • Check the Java version.

java -version

  • Here is the command output.

Step 3: Add a user & group for wildfly.

groupadd -r wildfly
useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly

Step 4: Download the WildFly using wget.

cd /tmp
wget https://download.jboss.org/wildfly/22.0.1.Final/wildfly-22.0.1.Final.tar.gz

  • Here is the command output.

  • Extract the downloaded file.

tar xvf wildfly-22.0.1.Final.tar.gz

  • Move the extracted folder to /opt/

mv wildfly-22.0.1.Final/ /opt/wildfly

  • Provide the following permission:

chown -RH wildfly: /opt/wildfly

Step 5: Create a folder.

mkdir -p /etc/wildfly

  • Copy the following files one place to another & provide executable permission to script files under /opt/wildfly/bin/ folder.

cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/
cp /opt/wildfly/docs/contrib/scripts/systemd/launch.sh /opt/wildfly/bin/
sh -c 'chmod +x /opt/wildfly/bin/*.sh'
cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/

Step 6: Start & Enable the WildFly service.

systemctl start wildfly.service
systemctl enable wildfly.service

  • Check the status of WildFly.

systemctl status wildfly.service

  • Here is the command output.

Step 7: Set the WildFly Admin login credentials.

/opt/wildfly/bin/add-user.sh

  • Here is the command output.

  • Type a.
  • Provide a user-name & password.
  • Here is the output.

Step 8: Open the following port number on UFW firewall.

ufw allow 8080/tcp
ufw allow 9990/tcp

  • Here is the command output.

Step 9: Access the WildFly web-interface.

http://server-ip:8080

  • Here is the output.
  • Click on Administration console.

  • We are not able to login Wildfly admin console.

Configure & Manage the WildFly administrative console remotely.

Step 10: Open the /etc/wildfly/wildfly.conf file.

vim /etc/wildfly/wildfly.conf

  • Add the following line:

#WildFly Console bind
WILDFLY_CONSOLE_BIND=0.0.0.0

  • Here is the command output.

  • Run the following script to connect admin console.

sh /opt/wildfly/bin/jboss-cli.sh --connect

  • Here is the command output.

  • Open the launch script & edit the following lines:

vim /opt/wildfly/bin/launch.sh

#!/bin/bash
if [ "x$WILDFLY_HOME" = "x" ]; then
WILDFLY_HOME="/opt/wildfly"
fi
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

Step 11: Restart the WildFly service.

systemctl restart wildfly.service

Step 12: Open the wildfly service file.

vim /etc/systemd/system/wildfly.service

  • Edit the following line:

ExecStart=/opt/wildfly/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND $WILDFLY_CONSOLE_BIND

  • Reload & Restart the WildFly service.

systemctl daemon-reload
systemctl restart wildfly.service

Step 13: Now Open the WildFly Admin console.

http://server-ip:9990/console

  • Here is the command output.
  • Provide the user-name & password.

  • Now WildFly Admin console is Ready.

 

Leave a Reply

Your email address will not be published.