Recipe 1.0: Installing JBoss 7.1.1 on Ubuntu Server 12.04 LTS

My Infrastructure

I run all this on Ubuntu Server 12.04 LTS (64 bits).

Required Bits

  • You have a (Virtual) Machine running Ubuntu Server.

Recipe Goal

Get JBoss AS 7.1.1 running on your server.

Steps

Step 1.0.1: Install Java

sudo apt-get install openjdk-7-jre-headless

Step 1.0.2: Install JBoss AS 7.1.1

I used the steps outlined in this page, but tweaked them a bit.

cd /tmp
wget http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.tar.gz
cd /opt
sudo tar zxf /tmp/jboss-as-7.1.1.Final.tar.gz
cd jboss-as-7.1.1.Final/bin
sudo ./add-user.sh

Here you have to select option “a” (Management User), realm “ManagementRealm”, then a user and password of your own choice. Next, create a user for JBoss and give it the installation.

cd /opt
sudo adduser --system --no-create-home --group --disabled-password --disabled-login jboss
sudo chown -R jboss:jboss jboss-as-7.1.1.Final

Step 1.0.3: Configure JBoss as a Daemon/Service

To get JBoss to start automatically at boot, you have to create a Kickstart script for it:

sudo vi /etc/init/jboss-as-7.conf

I used the following script:

########
# Start JBoss AS 7.1.1 as a daemon
########

description "JBoss AS 7.1.1.Final"
author      "Bert Laverman <bert.laverman@rakis.nl>"

start on runlevel [2345]
stop on runlevel [!2345]

respawn

setuid jboss
setgid jboss
chdir /opt/jboss-as-7.1.1.Final

exec /opt/jboss-as-7.1.1.Final/bin/standalone.sh -b=0.0.0.0 -bmanagement=0.0.0.0

Next start JBoss:

sudo start jboss-as-7
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s