JBoss Web-Application Cluster: Installation of JBoss ON

Today I want to share installation of JBoss ON. This is the fifth post, part of JBoss Web-Application Cluster.

Here is prerequisites before to start installation of JBoss ON:

1. Mount RHEL DVD

# mkdir /media/repo
# mount -o loop /dev/cdrom /media/repo
# ls /media/repo/

2. Make RHEL DVD as repository

# vi /etc/yum.repos.d/dvd.repo
[RHEL6.3-Repo]
name = RHEL 6.3 DVD Repo
baseurl = file:///media/repo
enable = 1
gpgcheck = 0

[RHEL6.3-Server]
name = RHEL 6.3 DVD Server
baseurl = file:///media/repo/Server
enable = 1
gpgcheck = 0

[RHEL6.3-ResilientStorage]
name = RHEL 6.3 DVD ResilientStorage
baseurl = file:///media/repo/ResilientStorage
enable = 1
gpgcheck = 0

[RHEL6.3-LoadBalancer]
name = RHEL 6.3 DVD LoadBalancer
baseurl = file:///media/repo/LoadBalancer
enable = 1
gpgcheck = 0

[RHEL6.3-HighAvailability]
name = RHEL 6.3 DVD HighAvailability
baseurl = file:///media/repo/HighAvailability
enable = 1
gpgcheck = 0

3. Ensure RHEL DVD is enabled as repository

# yum repolist

4. Auto-mount RHEL DVD after boot (Optional)

# vi /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
mount -o loop /dev/cdrom /media/repo

5. Turn off iptables and unregister it from startup service

# service iptables stop
# service ip6tables stop
# chkconfig iptables off
# chkconfig ip6tables off

6. Disable SELinux

# vi /etc/sysconfig/selinux
# setenforce 0
# getenforce 0

7. Use hostname instead of using IP address

# vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
200.200.200.50 ews-vip
200.200.200.51 ews-node1
200.200.200.52 ews-node2
200.200.200.53 eap-node1
200.200.200.54 eap-node2
200.200.200.55 jon-node

8. Edit local hostname

# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=jon-node

Let’s start installation of JBoss ON:

1. Install and start PostgreSQL then register it as startup service

# yum -y install postgresql-server
# service postgresql initdb
# service postgresql start
# chkconfig postgresql on

2. Create user & database for JBoss ON on database

# su - postgres
$ psql

=# ALTER USER postgres PASSWORD 'redhat';
=# CREATE USER rhqadmin PASSWORD 'rhqadmin';
=# CREATE DATABASE rhq OWNER rhqadmin;
=# \q
$ exit

3. Allow PostgreSQL to be accessed by own IP address

# vi /var/lib/pgsql/data/pg_hba.conf

Find these command lines and change these values as below:

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5

host all all 200.200.200.55/24 md5

4. Tuning PostgreSQL

# vi /var/lib/pgsql/data/postgresql.conf

Find these command lines and change these values as below:

listen_addresses = '*'
shared_buffers = 80MB
work_mem = 2048
checkpoint_segments = 10

5. Restart PostgreSQL

# service postgresql restart

6. Install Java

# cd /opt
# rpm -ivh /opt/jdk-8u45-linux-x64.rpm

7. Set Java path on bashrc

# vi /root/.bashrc

Copy these configs at the end of this bashrc file

export JAVA_HOME=/usr/java/jdk1.8.0_45

8. Recall bashrc

# source /root/.bashrc

9. Install JBoss ON

# yum -y install unzip
# unzip jon-server-3.3.0.GA.zip
# cd /opt/jon-server-3.3.0.GA/bin/
# ./rhqctl install --start


► Answer yes to set password JBoss ON rhqadmin user
► Fill password for JBoss ON rhqadmin user
► Re-type entered password
► Answer yes to fill JBoss ON own IP address
► Fill with JBoss ON own IP address
► Answer yes to confirm IP address

10. Stop JBoss ON service

# ./rhqctl stop

11. Patch JBoss ON

# cd /opt/
# unzip jon-server-3.3-update-05.zip
# cd jon-server-3.3.0.GA-update-05
# ./apply-updates.sh /opt/jon-server-3.3.0.GA/
# cd /opt/jon-server-3.3.0.GA/bin/
# ./rhqctl start

12. Register JBoss ON as startup service

# cp /opt/jon-server-3.3.0.GA/bin/rhqctl /etc/init.d/
# vi /etc/init.d/rhqctl


Fill these commands between RHQ Control Script Comment and debug_msg ()

RHQ_SERVER_HOME=/opt/jon-server-3.3.0.GA
RHQ_JAVA_HOME=/usr/java/jdk1.8.0_45


Fill these commands between #!/bin/sh and RHQ Control Script Comment

#chkconfig: 2345 95 20
#description: JBoss Operations Network Server
#processname: standalone.sh


# chkconfig --add rhqctl
# chkconfig rhqctl on
# vi /opt/jon-startup.sh


Create jon-startup.sh and fill with these commands

#!/bin/bash
sleep 30;
source /root/.bashrc
/etc/init.d/rhqctl start;
exit 0


# vi /etc/rc.local

Copy these configs at the end of this rc.local file

/opt/./jon-startup.sh

Finally, Installation of JBoss ON is done. On the next post I will post about installation of JBoss ON Agent on JBoss EWS nodes and JBoss EAP nodes. See you on the next post!

Ade Destrianto
Fortune favors the bold.

Leave a Reply

Your email address will not be published. Required fields are marked *