Friday, 20 February 2026

Setup JBoss EAP 8.0 in Domain Mode

 

In this tutorial we will show all the steps to configure a JBOSS as Domain on one physical server (Machine).

 Note: Due to the naming convention changes in JBoss EAP 8.0, the Master is now called as Primary host, and the Slave is called as Secondary host.

 The Domain Controller must be started before any Host Controller in the domain.

Always perform this procedure first on the Domain Controller, and then repeat it on each associated Host Controller and every other host that belongs to the domain.

 I am going to configure domain as below Architecture.



I am going to configure one Domain Controller (DC), two Host Controllers (HCs), and the application servers on the same machine. Therefore, the first step is to copy the configuration directory from $JBoss_HOME/domain/ to separate locations for each controller instance.


/u01/apps/JBoss81  à JBoss_HOME

Here, I have created three directories under JBOSS_HOME and copied the configuration directory from /JBOSS_HOME/domain/ into each of them as shown below.

/u01/apps/JBoss81/my-domain/slave1   à  Slave01   (Secondary host)

/u01/apps/JBoss81/my-domain/slave2  à Slave02  (Secondary host)

/u01/apps/JBoss81/my-domain/master  à Master   -  (Primary  host)


1.Configure the Domain

a. Configure the Domain Name as below in host.xml file.

<host xmlns="urn:jboss:domain:20.0" name="primary">

 Now we can start the domain controller with the following command.

[jbossas@middleware bin]$ nohup /u01/apps/JBoss81/bin/domain.sh --host-config=host.xml -Djboss.bind.address=127.0.0.1 -Djboss.bind.address.management=127.0.0.1 -Djboss.bind.address.public=127.0.0.1  -Djboss.bind.address.private=127.0.0.1 -Djboss.management.http.port=9990 -Djboss.domain.base.dir=/u01/apps/JBoss81/my-domain/master -Djboss.domain.temp.dir=/tmp &

 Admin console listening on http://127.0.0.1:9990/console


2. Configure the slave 1

 a.  Configure the Host Name in host.xml (This file located in /u01/apps/JBoss81/my-domain/slave1/configuration directory)


 <host xmlns="urn:jboss:domain:20.0" name="slave01">

 

b. Configure the Domain-controller definition as below in host.xml file. 

    <domain-controller>

        <remote  authentication-context="secondary-hc-auth-context">

            <discovery-options>

                <static-discovery name="primary" protocol="${jboss.domain.primary.protocol:remote+http}" host="${jboss.domain.primary.address}" port="${jboss.domain.primary.port:9990}"/>

            </discovery-options>

        </remote>

    </domain-controller>

 

c. Configure the authentication-client under the Elytron subsystem in the host.xml file as shown below



ex:

...

<subsystem xmlns="urn:wildfly:elytron:16.0" final-providers="combined-providers" disallowed-providers="OracleUcrypto">

            <authentication-client>                       <!-- This line has been added -->

                <authentication-configuration name="secondary-hc-auth" authentication-name="secondary" realm="ManagementRealm" sasl-mechanism-selector="DIGEST-MD5">       <!-- This line has been added --> <!-- In authentication-name give the name of the user which was created using ./add-user.sh -->

                    <credential-reference clear-text="Pass12#"/>    <!-- This line has been added. Add the same password given while adding user -->

                </authentication-configuration>                     <!-- This line has been added -->

                <authentication-context name="secondary-hc-auth-context">  <!-- This line has been added -->

                    <match-rule authentication-configuration="secondary-hc-auth"/> <!-- This line has been added -->

                </authentication-context>                           <!-- This line has been added -->

            </authentication-client>

...

 


Now we can start the Host controller (Slave 01)with the following command.

 

[jbossas@middleware bin]$ nohup /u01/apps/JBoss81/bin/domain.sh --host-config=host.xml -Djboss.bind.address.management=127.0.0.1 -Djboss.bind.address=127.0.0.1 -Djboss.bind.address.private=127.0.0.1 -Djboss.management.http.port=9994 -Djboss.domain.primary.address=127.0.0.1 -Djboss.domain.primary.port=9990 -Djboss.domain.base.dir=/u01/apps/JBoss81/my-domain/slave1 -Djboss.domain.temp.dir=/tmp &

 Once slave01 successfully started, check in admin console either slave01 connected to master or not.

during the slave starting time, some files/directories created in slave home directory.

 

[bharath@middleware slave1]$ ls -ltr /u01/apps/JBoss81/my-domain/slave1

total 4

drwxr-xr-x 3 bharath bharath   18 Feb 20 12:59 tmp

drwxr-xr-x 2 bharath bharath   80 Feb 20 12:59 log

drwxr-xr-x 5 bharath bharath   53 Feb 20 12:59 data

drwxr-xr-x 6 bharath bharath   76 Feb 20 13:02 servers

drwxr-xr-x 3 bharath bharath 4096 Feb 20 13:33 configuration

[bharath@middleware slave1]$

 

 

 

3. Configure slave02

 

a. Configure the Host Name in host-.xml (This file located in /u01/apps/JBoss81/my-domain/slave2/configuration directory)

<host xmlns="urn:jboss:domain:20.0" name="slave02">

 

b. Configure the Domain-controller definition as below in host.xml file.

 

    <domain-controller>

        <remote  authentication-context="secondary-hc-auth-context">

            <discovery-options>

                <static-discovery name="primary" protocol="${jboss.domain.primary.protocol:remote+http}" host="${jboss.domain.primary.address}" port="${jboss.domain.primary.port:9990}"/>

            </discovery-options>

        </remote>

    </domain-controller>

 

c. Configure the authentication-client under the Elytron subsystem in the host.xml file as shown below

 

Now we can start the Host controller (Slave 02)with the following command.

 

nohup /u01/apps/JBoss81/bin/domain.sh --host-config=host.xml -Djboss.bind.address.management=127.0.0.1 -Djboss.bind.address=127.0.0.1 -Djboss.bind.address.private=127.0.0.1 -Djboss.management.http.port=9996 -Djboss.domain.primary.address=127.0.0.1 -Djboss.domain.primary.port=9990 -Djboss.domain.base.dir=/u01/apps/JBoss81/my-domain/slave2 -Djboss.domain.temp.dir=/tmp &

 

Once slave02 successfully started, check in admin console either slave02 connected to master or not.



 

The Primary (Master) and Secondary (Slave) hosts have been started successfully and are now visible in the administration console.




Thursday, 29 February 2024

Installing the mod_cluster for Apache in Linux

 

 Download mod-cluster modules (source code) from the following site - https://github.com/modcluster/mod_cluster/releases

Once the download is complete, Unzip the same file, then  compile & install the mod_cluster source code.

 

After Unzip, below are the files inside the mod_cluster source code:

[root@middleware mod_cluster-1.3.20.Final]# ls -ltr

total 84

-rw-rw-r--  1 root root   454 Feb  7 11:26 test-jars.xml

drwxrwxr-x  4 root root    32 Feb  7 11:26 test

drwxrwxr-x  4 root root    34 Feb  7 11:26 src

drwxrwxr-x  2 root root   118 Feb  7 11:26 site-mod_cluster

drwxrwxr-x  2 root root    21 Feb  7 11:26 sar

-rw-rw-r--  1 root root   910 Feb  7 11:26 release.txt

-rw-rw-r--  1 root root  3703 Feb  7 11:26 README.md

-rw-rw-r--  1 root root 16915 Feb  7 11:26 pom.xml

drwxrwxr-x 10 root root   191 Feb  7 11:26 native

-rw-rw-r--  1 root root  6609 Feb  7 11:26 mvnw.cmd

-rwxrwxr-x  1 root root 10078 Feb  7 11:26 mvnw

-rw-rw-r--  1 root root  2832 Feb  7 11:26 local.properties

-rw-rw-r--  1 root root  7639 Feb  7 11:26 lgpl.txt

drwxrwxr-x  4 root root    51 Feb  7 11:26 docs

drwxrwxr-x  4 root root    49 Feb  7 11:26 demo

drwxrwxr-x  3 root root    32 Feb  7 11:26 core

drwxrwxr-x  3 root root    32 Feb  7 11:26 container-spi

drwxrwxr-x  8 root root   125 Feb  7 11:26 container

-rw-rw-r--  1 root root 19948 Feb  7 11:26 build-test.xml

[root@middleware mod_cluster-1.3.20.Final]#

 

Below are the four mod_cluster modules required.

  1.  advertise
  2.  mod_cluster_slotmem
  3.  mod_manager
  4.  mod_proxy_cluster

So, go to native directory and follow the below steps:

a.      Install the advertise module

[root@middleware mod_cluster-1.3.20.Final]# cd native/

[root@middleware native]# cd  advertise/

[root@middleware advertise]# ./buildconf

Creating configure ...

[root@middleware advertise]# ./configure --with-apxs=/u01/apps/Apache/bin/apxs  

[root@middleware advertise]# make

[root@middleware advertise]# make install

 Here, /u01/apps/Apache  is the APACHE_HOME. 

mod_advertise.so file has created and copy the same to Apache modules directory

[root@middleware advertise]# ls -ltr

total 332

-rw-rw-r-- 1 root root   577 Feb  7 11:26 README

-rw-rw-r-- 1 root root  3439 Feb  7 11:26 mod_advertise.h

-rw-rw-r-- 1 root root 33408 Feb  7 11:26 mod_advertise.c

-rw-rw-r-- 1 root root   673 Feb  7 11:26 Makefile.in

-rw-rw-r-- 1 root root   950 Feb  7 11:26 configure.in

-rw-rw-r-- 1 root root   710 Feb  7 11:26 CMakeLists.txt

-rwxrwxr-x 1 root root   192 Feb  7 11:26 buildconf

drwxr-xr-x 2 root root    54 Feb 22 11:22 autom4te.cache

-rwxr-xr-x 1 root root 84962 Feb 22 11:22 configure

-rwxr-xr-x 1 root root 24038 Feb 22 11:25 config.status

-rw-r--r-- 1 root root   729 Feb 22 11:25 Makefile

-rw-r--r-- 1 root root  3491 Feb 22 11:25 config.log

-rw-r--r-- 1 root root 85528 Feb 22 11:25 mod_advertise.o

-rw-r--r-- 1 root root   291 Feb 22 11:25 mod_advertise.lo

-rw-r--r-- 1 root root     0 Feb 22 11:25 mod_advertise.slo

-rwxr-xr-x 1 root root 66440 Feb 22 11:25 mod_advertise.so

[root@middleware advertise]#

 

b.      Install the mod_cluster_slotmem module

[root@middleware native]# cd  mod_cluster_slotmem/

[root@middleware mod_cluster_slotmem]# ./buildconf

Creating configure ...

[root@middleware mod_cluster_slotmem]# ./configure --with-apxs=/u01/apps/Apache/bin/apxs  

[root@middleware mod_cluster_slotmem]# make

[root@middleware mod_manager]# make install

 

mod_cluster_slotmem.so file created, now copy the same to Apache module directory.

[root@middleware mod_cluster_slotmem]# ls

autom4te.cache  config.log     configure.in  mod_cluster_slotmem.so  mod_sharedmem.o    sharedmem_util.h   sharedmem_util.slo

buildconf       config.status  Makefile      mod_sharedmem.c         mod_sharedmem.slo  sharedmem_util.lo

CMakeLists.txt  configure      Makefile.in   mod_sharedmem.lo        sharedmem_util.c   sharedmem_util.o

[root@middleware mod_cluster_slotmem]#

 

c.      Install the mod_manager  module:

[root@middleware native]# cd mod_manager/

[root@middleware mod_manager]# ls

balancer.c  buildconf  CMakeLists.txt  configure.in  context.c  domain.c  host.c  jgroupsid.c  Makefile.in  mod_manager.c  mod_manager.h  node.c  sessionid.c

[root@middleware mod_manager]# ./buildconf

Creating configure ...

[root@middleware mod_manager]# ./configure --with-apxs=/u01/apps/Apache/bin/apxs  

[root@middleware mod_manager]# make

[root@middleware mod_manager]# make install

 

mod_manager  module created. Copy the same to Apache modules directory

[root@middleware mod_manager]# ls

autom4te.cache  buildconf       configure.in  domain.c    host.lo       jgroupsid.o    mod_manager.h    node.c       sessionid.lo

balancer.c      CMakeLists.txt  context.c     domain.lo   host.o        jgroupsid.slo  mod_manager.lo   node.lo      sessionid.o

balancer.lo     config.log      context.lo    domain.o    host.slo      Makefile       mod_manager.o    node.o       sessionid.slo

balancer.o      config.status   context.o     domain.slo  jgroupsid.c   Makefile.in    mod_manager.slo  node.slo

balancer.slo    configure       context.slo   host.c      jgroupsid.lo  mod_manager.c  mod_manager.so   sessionid.c

[root@middleware mod_manager]#

 

d.      Install the mod_proxy_cluster module

[root@middleware mod_manager]# cd ..

[root@middleware native]# cd mod_proxy_cluster

[root@middleware mod_proxy_cluster]# ./buildconf

Creating configure ...

[root@middleware mod_proxy_cluster]# ./configure --with-apxs=/u01/apps/Apache/bin/apxs  

[root@middleware mod_manager]# make

[root@middleware mod_manager]# make install

 

Copy the mod_proxy_cluster.so to Apache modules directory .

[root@middleware mod_proxy_cluster]# ls

autom4te.cache  config.log           config.status  Makefile             mod_proxy_cluster.c   mod_proxy_cluster.slo

buildconf       config.m4.2.4.patch  configure      Makefile.in          mod_proxy_cluster.lo  mod_proxy_cluster.so

CMakeLists.txt  config.m4.patch      configure.in   mod_proxy_ajp.patch  mod_proxy_cluster.o   NMAKEmakefile.example

[root@middleware mod_proxy_cluster]#

 

Tuesday, 27 February 2024

Websphere InstallationManager commands

 

 

Install the InstallationManager:

[bharath@middleware tools]$ ./imcl install com.ibm.cic.agent -repositories ../repository.config -installationDirectory /u01/apps/IM14 -acceptLicense  -log /tmp/im.log -sP

                 25%                50%                75%                100%

------------------|------------------|------------------|------------------|

............................................................................

[bharath@middleware tools]$

 

IMCL Version:

[bharath@middleware tools]$ /u01/apps/IM14/eclipse/tools/imcl version

Version 1.4.3.1

Internal Version 1.4.3001.20110504_1325

[bharath@middleware tools]$

 

 

ListAvailable Packages:

 

[bharath@middleware tools]$ ]$ /u01/apps/IM14/eclipse/tools/imcl listAvailablePackages  -repositories /home/bharath/Desktop/wasnd/ihs80soft/repository.config

com.ibm.websphere.APPCLIENT.v80_8.0.0.20110503_0200

com.ibm.websphere.IHS.v80_8.0.0.20110503_0200

com.ibm.websphere.PLG.v80_8.0.0.20110503_0200

com.ibm.websphere.PLUGCLIENT.v80_8.0.0.20110503_0200

com.ibm.websphere.WCT.v80_8.0.0.20110503_0200

[bharath@middleware tools]$

 

 

Install the Websphere ND package:

[bharath@middleware tools]$ /u01/apps/IM14/eclipse/tools/imcl  install com.ibm.websphere.ND.v80_8.0.0.20110503_0200 -repositories /home/bharath/Desktop/wasnd/was80soft/repository.config -installationDirectory /u01/apps/was8  -acceptLicense  -log /tmp/im.log -sP  -sharedResourcesDirectory /u01/apps/IMShared

               25%                50%                75%                100%

------------------|------------------|------------------|------------------|

............................................................................

[bharath@middleware tools]$

 

 

 

Install the IHS:

[bharath@middleware tools]$ ./imcl  install com.ibm.websphere.IHS.v80_8.0.0.20110503_0200 -repositories /home/bharath/Desktop/wasnd/ihs80soft/repository.config -installationDirectory /u01/apps/ihs8  -acceptLicense  -log /tmp/im.log -sP  -sharedResourcesDirectory /u01/apps/IMShared -properties user.ihs.httpPort=8080,user.ihs.allowNonRootSilentInstall=true

00:03.08 WARNING [main] com.ibm.cic.agent.core.internal.commands.PreferenceCommand execute

  The location for the shared resources directory cannot be modified: old /home/bharath/IBM/IMShared; new /u01/apps/IMShared.

                 25%                50%                75%                100%

------------------|------------------|------------------|------------------|

............................................................................

[bharath@middleware tools]$

 

 

Install Plugin:

[bharath@middleware tools]$ ./imcl  install com.ibm.websphere.PLG.v80_8.0.0.20110503_0200  -repositories /home/bharath/Desktop/wasnd/ihs80soft/repository.config -installationDirectory /u01/apps/ihsPlugins  -acceptLicense  -log /tmp/im.log -sP   -sharedResourcesDirectory /u01/apps/IMShared

                 25%                50%                75%                100%

------------------|------------------|------------------|------------------|

............................................................................

[bharath@middleware tools]$

 

 

Install the websphere customization toolbox

[bharath@middleware tools]$ ./imcl  install com.ibm.websphere.WCT.v80_8.0.0.20110503_0200  -repositories /home/bharath/Desktop/wasnd/ihs80soft/repository.config -installationDirectory /u01/apps/WCT  -acceptLicense  -log /tmp/im.log  -sP   -sharedResourcesDirectory /u01/apps/IMShared

 

                 25%                50%                75%                100%

------------------|------------------|------------------|------------------|

............................................................................

[bharath@middleware tools]$

 

 

Apply the FixPatch on Websphere App server:

Check the listAvailablePackages   on FixPatch

bharath@middleware tools]$ /u01/apps/IM14/eclipse/tools/imcl  listAvailablePackages  -repositories /home/bharath/Desktop/wasnd/8.0.0-WS-WAS-FP0000005/repository.config

com.ibm.websphere.BASE.v80_8.0.5.20121022_1902

com.ibm.websphere.BASETRIAL.v80_8.0.5.20121022_1902

com.ibm.websphere.DEVELOPERS.v80_8.0.5.20121022_1902

com.ibm.websphere.DEVELOPERSILAN.v80_8.0.5.20121022_1902

com.ibm.websphere.EXPRESS.v80_8.0.5.20121022_1902

com.ibm.websphere.EXPRESSTRIAL.v80_8.0.5.20121022_1902

com.ibm.websphere.ND.v80_8.0.5.20121022_1902

com.ibm.websphere.NDDMZ.v80_8.0.5.20121022_1902

com.ibm.websphere.NDDMZTRIAL.v80_8.0.5.20121022_1902

com.ibm.websphere.NDTRIAL.v80_8.0.5.20121022_1902

[bharath@middleware tools]$

 

 

Apply the FixPatch

[bharath@middleware tools]$ /u01/apps/IM14/eclipse/tools/imcl install com.ibm.websphere.ND.v80_8.0.5.20121022_1902  -repositories /home/bharath/Desktop/wasnd/8.0.0-WS-WAS-FP0000005/repository.config -installationDirectory /u01/apps/was8 -acceptLicense -showProgress

                 25%                50%                75%                100%

------------------|------------------|------------------|------------------|

............................................................................

[bharath@middleware tools]$

 

 

listAvailablePackages   on IHS patch:

[bharath@middleware tools]$ /u01/apps/IM14/eclipse/tools/imcl  listAvailablePackages  -repositories /home/bharath/Desktop/wasnd/wassupplements80soft/repository.config

com.ibm.websphere.APPCLIENT.v80_8.0.0.20110503_0200

com.ibm.websphere.IHS.v80_8.0.0.20110503_0200

com.ibm.websphere.PLG.v80_8.0.0.20110503_0200

com.ibm.websphere.PLUGCLIENT.v80_8.0.0.20110503_0200

com.ibm.websphere.WCT.v80_8.0.0.20110503_0200

 

 

Apply the IHS patch:

 

[bharath@middleware tools]$ /u01/apps/IM14/eclipse/tools/imcl install com.ibm.websphere.IHS.v80_8.0.0.20110503_0200  -repositories /home/bharath/Desktop/wasnd/wassupplements80soft/repository.config -installationDirectory /u01/apps/ihs8 -acceptLicense -showProgress

                 25%                50%                75%                100%

------------------|------------------|------------------|------------------|

............................................................................

[bharath@middleware tools]$

Apply the Plugin Patch

[bharath@middleware tools]$ /u01/apps/IM14/eclipse/tools/imcl install com.ibm.websphere.PLG.v80_8.0.0.20110503_0200  -repositories /home/bharath/Desktop/wasnd/wassupplements80soft/repository.config -installationDirectory /u01/apps/ihsPlugins/ -acceptLicense -showProgress

                 25%                50%                75%                100%

------------------|------------------|------------------|------------------|

............................................................................

[bharath@middleware tools]$

 

 

listInstalledPackages

[bharath@middleware tools]$ /u01/apps/IM14/eclipse/tools/imcl listInstalledPackages

com.ibm.cic.agent_1.4.3001.20110504_1325

com.ibm.websphere.ND.v80_8.0.5.20121022_1902

com.ibm.websphere.IHS.v80_8.0.0.20110503_0200

com.ibm.websphere.PLG.v80_8.0.0.20110503_0200

com.ibm.websphere.WCT.v80_8.0.0.20110503_0200

[bharath@middleware tools]$