YouTube Icon

Code Playground.

How to Install WildFly (JBoss) on CentOS 7


How to Install WildFly (JBoss) on CentOS 7

WildFly , once known as JBoss is a cross-stage open-source application runtime written in Java that encourages you manufacture astounding applications. WildFly is adaptable, lightweight, and it depends on pluggable subsystems that can be added or eliminated varying. 

This instructional exercise discloses how to introduce WildFly application worker on CentOS 7. 


You'll should be signed in as a client with sudo admittance to have the option to introduce bundles on your CentOS framework. 

Step 1: Install Java OpenJDK

WildFly 9 requires Java SE 8 or later. In this instructional exercise we will introduce OpenJDK , the open-source execution of the Java Platform which is the default Java improvement and runtime in CentOS 7. 

Introduce the OpenJDK bundle by running: 

sudo yum install java-1.8.0-openjdk-devel

Step 2: Create a User

Running WildFly as the root client is a security hazard and not thought about best practice. 

To make another framework client and gathering named wildfly with home index/select/wildfly run: 

sudo groupadd -r wildfly
sudo useradd -r -g wildfly -d /opt/wildfly -s /sbin/nologin wildfly

Step 3: Install WildFly

At the hour of composing, the most recent form of WildFly is 16.0.0. Prior to proceeding with the subsequent stage you should check the download page for another variant. In the event that there is another form supplant the WILDFLY_VERSION variable in the order beneath. 

Download the WildFly chronicle in the/tmp registry utilizing the accompanying wget order: 

wget$WILDFLY_VERSION/wildfly-$WILDFLY_VERSION.tar.gz -P /tmp

When the download is finished, unload the tar.gz record and move it to the/pick registry: 

sudo tar xf /tmp/wildfly-$WILDFLY_VERSION.tar.gz -C /opt/

Next, make an emblematic connection wildfly that will highlight the WildFly establishment catalog: 

sudo ln -s /opt/wildfly-$WILDFLY_VERSION /opt/wildfly

WildFly will run under the wildfly client which needs to approach the WildFly establishment registry. 

Change the registry proprietorship to client and gathering wildfly with the accompanying chown order : 

sudo chown -RH wildfly: /opt/wildfly

Step 4: Configure Systemd

The WildFly bundle incorporates records important to run WildFly as an assistance. 

Start by making a registry which will hold the WildFly arrangement record: 

sudo mkdir -p /etc/wildfly


Duplicate the setup document to the/and so on/wildfly catalog: 

sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.conf /etc/wildfly/


This record permits you to indicate the WildFly mode and tie address. As a matter of course, WildFly will run in an independent mode and will tune in on all interfaces. You can alter the record as indicated by your necessities. 


# The configuration you want to run

# The mode you want to run

# The address to bind to

Next duplicate the WildFly content to the/pick/wildfly/receptacle/registry: 

sudo cp /opt/wildfly/docs/contrib/scripts/systemd/ /opt/wildfly/bin/

The contents inside container catalog must have executable banner : 

sudo sh -c 'chmod +x /opt/wildfly/bin/*.sh'

Duplicate the systemd unit record named to the/and so on/systemd/framework/catalog: 

sudo cp /opt/wildfly/docs/contrib/scripts/systemd/wildfly.service /etc/systemd/system/

Tell systemd that we made another unit document: 

sudo systemctl daemon-reload

Start the WildFly administration an empower it to be naturally begun at boot time by running: 

sudo systemctl start wildfly
sudo systemctl enable wildfly

Confirm that the administration is running: 

sudo systemctl status wildfly
? wildfly.service - The WildFly Application Server
   Loaded: loaded (/etc/systemd/system/wildfly.service; disabled; vendor preset: disabled)
   Active: active (running) since Fri 2019-03-01 20:13:39 UTC; 3s ago
 Main PID: 3680 (
   CGroup: /system.slice/wildfly.service

Step 5: Adjust the Firewall

In the event that your worker is ensured by a firewall and you need to get to the WildFly case from an external perspective of the nearby organization you additionally need to open port 8080. 

Utilize the accompanying orders to open the fundamental port: 

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

When running a WildFly application in a creation climate in all probability you will have a heap balancer or converse intermediary and it's a best practice to limit admittance to port 8080 just to your inner organization. 

Step 6: Configure WildFly Authentication

Since WildFly is introduced and running the subsequent stage is to make a client who will have the option to associate utilizing the organization reassure or distantly utilizing the CLI. 

To add another client utilize the content that is found the WildFly's container registry: 

sudo /opt/wildfly/bin/

You'll be asked what kind of client do you wish to add: 

What type of user do you wish to add? 
 a) Management User ( 
 b) Application User (

Select an and hit Enter: 

Next, the content will incite you to enter the subtleties of the new client: 

Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : linuxize
Password recommendations are listed below. To modify these restrictions edit the 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 : 
Re-enter 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 'linuxize' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'linuxize' to file '/opt/wildfly-16.0.0.Final/standalone/configuration/'
Added user 'linuxize' to file '/opt/wildfly-16.0.0.Final/domain/configuration/'
Added user 'linuxize' with groups  to file '/opt/wildfly-16.0.0.Final/standalone/configuration/'
Added user 'linuxize' with groups  to file '/opt/wildfly-16.0.0.Final/domain/configuration/'
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? yes
To represent the user add the following to the server-identities definition <secret value="UGFuMjNkZWo3NyNA" />

The new client will be added to the properties records utilized for validation. 

Step 6: Test the WildFly Installation

To get to the default WildFly page, open your program and type: http://<your_domain_or_IP_address>:8080 

Expecting the establishment is effective, a screen like the accompanying will show up: 


Step 7: Access WildFly Administration Console

Order Line Interface 

To get to the WildFly Administration Console from the order line you can utilize the content. 

Explore to the WildFly's canister catalog and run the content with the - interface alternative: 

cd /opt/wildfly/bin/
./ --connect

You will be approached to enter your managerial username and secret phrase (made in sync 6): 

Authenticating against security realm: ManagementRealm
Username: linuxize

When you login the comfort brief will change to [standalone@localhost:9990/]. Type help to get a rundown of orders and order grammar. 

From here, you can send and undeploy your applications, oversee clients and gatherings and design and screen WildFly worker. 

Web Interface

On the off chance that you like to deal with your worker from the GUI, WildFly additionally gives an online comfort. 

As a matter of course, the WildFly organization comfort is accessible just from localhost at http://localhost:9990/reassure. Sign in utilizing the client you have made in sync 6. 

WildFly Administration Console 

On the off chance that you need to get to the reassure from distant areas you'll have to make little changes to the wildfly.service, wildfly.conf and documents. 

Open the wildfly.conf and add WILDFLY_CONSOLE_BIND= toward the finish of the record. 



# The configuration you want to run

# The mode you want to run

# The address to bind to

# The address console to bind to

Open the and alter the featured lines: 



if [ "x$WILDFLY_HOME" = "x" ]; then

if [[ "$1" == "domain" ]]; then
    $WILDFLY_HOME/bin/ -c $2 -b $3 -bmanagement $4
    $WILDFLY_HOME/bin/ -c $2 -b $3 -bmanagement $4

Restart the administration for changes to produce results: 

sudo systemctl restart wildfly

Open the wildfly.service and alter the featured lines: 


Description=The WildFly Application Server



Make the/var/run/wildfly catalog and set right consents: 

sudo mkdir /var/run/wildfly/
sudo chown wildfly: /var/run/wildfly/

Advise systemd that the unit document was changed: 

sudo systemctl daemon-reload

Restart the WildFly administration by executing: 

sudo systemctl restart wildfly

Accepting that port 9990 isn't obstructed in your firewall, you should have the option to get to the WildFly organization reassure at http://<your_domain_or_IP_address>:9


You have successfully installed WildFly on your CentOS 7 system. You can now visit the official WildFly Documentation and learn more about the WildFly features.

If you hit a problem or have feedback, leave a comment below.