JBoss

1 min read

Step 1: Open the Terminal

Step 2: Update repository index

sudo apt-get update

Step 3: Install the OpenJDK package from APT

sudo apt-get install default-jdk

Step 4: Create a user and group for WildFly

sudo groupadd -r wildfly

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

Step 5: Download the WildFly Installation file

Version_Number=22.0.1.Final

wget https://download.jboss.org/wildfly/$Version_Number/wildfly-$Version_Number.tar.gz -P /tmp

Step 6: Extract the WildFly tar.gz file to /opt folder

sudo tar xf /tmp/wildfly-$Version_Number.tar.gz -C /opt/

Step 7: Create a symbolic link to point to the WildFly installation directory

sudo ln -s /opt/wildfly-$Version_Number /opt/wildfly

Step 8: Give access to WildFly group and user

sudo chown -RH wildfly: /opt/wildfly

Step 9: Configure Wildfly to be run as a service

sudo mkdir -p /etc/wildfly

sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/

sudo nano /etc/wildfly/wildfly.conf

**WILDFLY_BIND=0.0.0.0**

sudo cp /opt/wildfly/docs/contrib/scripts/systemd/launch.sh /opt/wildfly/bin/

sudo sh -c 'chmod +x /opt/wildfly/bin/*.sh'

sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/

sudo systemctl daemon-reload

Step 10: Start the WildFly service

sudo systemctl start wildfly

sudo systemctl status wildfly

sudo systemctl enable wildfly

Configure WildFly

Step 1: Allow traffic on port 8080

sudo ufw allow 8080/tcp

Step 2: Create a WildFly Administrator

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

Step 3: Access and verify the successful setup of WildFly

IP address: http://192.168.1.8:8080

Managing the Administrative console remotely

sudo nano /etc/wildfly/wildfly.conf

WILDFLY_CONSOLE_BIND=0.0.0.0

sudo nano /opt/wildfly/bin/launch.sh

$WILDFLY_HOME/bin/domain.sh -c $2 -b $3 -bmanagement $4

else

$WILDFLY_HOME/bin/standalone.sh -c $2 -b $3 -bmanagement $4

sudo systemctl restart wildfly

sudo nano /etc/systemd/system/wildfly.service

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

sudo systemctl daemon-reload

sudo systemctl restart wildfly

Open the Administrative Console CLI

cd /opt/wildfly/bin/

./jboss-cli.sh --connect
Orestis Pantazos

Orestis Pantazos

DevOps Engineer