Java Application Server : WildFly Nedir ? Nasıl Kurulur ?

Anil Ozturk
Devops Türkiye☁️ 🐧 🐳 ☸️
4 min readNov 6, 2019

Bu makale de bir open source java application server ürünü olan Wildfly kurulumundan bahsedeceğim, kurulum aşamalarına geçmeden web server ve application server kavramlarına değinmek istiyorum.

Sonrasında neden Wildlfly seçimi ile ilerlediğime dair mini bir benchmark gösterip, kurulum adımlarını detaylandıracağım.

Web Server

Gelen HTTP requestlerini taraflarınca cevaplayarak HTML formatındaki sayfaları ilgili requestlere yönlendiren serverlardır.

Application Server

Uygulamaların host edildiği ve kaynaklarını kullanarak çalıştırılğı serverlardır.

Java application server ürünleri arasında 2017 yılına ait bir bar chart mevcut, burda 2017 yılı itibari ile pazar dağılımını görebiliyoruz.

Yine benzer ürünler çerçevesinde 2018 yılı içerisinde yapılan bir araştırmada da durum aşağıdaki gibidir.

Bu verileri göz önüne alarak ve open source olmasının da verdiği haz ile Wildfly kurulumuna karar verdim. Kullanım sonrasında kaynak kullanımları ve uygulama performansı ile ilgili metrikleri de ekleyeceğim.

Requirements

A server running Ubuntu 18.04 server.
A non-root user with sudo privileges.
A static IP address configure on your server.

Install Java

WildFly is written in Java, so you will need to install Java to your system. You can install Java by running the following command:

sudo apt-get install default-jdk -y

Once the Java is installed, you can check the version of Java using the following command:

java -version

Output:

openjdk version “11.0.4” 2019–07–16OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3)OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3, mixed mode, sharing)

Download Wildfly

The current Wildfly package is downloaded from the following URL.

wget https://download.jboss.org/wildfly/18.0.0.Final/wildfly-18.0.0.Final.tar.gz

Installing Filebeat

Downloaded tar.gz package install with the following command.

cd /home/aniltar -xvzf wildfly-18.0.0.Final.tar.gz

Configuring file

After the wildfly installation step, the standalone.xml file is configured with the following command.

sudo nano /home/anil/wildfly-18.0.0.Final/standalone/configuration/standalone.xml

Set the local IP address to related fields.

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

Save and close the file.

Next, you will need to add a user to access the management console. You can add the user by running the following script:

sudo nano /home/anil/wildfly-18.0.0.Final/bin/add-user.sh

Answer all the questions as shown below, you need add a user and password.

What type of user do you wish to add?

a) Management User (mgmt-users.properties)b) Application User (application-users.properties)(a): aEnter the details of the new user to add.Using realm ‘ManagementRealm’ as discovered from the existing property files.Username : anilPassword 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 :Re-enter Password :What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]: ManagementAbout to add user ‘anil’ for realm ‘ManagementRealm’Is this correct yes/no? yesAdded user ‘anil’ to file ‘/home/arcuser/wildfly-18.0.0.Final/standalone/configuration/mgmt-users.properties’Added user ‘anil’ to file ‘/home/arcuser/wildfly-18.0.0.Final/domain/configuration/mgmt-users.properties’Added user ‘anil’ with groups Management to file ‘/home/arcuser/wildfly-18.0.0.Final/standalone/configuration/mgmt-groups.properties’Added user ‘anil’ with groups Management to file ‘/home/arcuser/wildfly-18.0.0.Final/domain/configuration/mgmt-groups.properties’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? yesTo represent the user add the following to the server-identities definition <secret value=”QXJjZWxpa1RTTTMyMSo=” />

Starting and Checking Windfly Service

Before accessing WildFly console, you will need to start the wildfly instance. You can start it with the following command:

sudo sh /home/anil/wildfly-18.0.0.Final/bin/standalone.sh

The above command will start the wildfly instance.

Now, open your web browser and type the URL http://Your Local IP:8080. You will be redirected to the WildFly default page:

To access the management console, open your web browser and type the URL http://Your Local IP:9990. You will be redirected to the following page:

Have enjoy..

Kaynaklar :

https://alternativeto.net/
https://shadow-soft.com/open-source-application-servers/
https://blog.idrsolutions.com/2015/04/top-10-open-source-java-and-javaee-application-servers/
https://plumbr.io/blog/java/most-popular-java-application-servers-2017-editionhttps://arjan-tijms.omnifaces.org/2018/05/java-ee-survey-2018-results.html

--

--