Friday, August 19, 2016

How To Install JBoss AS 7 in Ubuntu

This guide is aimed at developers wanting to set up their development environment.

First, you should have a JDK-7 installed on your machine. If you have a JDK-8, JBoss AS 7.x will not start.
Then, in your .profile file, set the JAVA_HOME environment variable pointing to java installation.

To download JBoss 7 application server issue the following command on terminal:


Untar the archive:

tar -xvf jboss-as-7.1.1.Final.tar.gz 

Copy the directory to /opt/redhat-jboss-as-7:

sudo cp -r jboss-as-7.1.1.Final /opt/redhat-jboss-as-7

You don't want the jboss process to run as root on your machine, so you need to change the owner and owner group of jboss. Assume you are logged as the user max, to set the owner user and owner group on the jboss directory, issue the following command:

sudo chown -R max:max /opt/redhat-jboss-as-7

To start JBoss type on the shell:

max@ubuntu-host:/opt/redhat-jboss-as-7/bin$ ./

If everything went well, you should see an output like this:

max@ubuntu-host:/opt/redhat-jboss-as-7/bin$ ./

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/redhat-jboss-as-7

  JAVA: /usr/lib/jvm/java-7-oracle/bin/java

  JAVA_OPTS:  -server -XX:+UseCompressedOops -XX:+TieredCompilation -Xms64m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Djboss.server.default.config=standalone.xml


11:13:19,245 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA
11:13:20,281 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA
11:13:20,394 INFO  [] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
11:13:26,558 INFO  [org.xnio] XNIO Version 3.0.3.GA
11:13:26,561 INFO  [] JBAS015888: Creating http management service using socket-binding (management-http)
11:13:26,640 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
11:13:26,696 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
11:13:26,800 INFO  [] JBAS011502: Removing bootstrap log handlers
11:13:26,816 INFO  [] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
11:13:26,883 INFO  [] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
11:13:26,869 INFO  [] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
11:13:26,950 INFO  [] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
11:13:26,985 INFO  [] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
11:13:27,027 INFO  [] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
11:13:27,040 INFO  [] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.7.Final
11:13:27,305 INFO  [] (MSC service thread 1-3) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
11:13:29,376 INFO  [] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
11:13:29,832 INFO  [] (MSC service thread 1-4) JBAS011802: Starting Naming Service
11:13:29,888 INFO  [] (MSC service thread 1-3) JBAS015400: Bound mail session [java:jboss/mail/Default]
11:13:30,593 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) Starting Coyote HTTP/1.1 on http--
11:13:31,556 INFO  [] (MSC service thread 1-1) JBoss Web Services - Stack CXF Server 4.0.2.GA
11:13:31,710 INFO  [] (MSC service thread 1-2) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
11:13:32,185 INFO  [] (MSC service thread 1-1) JBAS017100: Listening on /
11:13:32,185 INFO  [] (MSC service thread 1-3) JBAS017100: Listening on /
11:13:32,225 INFO  [] (MSC service thread 1-2) JBAS015012: Started FileSystemDeploymentService for directory /opt/redhat-jboss-as-7/standalone/deployments
11:13:32,671 INFO  [] (Controller Boot Thread) JBAS015951: Admin console listening on
11:13:32,671 INFO  [] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 14359ms - Started 133 of 208 services (74 services are passive or on-demand)

To test JBoss installation, point your browser to: http://localhost:8080

Managing JBoss Application Server

To create a management user, running the JBoss' utility script:

cd /opt/redhat-jboss-as-7/bin

The output is:

max@ubuntu-host:/opt/redhat-jboss-as-7/bin$ ./

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

Enter the details of the new user to add.
Realm (ManagementRealm) : 
Username : admin
Password : password
Re-enter Password : password
The username 'admin' is easy to guess
Are you sure you want to add user 'admin' yes/no? y
About to add user 'admin' for realm 'ManagementRealm'
Is this correct yes/no? y
Added user 'admin' to file '/opt/redhat-jboss-as-7/standalone/configuration/'
Added user 'admin' to file '/opt/redhat-jboss-as-7/domain/configuration/'

To open the web administration console, point your browser to: http://localhost:9990/console

Read the reference Getting Started Guide on JBoss Documentation Project.

No comments :

Post a Comment