In this tutorial we will learn how to install WildFly application server. WildFly runs on top of the Java platform therefore it needs at least a Java Runtime Environment (JRE) to run. If you want to compile and build Java web applications, you will also need the Java Development Kit (JDK), which provides the necessary tools to work with the Java source code.

In the JDK landscape we can find the Oracle JDK, developed and maintained by Oracle, and OpenJDK, which relies on community contribution. We will provide an overview of how to install the JDK on Fedora using Oracle and OpenJDK binaries.

Installing OpenJDK

To install OpenJDK from the Fedora repository, rRun the following command to list available versions:

    $ dnf search openjdk

Copy the version of OpenJDK you want to install.

Run the following command to install OpenJDK:

$ sudo dnf install <openjdk-package-name>

For example:

$ sudo dnf install java-1.8.0-openjdk.x86_64

If you have installed other versions of Java, you might need to switch the active version of Java:

# alternatives --config java

A list of installed Java versions is displayed. Choose the version you require.

Installing Oracle Java SE

To install Oracle Java SE, navigate to Oracle Java SE downloads page (https://www.oracle.com/technetwork/java/javase/downloads/index.html) and choose the version of Java you wish to use. Typically, you would navigate to the version 8 page. Accept the license agreement and download the appropriate rpm file for your systems architecture. For example, if you run 64-bit Fedora, choose the jdk-8u151-linux-x64.rpm file.

Enter the following command to install Oracle Java SE:

$ dnf install jdk-8u151-linux-x64.rpm

Once installed the JDK, you have to set the JAVA_HOME environment variable accordingly.

For Windows users: right click on the My Computer icon on your desktop and select properties. Then select the Advanced Tab contained in the Environment Variables button. Under System Variable, click New. Enter the variable name as JAVA_HOME and value the Java install path. Click OK and Click Apply Changes.

Linux users: Enter in your .profile / .bash_profile script the following (substitute with the actual JDK installation path):

export JAVA_HOME=/usr/local/jdk-9

Done with JDK installation, let’s move to the application server.

Installing WildFly

WildFly can be downloaded from http://wildfly.org/downloads. Once downloaded, the latest version, extract the archive to a folder and you are done with the installation.

$ unzip wildfly-15.0.0.Final.zip -d /some/path

Starting WildFly in Standalone mode

WildFly in the standalone mode means a WildFly instance is launched and managed on its own. You can have as many standalone WildFly instances as you like, but you will have to manage them separately. This means that every configuration, datasource, deployment, and module has to be managed once per instance.

In order to start WildFly in standalone mode, change to the bin folder of WildFly installation and execute:

$ ./standalone.sh

Starting WildFly in Domain mode

The main difference between the standalone and domain mode is about management and not about capabilities. Capabilities are determined by the profile you choose to run WildFly with.

In order to start WildFly in standalone mode, change to the bin folder of WildFly installation and execute:

$ ./domain.sh
0
0
0
s2smodern