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]$

 

 

 

 

Friday, 2 February 2024

IBM MQ 9 installation on linux 7

 

The following post is showing the installation of IBM Webspere MQ version 9 on CentOS 7 (64 bit) platform. You can download the trial software from IBM site.

In this post:

  • ü  Setup WebSphere user and Group
  • ü  Kernel Configuration Parameters
  • ü  Read and Accept License
  • ü  Install WebSphere MQ Components
  • ü  Post Installations
  • ü  Verifying Installation
  • ü  Start WebSphere MQ Explorer GUI

1. Setup WebSphere user and Group

On UNIX like systems, WebSphere MQ requires a user ID of the name mqm, with a primary group of mqm to own the directories and files of the product. WebSphere MQ installation will automatically create the user and group for you. However you may want to setup in advance

Login to the system as user root then create user and group as follow:



 2. Kernel Configuration Parameters

To make the following kernel changes log as user with root authority. Open the file "/etc/sysctl.conf" then add or change the following entries to the values shown (if the existing values in file are greater than these values do not change)

 

kernel.shmmni = 4096

kernel.shmall = 2097152

kernel.shmmax = 268435456

kernel.sem = 500 256000 250 1024

fs.file-max = 524288

kernel.threads-max = 30000

Then save and close the file. To load these sysctl values immediately, enter the following command:

 sysctl -p

 If you do not issue the sysctl -p command, the new values are loaded when the system is rebooted.

 Add the following information to the "/etc/security/limits.conf" file

mqm              hard    nofile          10240

mqm              soft    nofile          10240

 

3. Read and Accept License

While login as root set your current working directory to the installation files. Run the "./mqlicense.sh -text_only" command to read accept the license issues or run "./mqlicense.sh -accept" command to accept the license without displaying all text (You must accept the license compliances otherwise you won’t proceed with installation):


 4. Install WebSphere MQ Components

At minimum Webspere MQ server installation you must install MQSeriesRuntime and the MQSeriesServer components. However, this example show the minimum installation of the following components


Log in as root, or switch to the superuser by using the su command. Set your current working directory to the installation files. To install to the location, "/opt/mq9" use the "rpm –ivh" command to install each component as follow

 


After the installation has completed, run the '/opt/mq9/bin/mqconfig'

command, using the 'mqm' user ID.

For example, execute the following statement when running as the 'root' user:

 

    su mqm -c "/opt/mqm/bin/mqconfig"

 

The 'mqconfig' command validates that the system configuration satisfies the

requirements for WebSphere MQ, and ensures that the settings for the 'mqm'

user ID are suitably configured.  Other WebSphere MQ administrators in the

'mqm' group can run this command to ensure their user limits are also

properly configured to use WebSphere MQ.

 

If 'mqconfig' indicates that any of the requirements have not been met,

consult the installation section within the WebSphere MQ Information Center

for details about how to configure the system and user limits.

 

Run the su mqm -c "/opt/mqm/bin/mqconfig" command as suggested to validate configurations


 Install other components


 5. Post Installations

If you have chosen this installation to be the primary installation on the system, set it as the primary installation.  Execute MQ_INSTALLATION_PATH/bin/setmqinst -i -p MQ_INSTALLATION_PATH where MQ_INSTALLATION_PATH represents the directory where WebSphere MQ is installed.

Example


If you want to set up the environment to work with this installation use setmqenv command to set various environment variables for a particular installation of WebSphere MQ


 Check that the environment is set up correctly using dspmqver command as follow


 

6. Verifying Installation

To verify installation configure the default queue manager, use the amqsput sample program to put a message on the queue, then use the amqsget sample program to get the message back from the queue

 Log in as a user in the mqm group use command crtmqm to create a queue manager called QMA1 as follows

 


  Use strmqm command to start the queue manager QMA1 as follow:

 


 Start MQSC to define a local queue called QUEUE1 then stop MQSC as follows

 


 

Change into the MQ_INSTALLATION_PATH/samp/bin directory. Execute "./amqsput QUEUE1 QMA" command, type the message e.g. "hello middleware" then place enter twice


 

Get the messages from the queue as follow:

 



 

And curdepth count is as below.



 7.Start WebSphere MQ Explorer GUI

Log in as a user in the mqm group then run MQExplorer command

 [mqm@localhost ~]$  MQExplorer