Tag Archives: how to install wildfly

How to Run Wildfly on CentOS 7

WildFly, formerly known as JBoss AS, or simply JBoss, is an application server authored by JBoss, now developed by Red Hat. WildFly is written in Java and implements the Java Platform, Enterprise Edition (Java EE) specification. It runs on multiple platforms.

WildFly is free and open-source software, subject to the requirements of the GNU Lesser General Public License (LGPL), version 2.1.

This tutorial will show you how to install Wildfly on Centos 7.

Step 1

To run Wildfly you need Java, so we will download it now, run the command:

yum -y install java-1.8.0-openjdk

Confirm that it is installed correctly by running:

java -version

Step 2

Let’s get the firewall ready, there are two ports we need open, lets open them now, run the following commands:

sudo firewall-cmd –zone=public –add-port=8080/tcp –permanent
sudo firewall-cmd –zone=public –add-port=9990/tcp –permanent

Now reload the firewall to ensure the changes take effect:

sudo firewall-cmd –reload

Step 3

Now lets download wildfly, run the command:

wget http://download.jboss.org/wildfly/14.0.1.Final/wildfly-14.0.1.Final.tar.gz

Step 4

Now lets un-pack the tar file, run:

sudo tar -zxf wildfly-14.0.1.Final.tar.gz

Step 5

Now let’s edit some config files first we need to move to the relevant directory, run the command.

cd wildfly-14.0.1.Final/standalone/configuration

We need to edit the standalone.xml file.

We will use vi for this, run:

vi standalone.xml

look for the section:

<interfaces>
<interface name=”management”>
<inet-address value=”${jboss.bind.address.management:127.0.0.1}”/>
</interface>
<interface name=”public”>
<inet-address value=”${jboss.bind.address:127.0.0.1}”/>
</interface>
</interfaces>

Note the 127.0.0.1 we will change this to 0.0.0.0, the block of text should look like so:

<interfaces>
<interface name=”management”>
<inet-address value=”${jboss.bind.address.management:0.0.0.0}”/>
</interface>
<interface name=”public”>
<inet-address value=”${jboss.bind.address:0.0.0.0}”/>
</interface>
</interfaces>

Step 6

Now lets add a management user. First run:

cd wildfly-14.0.1.Final/bin

Next run the command:

./add-user.sh

You will be greeted with a series of prompts:

a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a):

  • Press enter for the default.

Enter the details of the new user to add.
Using realm ‘ManagementRealm’ as discovered from the existing property files.
Username:

  • Enter a Username

Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
– The password should be different from the username
– The password should not be one of the following restricted values {root, admin, administrator}
– The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
Password :

  • Enter a password.

What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]:
About to add user ‘wildfly’ for realm ‘ManagementRealm’
Is this correct yes/no

  • Type yes.

Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no?

  • Type no.

Step 7

Now we will start Wildfly, ensure that you are still in the bin directory and run the following command:

./standalone.sh

If the command is successful output should like so (You can ignore any ssl warnings):

Step 8

Lets confirm wildfly is up, open and web browser and navigate to the IP address of your CentOS server and append the port 8080 to the address, in our case it looks like so:

http://192.168.125.3:8080

You should see a screen that looks like so:

Step 9

Now let’s ensure the management interface is working, navigate to

http://192.168.125.3:9990

You should be prompted for a login, enter the username and password you set in step 6.

You should then see the Wildfly management interface.

A full video tutorial can be found here:

How to Install Wildfly on windows

“WildFly  formerly known as JBoss AS, or simply JBoss, is an application server authored by JBoss, now developed by Red Hat. WildFly is written in Java and implements the Java Platform, Enterprise Edition (Java EE) specification. It runs on multiple platforms.”

In this tutorial we will be installing Wildfly on windows server 2016, however the process should be much the same on windows 10.

Installing Java

First we will download and install Java JRE. it is available from:

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

And we downloaded the windows 64 bit version.

Once it downloads install it.

Downloading WildFly

Go to http://wildfly.org/downloads and click to download the Java EE7 Full & Web Distribution

When it downloads unzip it to your C drive.

Running WildFly for the first time.

Navigate to C:\wildfly-12.0.0.Final\bin and run standalone.ps1 in PowerShell

When WildFly has started you should see a screen similar to the below:

Now open a browser and navigate to http://localhost:8080 you should see the WildFly welcome screen:

 

  • Next minimise your browser and navigate back to  C:\wildfly-12.0.0.Final\bin.
  • Run add-user.ps1 with PowerShell by right clicking and selecting run with PowerShell

 

Add a management user by pressing enter at the below screen (it is the default option)

  • Enter the details of your user.
  • when asked “What groups do you want this user to belong to?” press enter
  • and then type yes to add the user for the realm ManagemntRealm

  • When asked; “Is this new user going to be used for one AS process to connect to another AS process?” type no
  • Return to the PowerShell window that has WildFly running and press ctrl+c to kill the process, the PowerShell window should close.
  • open a bowser and navigate to
    • http://localhost:9990
  • You will be promoted to log in, enter the username and password that you set and click ok.

  • You should now see the management console.

 

  • Minimise your browser and navigate back to the PowerShell window and stop wildly by running ctrl + c

Installing WildFly as a service.

  • navigate to C:\wildfly-12.0.0.Final\docs\contrib\scripts\
  • Copy the service directory to C:\wildfly-12.0.0.Final\bin

  • open up and admin CMD and navigate into C:\wildfly-12.0.0.Final\bin\service

Next run “service.bat install”

Next open windows Services, you should see WilDfly installed, you can now start it from here and set it to automatic.

a full video tutorial can be found here: