How To Install JBoss On Ubuntu
This article will describe that how to install Jboss application server on Ubuntu. Jboss is a powerful open source java application server developed by RedHat.
To install Jboss we will follow the following steps :
Step 1: Java installation and verification
Step 2: Download JBoss and install
Step 3: Create the appropriate user for the Jboss
Step 4: Start the JBoss server and verify that the server has started properly
Step 5: Stop the JBoss server
Step 1: Java installation and verification
First check that you have JDK installed in your system or not.To check your java installation and version you can run following command :
$ java -version
The command will show you the java version which is installed in your system. If you get error message '-bash: java: command not found', that means java is not installed.
For the latest Jboss server we can take the JDK version above then 6. Here we are going to install java version 7.
sudo apt-get update
sudo apt-get install openjdk-7-jdk
Step 2: Download JBoss and install
To download the Jboss issue the following command :
$ wget http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip
Or you can download it from JBoss site http://www.jboss.org/jbossas/downloads/ page.
Install JBoss :
After successfully downloaded the Jboss now unzip the downloaded file in appropriate directory.To unzip the downloaded Jboss file issue the following command :
$ sudo unzip jboss-as-7.1.1.Final.zip -d /usr/share/
This command will install the JBoss application server to the directory /usr/share/. Alternatively you can choose any directory location to install JBoss.
Step 3: Create the appropriate user for the Jboss
After successfully installation of JBoss application server, we need to create a user with appropriate privilege. It is a not a good idea to use JBoss with a root user, so we create a new user.
$ sudo adduser javaserver
Here we created a new user called javaserver. You can choose any name for new user.
Change ownership of the installation directory:
Now we have new user so we will give this user to ownership of the JBoss installation directory. To change the ownership of the JBoss installation directory issue follwing command :
$ sudo chown -fR jboss.jboss /usr/share/jboss-as-7.1.1.Final/
Switch user:
Now switch user to newly created user javaserver:
$ su javaserver
Add new user for the JBoss management console :
The final step is to create a JBoss management user, which is necessary to access JBoss Management console.
$ cd /usr/share/jboss-as-7.1.1.Final/bin
$ ./add-user.sh
After issuing above command you will see the following messages :
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a): a
We select a, next you should see the following message:
Enter the details of the new user to add.
Realm (ManagementRealm) :
Username : javaserver
Password :
Re-enter Password :
* hit enter for Realm to use default, then provide a username and password
So above we have new Jboss management user, where username is javaserver and the password server. The password should not be same as username.
Step 4: Start the JBoss server and verify that the server has started properly
A standalone instance of the Jboss application server can be start using the following command :
$ ./standalone.sh -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0&
By default Jboss server is bind to localhost. Nobody can access the localhost using remote access. So we gave the bind.address to 0.0.0.0 and management to 0.0.0.0, to access url over the remote access on Internet.
Test the JBoss installation :
To test that JBoss is installed successfully or not just open your browser and put the following url in address bar :
http://localhost:9990
Step 5: Stop the JBoss server
To stop the instance of the JBoss server issue the follwoing command.
$ ./jboss-cli.sh --connect command=:shutdown
2 Comment(s)