This module is installed like any other Apache module that can be dynamically installed. Such as how I've explained on two recent threads for other Apache modules:
http://forums.cpanel.net/f5/mod_auth_external-227902.html
http://forums.cpanel.net/f185/how-set-mod_sed-cpanel-227452.html
The only difference for this module is that libcap-devel is required and has to be installed via yum first if you don't already have it:
Code:
yum -y install libcap-devel
The rest is just like those other threads but using the requisite module name and location:
Code:
cd /root
wget http://downloads.sourceforge.net/project/mod-ruid/mod_ruid2/mod_ruid2-0.9.4.tar.bz2
tar xvfj mod_ruid2-0.9.4.tar.bz2
cd mod_ruid2-0.9.4
apxs -a -i -l cap -c mod_ruid2.c
After doing the above, it will then put a "LoadModule" into /usr/local/apache/conf/httpd.conf file:
Code:
LoadModule ruid2_module modules/mod_ruid2.so
The module can cause conflicts during EasyApache build, so I would suggest moving it and distilling the include. First, remove the "LoadModule" line mentioned above from /usr/local/apache/conf/httpd.conf, then run these commands:
Code:
echo "LoadModule ruid2_module modules/mod_ruid2.so" >> /usr/local/apache/conf/includes/pre_main_global.conf
cp /usr/local/apache/conf/httpd/conf /usr/local/apache/conf/httpd.conf.bak110826
/usr/local/cpanel/bin/apache_conf_distiller --update
/scripts/rebuildhttpdconf
/etc/init.d/httpd restart
Now, copy the mod_ruid2.so file to /root to save a copy of it, since future /scripts/easyapache recompiles will move the file out of /usr/local/apache/modules folder:
Code:
cp /usr/local/apache/modules/mod_ruid2.so /root
Now, before you run /scripts/easyapache in the future, create these files:
Code:
vi /scripts/preeasyapache
Place the following content into the file:
Code:
#!/bin/bash
sed -i 's/LoadModule ruid2_module/#LoadModule ruid2_module/g' /usr/local/apache/conf/includes/pre_main_global.conf
Next, create this file:
Code:
vi /scripts/posteasyapache
Place the following content into the file:
Code:
#!/bin/bash
cp /root/mod_ruid2.so /usr/local/apache/modules/
sed -i 's/#LoadModule ruid2_module/LoadModule ruid2_module/g' /usr/local/apache/conf/includes/pre_main_global.conf
/etc/init.d/httpd restart
The first script comments out the LoadModule in /usr/local/apache/conf/includes/pre_main_global.conf at the beginning of the Apache build. The second script copies mod_ruid2.so back into /usr/local/apache/modules folder, uncomments the LoadModule, and restarts Apache at the end of the build.
After saving these files, ensure they can execute:
Code:
chmod +x /scripts/preeasyapache
chmod +x /scripts/posteasyapache
For this question:
If in the future when we recompile apache from easyaapche, shall we also install mod_ruid2 manually again?
If you use the steps I've indicated above, you won't have to manually recompile mod_ruid2 again.