When developing Java EE/Jakarta EE projects, you know you will need a Java server. Some of the most used Java Enterprise servers include Apache Tomcat, Glassfish, Jetty and WildFly/JBoss server. Not all these server provides all needed features but all of them provide most of the enterprise features needed. Glassfish and WildFly/JBoss provides a complete set of features and is mostly used by enterprises.

For CentOS: Install WildFly (JBoss) Server on CentOS 8 / CentOS 7

In this article, I will show you how to install WildFly 18. But first, what is the difference between Wildfly and JBoss AS? Wildfly is the community edition for the Java EE server while JBoss As is the enterprise edition for the enterprise. Both are sponsored by Redhat Inc. So JBoss AS simply put is the secured version of WildFly.

So obviously the first thing to do is to have Java installed.

$ java -version
openjdk version "11.0.4" 2019-07-16
OpenJDK 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)

Install WildFly 18 on Ubuntu 18.04

We will download WildFly 18 and choose the location to install. I am installing mine at ~/eclipse/servers/

mkdir -p ~/eclipse/servers
cd ~/eclipse/servers
wget https://download.jboss.org/wildfly/18.0.1.Final/wildfly-18.0.1.Final.zip
unzip wildfly-18.0.0.Final.zip

After that, we add an administrator to manage some sources such as data sources.

cd wildfly-18.0.0.Final/bin/
./add-user.sh

Follow instructions as shown below to fill the questions:

After the configuration, start your WildFly server instance in standalone as follows:

$ ./standalone.sh
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /home/eugene/eclipse/servers/wildfly-18.0.1.Final

  JAVA: java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true  --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED

=========================================================================

09:56:39,410 INFO  [org.jboss.modules] (main) JBoss Modules version 1.9.1.Final
09:56:40,063 INFO  [org.jboss.msc] (main) JBoss MSC version 1.4.11.Final
09:56:40,074 INFO  [org.jboss.threads] (main) JBoss Threads version 2.3.3.Final
09:56:40,248 INFO  [org.jboss.as] (MSC service thread 1-2) WFLYSRV0049: WildFly Full 18.0.1.Final (WildFly Core 10.0.3.Final) starting
09:56:41,485 INFO  [org.wildfly.security] (ServerService Thread Pool -- 26) ELY00001: WildFly Elytron version 1.10.4.Final
09:56:42,239 INFO  [org.jboss.as.controller.management-deprecated] (Controller Boot Thread) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/core-service=management/management-interface=http-interface' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
09:56:42,334 INFO  [org.jboss.as.controller.management-deprecated] (ServerService Thread Pool -- 36) WFLYCTL0028: Attribute 'security-realm' in the resource at address '/subsystem=undertow/server=default-server/https-listener=https' is deprecated, and may be removed in a future version. See the attribute description in the output of the read-resource-description operation to learn more about the deprecation.
09:56:42,401 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http)
09:56:42,440 INFO  [org.xnio] (MSC service thread 1-4) XNIO version 3.7.3.Final
09:56:42,455 INFO  [org.xnio.nio] (MSC service thread 1-4) XNIO NIO Implementation Version 3.7.3.Final
09:56:42,554 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 43) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.4)
09:56:42,566 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 51) WFLYCLINF0001: Activating Infinispan subsystem.
09:56:42,613 INFO  [org.wildfly.extension.microprofile.config.smallrye._private] (ServerService Thread Pool -- 60) WFLYCONF0001: Activating WildFly MicroProfile Config Subsystem
09:56:42,614 INFO  [org.jboss.remoting] (MSC service thread 1-6) JBoss Remoting version 5.0.15.Final
09:56:42,590 INFO  [org.jboss.as.jaxrs] (ServerService Thread Pool -- 53) WFLYRS0016: RESTEasy version 3.9.1.Final
09:56:42,612 INFO  [org.jboss.as.connector] (MSC service thread 1-5) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.4.17.Final)
09:56:42,620 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = h2
09:56:42,621 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 58) WFLYJSF0007: Activated the following JSF Implementations: [main]
09:56:42,659 INFO  [org.wildfly.extension.microprofile.health.smallrye] (ServerService Thread Pool -- 61) WFLYHEALTH0001: Activating Eclipse MicroProfile Health Subsystem
09:56:42,662 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 64) WFLYNAM0001: Activating Naming Subsystem
09:56:42,677 INFO  [org.wildfly.extension.microprofile.metrics.smallrye] (ServerService Thread Pool -- 62) WFLYMETRICS0001: Activating Eclipse MicroProfile Metrics Subsystem
09:56:42,714 INFO  [org.wildfly.extension.microprofile.opentracing] (ServerService Thread Pool -- 63) WFLYTRACEXT0001: Activating MicroProfile OpenTracing Subsystem
09:56:42,686 INFO  [org.jboss.as.naming] (MSC service thread 1-7) WFLYNAM0003: Starting Naming Service
09:56:42,739 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 70) WFLYSEC0002: Activating Security Subsystem
09:56:42,785 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 74) WFLYWS0002: Activating WebServices Extension
09:56:42,777 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 52) WFLYIO001: Worker 'default' has auto-configured to 8 core threads with 64 task threads based on your 4 available processors
09:56:42,771 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-7) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default]
09:56:42,771 INFO  [org.jboss.as.security] (MSC service thread 1-2) WFLYSEC0001: Current PicketBox version=5.0.3.Final
09:56:42,760 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 72) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique.
09:56:42,939 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0003: Undertow 2.0.27.Final starting
09:56:43,085 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 73) WFLYUT0014: Creating file handler for path '/home/eugene/eclipse/servers/wildfly-18.0.1.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]']
09:56:43,100 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0012: Started server default-server.
09:56:43,102 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0018: Host default-host starting
09:56:43,113 INFO  [org.jboss.as.ejb3] (MSC service thread 1-8) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 16 (per class), which is derived from the number of CPUs on this host.
09:56:43,113 INFO  [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 64 (per class), which is derived from thread worker pool sizing.
09:56:43,286 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080
09:56:43,488 INFO  [org.jboss.as.ejb3] (MSC service thread 1-1) WFLYEJB0493: EJB subsystem suspension complete
09:56:43,574 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS]
09:56:43,763 INFO  [org.jboss.as.patching] (MSC service thread 1-3) WFLYPAT0050: WildFly Full cumulative patch ID is: base, one-off patches include: none
09:56:43,795 WARN  [org.jboss.as.domain.management.security] (MSC service thread 1-2) WFLYDM0111: Keystore /home/eugene/eclipse/servers/wildfly-18.0.1.Final/standalone/configuration/application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost
09:56:43,828 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-2) WFLYDS0013: Started FileSystemDeploymentService for directory /home/eugene/eclipse/servers/wildfly-18.0.1.Final/standalone/deployments
09:56:43,920 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-2) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
09:56:44,010 INFO  [org.jboss.ws.common.management] (MSC service thread 1-3) JBWS022052: Starting JBossWS 5.3.0.Final (Apache CXF 3.3.3) 
09:56:44,207 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
09:56:44,210 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
09:56:44,211 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
09:56:44,211 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 18.0.1.Final (WildFly Core 10.0.3.Final) started in 5378ms - Started 315 of 577 services (369 services are lazy, passive or on-demand)

When the server is running, the web management interface can be accessed at http://localhost:9990/console. You can use the web management interface to create datasources, manage deployments and configure the server.

WildFly Management Console

Adding WildFly 18 to Eclipse IDE

Bring up your eclipse IDE then go to Help > Install New Software… > Work with:

Click Add to add JBoss Tools plugin:

Name: JBoss Tools

Location: http://download.jboss.org/jbosstools/photon/development/updates/

Select the features you will need. Then click Finish and Restart

After restart click the servers tab. Mostly it will be blank with a link to create a server. Click the link to bring up a window for configuring the server.

Select WildFly18 from the Jboss Community list. Click Next then set the Home directory of the installed WildFly. The rest will be configured for you. Click Finish.

Test WildFly 18 to Eclipse IDE integration

Create a simple project to test your server. It should now work!

Thanks and have a nice day!.

Check other Dev related guides available in our blog.

Install GCC and Development Tools on RHEL 8 / CentOS 8

How to install Chef Development Kit / Workstation on Ubuntu 18.04

How To Provision VMs on oVirt / RHEV with Terraform