WildFly 10 on Ubuntu 15.10

These are my notes for installing JBoss WildFly 10.0.0.Final

Elevate to root:
sudo -s

Install Java JDK 8:
aptitude update
aptitude install --with-recommends software-properties-common
add-apt-repository ppa:webupd8team/java
aptitude update
aptitude --with-recommends install oracle-java8-installer vim

Verify your java install
java -version

Should get out put of something like
java version "1.8.0_72"
Java(TM) SE Runtime Environment (build 1.8.0_72-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.72-b15, mixed mode

Create a user acount on the system for wildfly:
adduser --no-create-home --disabled-password --disabled-login wildfly

Download WildFly:
cd /srv
wget --tries=0 --continue http://download.jboss.org/wildfly/10.0.0.Final/wildfly-10.0.0.Final.tar.gz

Extract WildFly:
tar -xzvf wildfly-10.0.0.Final.tar.gz

Make a symbolic link to new folder:
ln -s wildfly-10.0.0.Final wildfly

Change ownership of directory and symbolic link to wildfly:
chown -R wildfly.wildfly wildfly*

Now, while WildFly 10 doesn’t ship as a .deb (which would be awesome!) it does provide a sample init script to get you going on Debian like/based systems of which Ubuntu is one. So, let’s copy that script to the /etc/init.d directory:
cp /srv/wildfly/docs/contrib/scripts/init.d/wildfly-init-debian.sh /etc/init.d/wildfly

Run update-rc.d to ensure wildfly starts on reboot:
update-rc.d /etc/init.d/wildfly defaults

And, copy the wildfly.conf file to /etc/default:
cp /srv/wildfly/docs/contrib/scripts/init.d/wildfly.conf /etc/default/wildfly
cd /etc/default

Edit the file that contains the settings/options for the setup script:
vi wildfly <– Or, editor of your choice

Uncomment and/or Edit the following lines:
JBOSS_HOME="/srv/wildfly"
JBOSS_USER=wildfly
JBOSS_MODE=standalone

JBOSS_CONFIG=standalone-full.xml — Change configuration file name in order to run full Java EE 7 Stack
STARTUP_WAIT=120 –Probably overkill wait time
SHUTDOWN_WAIT=120 –Probably overkill wait time
JBOSS_CONSOLE_LOG="/var/log/wildfly/console.log"

Try out the init.d and wildfly.conf settings and make sure the service can start:
service wildfly start

Shut the wildfly service down and lets make some edits/customizations:
service wildfly stop
cd /srv/wildfly/standalone/configuration
cp standalone-full.xml standalone-full.xml.original
#<– Always backup before edits!

By default WildFly seems to only listen on 127.0.0.1. To make it listen on all interfaces we have to edit the standalone-full.xml (recall we are using the standalone-full.xml per the /etc/default/wildfly configuration file above) file and change each instance of “127.0.0.1” to “0.0.0.0” in the file. Just use find and replace in your editor to do this. I use vim so…

vi standalone-full.xml
:%s/127.0.0.1/0.0.0.0/g
:wq

Start or restart Wildfly
service wildfly start

With WildFly running add a “Management User” and remember your credentials!!!
cd /srv/wildfly/bin
./add-user.sh

That’s it. You now have a basic WildFly 10 install and can reach it and configure further with any browser using the “Management User” credentials you setup above.
http://yourserver:9990/

10 thoughts on “WildFly 10 on Ubuntu 15.10

  1. […] These are my install notes for PostgreSQL 9.5: In this scenario I assume you do not have PostgreSQL installed and that you are going to install PostgreSQL with the PostGIS extentions on a server with no GUI. We are going to install directly from the apt repository provided by postgresql.org. I plan to use this database in conjunction with my WildFly server. My install notes for setting up Wildfly 10.0.0.Final can be found here: https://gesker.wordpress.com/2016/02/09/wildfly-10-on-ubuntu-15-10/ […]

    Like

  2. Instead of moding the standalone[x].xml config file for the port, you can use the config file (wildfly.conf). Wildfly accepts ports via command input. append the config file with:
    JBOSS_OPTS=”-b 0.0.0.0 -bmanagement 0.0.0.0″

    And it will bind the specified ports on startup without having to mod the xml config.

    Like

  3. On Ubuntu 14.04 the lines

    update-rc.d /etc/init.d/wildfly defaults

    must be

    update-rc.d wildfly defaults

    before it worked – at my machine.

    Like

  4. update-rc.d wildfly defaults giving following issue my machine is ubuntu 16.04

    initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
    The script you are attempting to invoke has been converted to an Upstart
    job, but lsb-header is not supported for Upstart jobs.
    insserv: warning: script ‘haproxy’ missing LSB tags and overrides
    insserv: Default-Start undefined, assuming empty start runlevel(s) for script `haproxy’
    insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `haproxy’
    initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
    The script you are attempting to invoke has been converted to an Upstart
    job, but lsb-header is not supported for Upstart jobs.
    insserv: warning: script ‘elasticsearch’ missing LSB tags and overrides
    insserv: Default-Start undefined, assuming empty start runlevel(s) for script `elasticsearch’
    insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `elasticsearch’

    Like

  5. update-rc.d wildfly defaults giving below error in ubuntu 16.04

    initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
    The script you are attempting to invoke has been converted to an Upstart
    job, but lsb-header is not supported for Upstart jobs.
    insserv: warning: script ‘haproxy’ missing LSB tags and overrides
    insserv: Default-Start undefined, assuming empty start runlevel(s) for script `haproxy’
    insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `haproxy’
    initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
    The script you are attempting to invoke has been converted to an Upstart
    job, but lsb-header is not supported for Upstart jobs.
    insserv: warning: script ‘elasticsearch’ missing LSB tags and overrides
    insserv: Default-Start undefined, assuming empty start runlevel(s) for script `elasticsearch’
    insserv: Default-Stop undefined, assuming empty stop runlevel(s) for script `elasticsearch’

    Like

  6. It work like charm on my ubuntu 14.04 LTS though I was sceptically installing wildfly 10.x. Thanks for easy documentation.

    Like

Comments are closed.