Jan 2, 2012

How to install the mod_ruid2 cpanel

You can somply fillow these steps to install mod_ruid2 manually with cpanel server.

yum -y install libcap-devel

The rest is just like those other threads but using the requisite module name and location:

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:

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:

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:

cp /usr/local/apache/modules/mod_ruid2.so /root

Now, before you run /scripts/easyapache in the future, create these files:

nano /scripts/preeasyapache

Place the following content into the file:

#!/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:

vi /scripts/posteasyapache

Place the following content into the file:

#!/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:


chmod +x /scripts/preeasyapache
chmod +x /scripts/posteasyapache

0 comments:

Post a Comment

 

Copyright © 2011 Best WebHosting Tips | Design by Kenga Ads-template