// Tutorial //

How To Install JBoss On Ubuntu 12.10 64Bit

Published on April 16, 2013
Default avatar
By Gerald Sigmund
Developer and author at DigitalOcean.
How To Install JBoss On Ubuntu 12.10 64Bit

What the Red Means

The lines that the user needs to enter or customize will be in red in this tutorial! The rest should mostly be copy-and-pastable.

What is JBoss?

JBoss is a powerful open source Java application server developed by RedHat. It has full support for the JavaEE 6 Webprofile, which means you have the following out of the box support:

  • Servlet 3.0
  • JSF
  • Java Server Faces
  • EJB
  • JPA
  • CDI
  • Bean Validation

Additionally there is also support for other JavaEE features like JMS, JAX-RS and JAX-WS.

More documentation can be found here.

Step One—Install Java

First you have to check if you have installed java on your VPS.

java -version

When you get the following error you have to install it.

-bash: java: command not found

Install Java.

apt-get update
apt-get install openjdk-7-jdk

Step Two—Install JBoss

The next step is to download the current JBoss version, which is at the moment 7.1.1.

wget http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.tar.gz

Now unzip it and move it to /usr/local/share/jboss.

tar xfvz jboss-as-7.1.1.Final.tar.gz
mv jboss-as-7.1.1.Final /usr/local/share/jboss

Step Three—Create a New User

Because we don't want to run it as root you should create a new user which is used to start the JBoss server.

adduser appserver

Also change the ownership of the newly created folder to the new user.

chown -R appserver /usr/local/share/jboss

The next step will be creating a new user for the JBoss management console.

su appserver
cd /usr/local/share/jboss/bin	

Now you should create a new Management User by typing "a" and enter later username and password

What type of user do you wish to add? 
 a) Management User (mgmt-users.properties) 
 b) Application User (application-users.properties)
(a): a

Enter the details of the new user to add.
Realm (ManagementRealm) :    
Username : app1
Password : 
Re-enter Password :

It is really important that the Realm has the value "ManagementRealm" because this is the realm for the management console.

Step Four—Start the JBoss Server

After this steps you can start the JBoss server using the following command.

./standalone.sh -Djboss.bind.address=yourserverip -Djboss.bind.address.management=yourserverip&

You have to set the bind address because otherwise JBoss is only accessable from localhost. You can also set as IP address if you have no static IP.

To verify if everything works you can navigate to the management console.


You have to enter username and password of the user you created using add-user.sh.

You should see the following site now:

JBoss 1

To enter the deployed root web page you have to navigate to the following url.


You should see the following site now:

JBoss 2

To stop the server you have to run the following command.

./jboss-cli.sh --connect --controller=yourserverip:9999 command=:shutdown

If you’ve enjoyed this tutorial and our broader community, consider checking out our DigitalOcean products which can also help you achieve your development goals.

Learn more here

About the authors
Default avatar
Developer and author at DigitalOcean.

Still looking for an answer?

Was this helpful?

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Any way to contribute in this article to make it even more beginner-friendly? Any way I can write an article on installing JBoss 7 on a Debian 10 OS?

This documention is running sucessfull only on Ubuntu 16.04 because it is jboss 7.1 latest version

I am trying to follow these instructions. I am trying to run torquebox 3.1.1 (runs jboss internally). Everything seems to come up fine when I start the server, but I cannot access anything - http://localhost:8080. It just sits there waiting - never returning back. When I start by binding to a different IP and access it externally via http://ip_address:9990/console or http://ip_address:8080 - same thing; nothing happens, never returns. Even from the host, I cannot do a curl http://localhost:8080. It just hangs. However, telnet localhost 8080 connects. So doesn’t seem like a port blocked issue.

Any pointers on where I can look further? Right now on ubuntu 14.04 box.

I had to uninstall my Ubuntu server 14.04 and had to install it again and of course jboss 7 as well and i couldn’t get the http://yourserverip:8080 to work SO i found out why… Hope this helps for the new comers.

By default (for security reasons) Jboss AS binds only to localhost ( To access it via your hostname or IP you need to edit the “JBOSS_HOME/ standalone/configuration/standalone.xml” file to change the “public” and “management” interfaces to point to the hostname of your system ( in case you don’t have an static IP address. Here’s the link: https://community.jboss.org/message/618795?_sscc=t#618795

Thank you for this! i was able to install it and run it in less than 15 minutes. It works great on Ubuntu Server 14.04!

@Andrew SB: owhh…thx for ur help…i really know nothing about this…ehehe

@hazidq_boy: After some research, it looks like this is your issue:

<pre> JAVA: /usr/local/java/jdk1.8.0_05/bin/java </pre>

JBoss AS 7.1.1 apparently won’t start on JDK8. This seems to be a known issue. See this thread on their site including comments confirming the issue from a JBoss developer:


Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0* LISTEN -
tcp 0 0* LISTEN -
tcp 0 0* LISTEN -
tcp 0 0* LISTEN -
tcp6 0 0 ::1:631 :::* LISTEN -
tcp6 0 0 :::445 :::* LISTEN -
tcp6 0 0 :::139 :::* LISTEN -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp 0 0* -
udp6 0 0 :::5211 :::* -
udp6 0 0 :::5353 :::* -
udp6 0 0 :::49346 :::* -

@Andrew SB:i cant see any java running…this is what i got…thx for ur help

@hazidq_boy: So you’re running this on top of a desktop install? Try running <code>netstat -plunt</code> in a terminal to see what ports are actually in use. Look for the ones with “java” under “Program name”

@Andrew SB: yea it looks fine but when i try to go to http://localhost:9990/console but it say “Unable to connect”…i usually use apache tomcat on window so this my 1st time using jboss on ubuntu…usually after server starting it should got other log mores…

*your.server.ip=i try to use also same…urmm