Monday, 28 January 2013

Installing JBoss 7 on Ubuntu 12.10

Installing JBoss 7 on Ubuntu 12.10

This tutorial details out the steps required to get JBoss 7.1.1.Final Application Server installed and started on a Ubuntu 12.10 Desktop/ Server.

JDK Installation

The first step before installing JBoss AS 7, is to install a JDK. Any JDK can be used, such as Oracle JDK, OpenJDK, IBM JDK, or JRocket etc. We chose Oracle Sun JDK 6 for this tutorial, because it is the new Java reference implementation starting with Java 7.

NOTE: JDK 7 and above can also be used with JBoss. A JRE is also sufficient to run JBoss 7, however a JRE does not include some of the additional feature of a JDK.
To Install and configure Oracle Java on your Ubuntu 12.10 Desktop/ Server, CLICK HERE

Once your Java is successfully installed and verified, we are now ready to proceed with the JBoss installation

The first thing to do is download the latest JBoss Zip from the internet and place it at a convenient folder of your choice. In this case, i have placed JBoss inside the /opt folder.

TO download JBoss, simply type the following command in your Ubuntu Terminal:

# wget

NOTE: can also be downloaded with your favorite browser from the page.

Next, we issue the following unzip command to finally install jboss-as-7.1.1.Final in the /usr/share directory:

# sudo unzip -d /usr/share/

Alternatively, any directory can be chosen for the JBoss 7 installation.

Now that JBoss AS 7, is extracted to the folder of our choice, we need to make sure that we create a user with the appropriate privileges to execute JBoss Application Server. It is never a good idea to run JBoss as root for various reasons, security being one of them.

We create a new user called JBoss by issuing the following command:

# sudo adduser jboss

NOTE: You can use any username you like here.

We need to assign the appropriate ownership to the installation directory for the newly created JBoss user by issuing the command:

# sudo chown -fR jboss.jboss /usr/share/jboss-as-7.1.1.Final/

We switch to the JBoss user, so that this new installation can be administered properly. It is not recommended to administer JBoss as root.

# su - jboss

Once you have logged in as the appropriate JBoss User, navigate to the JBoss Directory as shown. This directory contains the necessary scripts to start, stop and manage your JBoss installation.

# cd /usr/share/jboss-as-7.1.1.Final/bin

The final step before we start JBoss, is to add a management user. This is an internal JBoss management user, necessary to access the new JBoss management console.

# ./
You should see the following message on the console after executing the command:

What type of user do you wish to add?
a) Management User (
b) Application User (
(a): a

We select “a”, next you should see the following message:

Enter the details of the new user to add.
Realm (ManagementRealm) :
Username : jboss
Password :
Re-enter Password :
* hit enter for Realm to use default, then provide a username and password

We select the default value for the Realm (ManagementRealm), by hitting enter, and select “jboss” as our username. 

Once the appropriate JBoss users are created, we are now ready to start our new JBoss AS 7 server. With JBoss AS 7, a new standalone and domain model has been introduced. In this tutorial, we focus on starting up a standalone server.

A standalone instance of JBoss 7 can be starting by executing:

# ./ -Djboss.bind.address=

You should see the following messages on the console after executing the command for a successful start up:

To test whether the JBoss has successfully started or not, you can also log on to JBoss admin console. Type in the following in your browser window, where <yourip> should be replaced with the address of your Ubuntu Desktop/ Server:

You will be prompted to enter login credentials for your JBoss Admin Console. Provide the user credentials we created in the earler steps here.

Once the credentials are provided, you will be shown the JBoss Admin Console as shown:

To shutdown your JBoss 7 server, execute the following command:

# ./ --connect command=:shutdown

NOTE: You can run this command from another Terminal Window in Ubuntu

You should see the following messages on the console after executing the command for a successful shut down:

That's it for this tutorial. Stay tuned for more such tutorials coming your way..

You can read more on Ubuntu by downloading this 143 page FREE eBOOK on "Getting Started with Ubuntu 12.10".

This guide will cover the basics of Ubuntu 12.10 (such as installation and working with the desktop) as well as guide you through some of the most popular applications used with Ubuntu 12.10.

No comments :

Post a Comment

Note: only a member of this blog may post a comment.