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

 

No comments: