This tutorial will teach you how to install the latest release of WildFly application server on a Linux box.
The pre-requisite to install WildFly is that you have available a JDK on your machine.
The most heavily tested SE options for WildFly are still Java 11 and Java 8, because both WildFly and its component library projects have many years of testing on those versions. Since WildFly 25 it is however supported also the latest Java 17 version.
The JDK is available from different sources. Starting from JDK 11, the most popular options are:
Using the Oracle JDK with a commercial license. This is the ideal option for those using the Oracle JDK as part of an Oracle product or service, or who do not wish to use open source software. This option is available at: http://www.oracle.com/technetwork/java/javase/downloads/index.html.
Using the OpenJDK available with open source GNU General Public License v2 JDK implementation at: https://openjdk.java.net/
In this section, we will show some common options to install
openjdk on a Linux machine.
On a RHEL / Fedora machine you would typically install it as follows:
sudo dnf install java-11-openjdk-devel
On Ubuntu, on the other hand, you can use the apt-get tool to install it:
sudo apt-get install openjdk-11-jdk
Once installed the JDK, you have to set the JAVA_HOME environment variable accordingly. Enter in your
.bash_profile script the following (substitute with the actual JDK installation path):
# Path could be different in your jdk installation export JAVA_HOME=/usr/lib/jvm/open-jdk
Done with JDK installation, let’s move to the application server.
- WildFly Preview EE 9 Distribution: which allows the deployment of both Jakarta EE 8 and Jakarta EE 9 applications. This distribution targets the cloud environment thanks to its smaller memory footprint.
- Jakarta EE Full & Web Distribution: which is the stable long term version of WildFly and allows the deployment of Jakarta EE 8 applications.
- Servlet-Only Distribution: which allows the deployment of Servlet based applications, within the core WildFly container.
If you prefer, you can also install WildFly from the command line as follows (replace the server version with the one you want to install):
Once downloaded WildFly, extract the archive to a folder and you are done with the installation.
$ unzip wildfly-27.0.0.Alpha4.zip
The application server ships with two server modes: standalone and domain mode. The difference between the two modes is not about the capabilities available but is related to the management of the application server: in particular, the domain mode is used when you run several instances of WildFly and you want a single point where you can manage servers and their configuration.
In order to start WildFly using the default configuration in “standalone” mode, change the directory to
$JBOSS_HOME/bin and execute:
You can verify that the server is running by pointing to http://localhost:8080
To start the application server using the default configuration in “domain” mode, change directory to
$JBOSS_HOME/bin and execute:
Further reading: To learn more about WildFly configuration, check the articles included in the “Core Configuration” section.