JBoss/WildFly is an open-source application server used to deploy Java-based web applications and enterprise applications. Here’s a step-by-step guide to setting up JBoss/WildFly:
Java Development Kit (JDK): Make sure you have the JDK installed. JBoss/WildFly requires JDK 8 or higher.
sudo apt install openjdk-11-jdk
sudo yum install java-11-openjdk-devel
Check if Java is installed:
java -version
wget
(on Linux):wget https://download.jboss.org/wildfly/26.1.2.Final/wildfly-26.1.2.Final.zip
unzip wildfly-26.1.2.Final.zip
.zip
file and choose “Extract All”.Move the extracted folder to a preferred location. For example:
sudo mv wildfly-26.1.2.Final /opt/wildfly
Add WildFly to your environment variables for easier access:
Edit the ~/.bashrc
file (on Linux):
nano ~/.bashrc
Add the following lines:
export WILDFLY_HOME=/opt/wildfly
export PATH=$PATH:$WILDFLY_HOME/bin
Then reload the .bashrc
file:
source ~/.bashrc
Navigate to the WildFly bin
directory:
cd $WILDFLY_HOME/bin
Start the WildFly server in standalone mode:
./standalone.sh # For Linux/Mac
standalone.bat # For Windows
By default, WildFly runs on port 8080. You can check if the server is running by visiting http://localhost:8080
in your web browser. You should see a welcome page.
To manage and configure the server using the admin console:
Create a management user by running:
./add-user.sh # For Linux/Mac
add-user.bat # For Windows
Follow the prompts to set up a new admin user.
After starting the server, you can access the admin console at http://localhost:9990/console
. Use the credentials you just created to log in.
WildFly allows deploying Java EE applications (WAR, EAR, JAR) through the admin console or via the deploy
command in the jboss-cli
.
./jboss-cli.sh --connect
Then deploy your application:deploy /path/to/your/application.war
Alternatively, you can upload the .war
or .ear
files directly via the administration console.
On Linux, you can set WildFly to run as a service:
sudo nano /etc/systemd/system/wildfly.service
Add the following:[Unit]
Description=The WildFly Application Server
After=syslog.target network.target
[Service]
Type=simple
ExecStart=/opt/wildfly/bin/standalone.sh -b 0.0.0.0
User=wildfly
Group=wildfly
LimitNOFILE=102642
TimeoutStartSec=300
TimeoutStopSec=300
Restart=always
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable wildfly
sudo systemctl start wildfly
standalone/configuration/standalone.xml
.Look for the following section:
<socket-binding-group name="standard-sockets" default-interface="public">
<socket-binding name="http" port="8080"/>
<socket-binding name="management-http" port="9990"/>
</socket-binding-group>
Modify the port
attribute as needed.
Do you need help or support for WildFly or JBoss Application Server? Feel free to contact us!