In this article, Luigi Fugaro, author of the book Wildfly Cookbook says that the JBoss.org community is a huge community, where people all over the world develop, test, and document pieces of code. There are a lot of projects in there, not just JBoss AS, which is now WildFly. I can mention a few: Infinispan, Undertow, PicketLink, Arquillian, HornetQ, RESTeasy, AeroGear, and Vert.X. For a complete list of all projects, visit http://www.jboss.org/projects/.
(For more resources related to this topic, see here.)
Despite marketing reasons, as there is no preferred project, the community wanted to change the name of the JBoss AS project to something different, which would not collide with the community name. There was also another reason, which was about the JBoss Red Hat supported version named JBoss Enterprise Application Platform (EAP). This was another point toward replacing the JBoss AS name.
WildFly runs on top of the Java platform. It needs at least Java Runtime Environment (JRE) version 1.7 to run (further reference to version 1.7 and 7 should be considered equal; the same applies to 1.8 and 8 as well), but it also works perfectly with latest JRE version 8.
As we will also need to compile and build Java web applications, we will need the Java Development Kit (JDK), which gives the necessary tools to work with the Java source code. In the JDK panorama, we can find the Oracle JDK, developed and maintained by Oracle, and OpenJDK, which relies on contributions by the community.
Nevertheless, since April 2015, Oracle no longer posts updates of Java SE 7 to its public download sites as mentioned at http://www.oracle.com/technetwork/java/javase/downloads/eol-135779.html. Also, bear in mind that Java Critical Patch Update is released on a quarterly basis; therefore, for reasons of stability and feature support, we will use the Oracle JDK 8, which is freely available for download at http://www.oracle.com/technetwork/java/javase/downloads/index.html.
While writing the book, the latest stable Oracle JDK is version 1.8.0_31 (8u31). From here on, every reference to Java Virtual Machine (JVM), Java, JRE, and JDK will be intended to be to Oracle JDK 1.8.0_31. To keep things simple, if you don't mind, use that same version.
In addition to the JDK, we will need Apache Maven 3, which is a build tool for Java projects. It is freely available for download at http://maven.apache.org/download.cgi. A generic download link can be found at http://www.us.apache.org/dist/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz.
In this article, you will learn how to get and install WildFly. As always in the open source world, you can do the same thing in different ways. WildFly can be installed using your preferred software manager or by downloading the bundle provided by the http://wildfly.org/ site. Going as per the JDK, we will choose the second way.
Just open your favorite browser and point it to http://wildfly.org/downloads/. You should see a page similar to this one:
WildFly's download page
Now download the latest version into our WFC folder.
$ cd ~/WFC && tar zx wildfly-9.0.0.Beta2.tar.gz
The preceding command will first point to our WildFly Cookbook folder; it will then extract the WildFly archive from it. Listing our WFC folder, we should find the newly created WildFly folder named wildfly-9.0.0.Beta2.
$ cd ~/WFC && mv wildfly-9.0.0.Beta2 wildfly
By the way, WildFly can be also installed using YUM, Fedora's traditional software manager.
In production environment, you will not place the WildFly installation directory in the home folder of a specific user; rather, you will place it in different paths, relative to the context you are working on.
export JBOSS_HOME=~/WFC/wildfly export WILDFLY_HOME=$JBOSS_HOME
$ source ~/.bash_profile
Your .bash_profile file should look as follows:
Now that we have finished installing WildFly, let's look into its folders.
$ cd $WILDFLY_HOME $ pwd && ls -la
The output of your commands should be similar to the following image:
WildFly's folders overview
The preceding image depicts WildFly's folder on the filesystem. Each is outlined in the following table:
Folder's name |
Description |
appclient |
These are configuration files, deployment content, and writable areas used by the application client container run from this installation. |
bin |
These are the startup scripts; startup configuration files, and various command-line utilities, such as Vault, add-user, and Java diagnostic report available for the Unix and Windows environments. |
bin/client |
This contains a client JAR for use by non maven-based clients. |
docs/schema |
These are XML schema definition files. |
docs/examples/configs |
These are example configuration files representing specific use cases. |
domain |
These are configuration files, deployment content, and writable areas used by the domain mode processes run from this installation. |
modules |
WildFly is based on a modular class-loading architecture. The various modules used in the server are stored here. |
standalone |
These are configuration files, deployment content, and writable areas used by the single standalone server run from this installation. |
welcome-content |
This is the default Welcome Page content. |
In the preceding table, I've emphasized the domain and standalone folders, which are those that determine in which mode WildFly will run: standalone or domain.
From here on, whenever mentioned, WildFly's home will be intended as $WILDFLY_HOME.
In this article, we covered the software prerequisites of WildFly, downloading and installing WildFly, and an overview of WildFly's folder structure.
Further resources on this subject: