How to Install the Latest WildFly on Ubuntu 20.04

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

Introduction

WildFly (formerly known as JBoss) is an application server written in Java and developed by Red Hat. It is an open source application server for JEE applications, it is fast and lightweight and particularly efficient for web and business applications.

The technology behind WildFly is also available in JBoss Enterprise Application Platform 7.

JBoss EAP is a hardened enterprise subscription with Red Hat’s world-class support, long multi-year maintenance cycles, and exclusive content.

In this guide, we will show you how to install the latest WildFly on Ubuntu 20.04.

Also you can install wildfly on CentOS by visiting the link: How to install and configure Wildfly on CentOS 8

Wildfly Installation

Just follow the steps below to get start with Wildfly:

  • Update your Ubuntu system
sudo apt update && sudo apt upgrade
  • Wildfly is software written in Java, so we need to install java environment.
sudo apt install default-jdk
  • Create a user and group for Wildfly on the /opt/wildfy directory on our system.
sudo groupadd -r wildfly
sudo useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly
  • Download and Install Wildfly
cd /tmp
wget https://github.com/wildfly/wildfly/releases/download/26.0.0.Final/wildfly-26.0.0.Final.tar.gz

At the time of this writing, the latest version of Wildfly is 26.0.0 , To download the latest version, kindly visit the official website by pressing the button below. 

  • Extract the downloaded archive file.
 tar xvf wildfly-26.0.0.Final.tar.gz
  • Move the wildfly extracted directory to the /opt directory
sudo mv wildfly-26.0.0.Final/ /opt/wildfly
  • Change the permissions to the user and group wildfly.
sudo chown -RH wildfly: /opt/wildfly
  • Then create a WildFly directory that will store the configuration files in the /etc
sudo mkdir -p /etc/wildfly
  • Copy the Wildfly configuration file to /etc/wildfly
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/
  • Copy the launch.sh file to the /opt/wildfly/bin/
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/launch.sh /opt/wildfly/bin/
  • Make the scripts in that directory executable
sudo sh -c 'chmod +x /opt/wildfly/bi n/*.sh'
  • So copy Wildfly systemd file to the /etc/systemd/system/ directory to check, start and enable it as a service.
sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system
  • Start and enable the Wildfly service
sudo systemctl start wildfly.service
sudo systemctl enable wildfly.service
  • Also verify if Wildfly is up and running or not by checking its service status.
sudo systemctl status wildfly.service
  • So, We need to create an admin user account to manage the web console, we will do that by running add-user script as follows.
sudo /opt/wildfly/bin/add-user.sh
  • As shown above, Type a and hit enter to continue then create username and password, Also Type yes for the rest of the options.
  • Finally, Open your browser then go to http://Server_IP:8080
  • By default, the server console can only be accessed on localhost. To allow remote connections, edit the configuration file of wildfly.
sudo vim /etc/wildfly/wildfly.conf
  • Then append the line below to the file.
WILDFLY_CONSOLE_BIND=0.0.0.0
  • Also, run the below script to create an account to login to the server console.
sudo sh /opt/wildfly/bin/jboss-cli.sh --connect

You need to provide the username and password you created above.

  • Open the launch script.
sudo vim /opt/wildfly/bin/launch.sh
  • And append the lines shown below in the launch script as shown below in the screenshot.
$WILDFLY_HOME/bin/domain.sh -c $2 -b $3 -bmanagement $4
$WILDFLY_HOME/bin/standalone.sh -c $2 -b $3 -bmanagement $4
  • Open the systemd unit file of wildfly.
sudo vim /etc/systemd/system/wildfly.service
  • Append the line below to the file.
ExecStart=/opt/wildfly/bin/launch.sh $WILDFLY_MODE $WILDFLY_CONFIG $WILDFLY_BIND $WILDFLY_CONSOLE_BIND
  • Restart the systemd and the Wildfly service
sudo systemctl daemon-reload
sudo systemctl restart wildfly.service
  • Now you can access the admin console by clicking on Administration Console in the main wildfly page OR you can just go to the address http://IP_address:9900
  • Sign in with the credentials you created before.
  • You will be directed to the following dashboard.

Conclusion

That’s it..

In this guide, we illustrated how to download and install wildfly in Ubuntu 20.04.

Also read ……… How to install and configure Wildfly on CentOS 8

Thanks.

Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"
MQ-Jr
MQ-Jr
unixcop Admin

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook