Sunday, 1 November 2015

Install jboss eap 6.2 ZIP File on Red Hat 6

In this tutorial, we will demonstrate how to download, install, start and stop a JBoss EAP 6.2 server 
on Red Hat 6.

This tutorial consists of the following steps:

1. Check System Prerequisites
2. Download JBoss and the installation procedure
3. Create the appropriate user
4. Start our new JBoss server and verify that the server has started properly
5. Stop the new JBoss server and verify that the server has shutdown properly

1. Check System Prerequisites

Before proceeding with the installation, make sure that you have a JVM installed in your machine. You can try running the following command in your terminal:

[root@middleware opt]# java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) Client VM (build 24.75-b04, mixed mode, sharing)
[root@middleware opt]#

In case, you don’t have a JVM installed in your machine, please refer to this


2. Download JBoss and the installation procedure

jboss-eap-6.0.0.zip can be downloaded with your favorite browser from: 


After download  .zip version of JBoss EAP 6.2. You may install JBoss EAP 6 on any location of your machine using the unzip utility.

[root@middleware opt]#pwd
/u02/local/opt
[root@middleware opt]#unzip jboss-eap-6.2.0.zip

below files generated in /u02/local/opt/jboss-eap-6.2/ after unzip


[root@middleware opt]# ls -ltr
total 416
drwxrwxr-x 3 root was   4096 Nov 20  2013 modules
-rw-rw-r-- 1 root was 350859 Nov 20  2013 was-modules.jar
drwxrwxr-x 4 root was   4096 Nov 20  2013 welcome-content
-rw-rw-r-- 1 root was     58 Nov 20  2013 version.txt
-rw-rw-r-- 1 root was  26530 Nov 20  2013 LICENSE.txt
-rw-rw-r-- 1 root was    425 Nov 20  2013 wasEULA.txt
drwxrwxr-x 5 root was   4096 Nov 20  2013 docs
drwxrwxr-x 3 root was   4096 Nov 20  2013 appclient
drwxrwxr-x 3 root was   4096 Nov 20  2013 bundles
drwxrwxr-x 8 root was   4096 Oct  4 03:28 standalone
drwxrwxr-x 7 root was   4096 Oct 11 21:19 domain
drwxrwxr-x 4 root was   4096 Oct 25 07:55 bin


3. Create the appropriate user

Now that JBoss EAP 6 is installed, we need to make sure that we create a user with the appropriate privileges. It is never a good idea to run JBoss as root for various reasons.

[root@middleware opt]#useradd jbossas
[root@middleware opt]#passwd jbossas

chown jbossas:jboss –R /u02/local/opt/jboss-eap-6.2

Switch user to the jbossas user:

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

[root@middleware opt]# su jbossas

Change directory to the jboss bin directory:

Now, lets change directories to the JBoss bin directory. This directory contains the necessary scripts to start, stop and manage your JBoss installation.

[jbossas@middleware opt]$ cd /u02/local/opt/jboss-eap-6.2/bin
[jbossas@middleware bin]$

Add a jboss management user:

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.

[jbossas@middleware bin]$ ./add-user.sh
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 (mgmt-users.properties)
 b) Application User (application-users.properties)
(a):

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

Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
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. By default, we supply “Jboss123” as our password, of course, you can provide any password you prefer here.

4. Start our new JBoss server and verify that the server has started properly

Once the appropriate JBoss users are created, we are now ready to start our new JBoss EAP 6 server.

A standalone instance of JBoss EAP 6 can be starting by executing:


[jbossas@middleware bin]$ ./standalone.sh
========================================================================
  JBoss Bootstrap Environment
   JBOSS_HOME: /u02/local/opt/jboss-eap-6.2
   JAVA: java
   JAVA_OPTS:  -server -Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true
 ======================================================================
 ----------------------
-----------------

22:49:27,622 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14)  started in 22828ms – Started 134 of 214 services (79 services are passive or on-demand)

NOTE: By default, JBoss EAP 6 will only bind to localhost. This does not allow any remote access to your jboss server.

A good indication of a successful startup is that you can login to the JBoss admin console. Type in the following in your browser window

http://localhost:9990/

5. Stop the new JBoss server and verify that the server has shutdown properly

After successfully starting up JBoss EAP 6, lets demonstrate how to shut your JBoss server down in this section.

Shutdown a JBoss EAP 6 instance:

To shutdown your JBoss EAP 6 server, execute the following command:
$ ./jboss-cli.sh --connect command=:shutdown



No comments: