Installing Wildfly 8 on Centos

Posted by

I’ll show you how to set up Wildfly 8 server for standalone not for the domain mode

download the package and unzip

cd /opt
wget http://download.jboss.org/wildfly/8.2.0.Final/wildfly-8.2.0.Final.zip
unzip wildfly-8.2.0.Final.zip -d /opt/

rename the unzipped folder

mv wildfly-8.2.0.Final wildfly

create the wildfly user

groupadd wildfly
useradd -s /bin/bash -g wildfly wildfly

then prepare the config file path

mkdir -p /var/log/wildfly

change the ownership of folders

chown -R wildfly /opt/wildfly
chown -R wildfly /var/log/wildfly

then copy the conf folder

cp /opt/wildfly/bin/init.d/wildfly.conf /etc/default/wildfly

then edit it

nano /etc/default/wildfly

then find the below lines comment out and change

# General configuration for the init.d scripts,
# not necessarily for JBoss AS itself.
# default location: /etc/default/wildfly

## Location of JDK
JAVA_HOME="/usr/java/jdk1.7.0_75"

## Location of WildFly
JBOSS_HOME="/opt/wildfly"

## The username who should own the process.
JBOSS_USER=wildfly

## The mode WildFly should start, standalone or domain
JBOSS_MODE=standalone

## Configuration for standalone mode
JBOSS_CONFIG=standalone.xml

## Configuration for domain mode
#JBOSS_DOMAIN_CONFIG=domain.xml
#JBOSS_HOST_CONFIG=host-master.xml

## The amount of time to wait for startup
STARTUP_WAIT=60

## The amount of time to wait for shutdown
SHUTDOWN_WAIT=60

## Location to keep the console log
JBOSS_CONSOLE_LOG="/var/log/wildfly/console.log"

then copy the init script

cp /opt/wildfly/bin/init.d/wildfly-init-redhat.sh /etc/init.d/wildfly

then add the script to chkconfig and launch it

chkconfig --add wildfly
chkconfig wildfly on

then now we need to open the server to public. In its default settings external sources are disallowed to browse through the app server

nano /opt/wildfly/standalone/configuration/standalone.xml

change these lines

<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>
<!-- TODO - only show this if the jacorb subsystem is added  -->
<interface name="unsecure">
<!--
~  Used for IIOP sockets in the standard configuration.
~                  To secure JacORB you need to setup SSL
-->
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>

to these

<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>
<!-- TODO - only show this if the jacorb subsystem is added  -->
<interface name="unsecure">
<!--
~  Used for IIOP sockets in the standard configuration.
~                  To secure JacORB you need to setup SSL
-->
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>

then start the server

[root@centos configuration]# /etc/init.d/wildfly start
Starting wildfly:                                          [  OK  ]

then now we will need management users

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *