cd /usr/local/src
wget http://downloads.sourceforge.net/project/mod-ruid/mod_ruid2/mod_ruid2-0.9.4.tar.bz2
tar -jxf mod_ruid2-0.9.4.tar.bz2
cd mod_ruid2-0.9.4
vi ruid2.conf
LoadModule ruid2_module modules/mod_ruid2.so
RMode config
RDefaultUidGid nobody nobody
RUidGid nobody nobody
RGroups nobody
apxs -a -i -l cap -c mod_ruid2.c
Open httpd.conf and remove the line from it:
LoadModule ruid2_module modules/mod_ruid2.so
echo "LoadModule ruid2_module modules/mod_ruid2.so" >> /usr/local/apache/conf/includes/pre_main_global.conf
/usr/local/cpanel/bin/apache_conf_distiller --update
/etc/init.d/httpd restart
In future, /scripts/easyapache recompiles will move the file mod_ruid2.so out of /usr/local/apache/modules folder.
So save a copy of it.
cp /usr/local/apache/modules/mod_ruid2.so /root
vi /scripts/preeasyapache
#!/bin/bash
sed -i 's/LoadModule ruid2_module/#LoadModule ruid2_module/g' /usr/local/apache/conf/includes/pre_main_global.conf
vi /scripts/posteasyapache
#!/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
chmod +x /scripts/preeasyapache
chmod +x /scripts/posteasyapache
Reference : http://forums.cpanel.net/f5/how-install-mod_ruid2-cpanel-server-229422.html
No comments:
Post a Comment