Apache mod_cluster installation from source

This is a bit messy, hopefully it gets the idea across

apt install cmake apache2-dev git ## Debian
yum install cmake apache2-dev git ## CentOS/RedHat

git clone https://github.com/modcluster/mod_proxy_cluster.git
cd mod_proxy_cluster/
mkdir build
cd build
cmake ../native/
make

Debian Apache2 Specific

cp modules/mod_* /usr/lib/apache2/modules/

CentOS/RedHat Specific

cp modules/mod_* /usr/lib64/httpd/modules

nano /etc/apache2/conf-available/00-mod_cluster.conf ## Debian
nano /etc/httpd/conf.modules.d/00-mod_cluster.conf ## Centos/RedHat

00-mod_cluster.conf DEBIAN:

mod_cluster depends on mod_proxy.

LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
LoadModule proxy_ajp_module /usr/lib/apache2/modules/mod_proxy_ajp.so

Next, mod_cluster modules:

LoadModule cluster_slotmem_module /usr/lib/apache2/modules/mod_cluster_slotmem.so
LoadModule manager_module /usr/lib/apache2/modules/mod_manager.so
LoadModule proxy_cluster_module /usr/lib/apache2/modules/mod_proxy_cluster.so
LoadModule advertise_module /usr/lib/apache2/modules/mod_advertise.so

MemManagerFile /var/cache/apache2/mod_cluster

Listen 127.0.0.1:6666   


Require ip 127.0.0

If you have multiple NICs, beware of https://issues.jboss.org/browse/MODCLUSTER-487

AdvertiseGroup 230.0.105.33:23364

EnableMCPMReceive

SetHandler mod_cluster-manager Require ip 127.0.0

To enable the Configuration in apache on Debian

ln -s /etc/apache2/conf-available/00-mod_cluster.conf 00-mod_cluster.conf
mkdir /etc/apache2/logs/
chmod -R 777 /var/cache/apache2/mod_cluster

Leave a Reply