Skip to content

Install Jboss EAP63 on RHEL/CENTOS 7

Following is the procedure to Install & configure JBOSS on Centos/RHEL 7.

  • Download and Install Java JDK 6 or above
  • Download and install JBoss EAP 6.x
  • Create a user who will run and own jboss
  • configure JAVA_HOME and JBOSS_HOME
  • Create a start/stop/restart script for JBoss
  • Configure JBoss to run as a service

Download Oracle JAVA JDK 8U91 64Bit

wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u91-b14/jdk-8u91-linux-x64.tar.gz"

Extract Oracle JAVA JDK 8U91

tar xf jdk-8u91-linux-x64.tar.gz

Install Java JDK using alternatives

alternatives --install /usr/bin/java java /opt/jdk1.8.0_91/bin/java 2
alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_91/bin/jar 2
alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_91/bin/javac 2
alternatives --set jar /opt/jdk1.8.0_91/bin/jar; alternatives --set javac /opt/jdk1.8.0_91/bin/javac

Add it to Profile

sudo vim /etc/profile.d/jdk.sh

#!/bin/sh
export JAVA_HOME=/opt/jdk1.8.0_91
export JRE_HOME=/opt/jdk1.8.0_91/jre
export PATH=$PATH:/opt/jdk1.8.0_91/bin:/opt/jdk1.8.0_91/jre/bin

chmod +x /etc/profile.d/jsk.sh
source /etc/profile.d/jsk.sh

Check Installed JAVA

$ java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

Extract JBOSS EAP

cd /opt
unzip jboss-eap-6.3.zip

Create a soft link for JBOSS EAP

sudo ln -s jboss-eap-6.3 jboss63

Export JBOSS HOME

export JBOSS_HOME=/opt/jboss63

Create JBOSS USER

sudo groupadd jboss
sudo useradd -s /bin/bash -g jboss jboss

Change the ownersip of jboss directory

sudo chown -Rf jboss:jboss jboss63

Copy script for JBOSS

cp /opt/jboss63/bin/init.d/jboss-as-standalone.sh /etc/init.d/jboss

Create a directory for jboss conf file

cd /etc
sudo mkdir jboss-as
cd jboss-as
sudo cp /opt/jboss63/bin/init.d/jboss-as.conf /etc/jboss-as/

Edit Jboss conf file to add jboss user

sudo vi /etc/jboss-as/jboss-as.conf
JBOSS_USER=jboss

Change the run configuration for script

cd /etc/init.d/
sudo chmod 755 jboss
sudo chkconfig --add jboss
sudo chkconfig --level 234 jboss on

Start JBOSS service

service jboss start
Starting jboss-as: [OK]

Shashi View All

A passionate devops and automation engineer

2 thoughts on “Install Jboss EAP63 on RHEL/CENTOS 7 Leave a comment

  1. cd /etc/init.d/
    chmod 755 jboss

    I got this error

    ➜ init.d chmod 755 jboss
    chmod: cannot access ‘jboss’: No such file or directory

    Like

Leave a comment