How to Install Mod_perl on cpanel server
* First-To install Mod_perl, Login to your existing account or create new account. You may select either the rvskin admin account or fantastico admin account. In case if you’ve install it in the rvadmin account, then you can proceed as below.
* SSH into the server, and go to:
cd /home/rvadmin/ directory
* Get the mod_perl-1.29.tar.gz
wget http://perl.apache.org/dist/mod_perl-1.0-current.tar.gz
tar xzf mod_perl-1.29.tar.gz
cd mod_perl-1.29
perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/local/apache/bin/apxs EVERYTHING=1
make
make install
/usr/local/apache/bin/apxs -a -n perl -i libperl.so
#########
Create the script as shown below, and add it to the root directory of the mod_perl account holder (for this case rvadmin), and modify the permissions (chmod +x add-mod-perl.sh), so to add mod_perl back into apache, you just require to run the script, and then confirm that apache restarted with mod perl in it, you can then check in WHM/News to see if mod_perl is listed .
#########
Create the script as shown below, and add it to the root directory of the mod_perl account holder (for this case rvadmin), and modify the permissions (chmod +x add-mod-perl.sh), so to add mod_perl back into apache, you just require to run the script, and then confirm that apache restarted with mod perl in it, you can then check in WHM/News to see if mod_perl is listed .
#########
Now you will need to run if you re-compile Apache. The mod_perl binary is at
/home/rvadmin/mod_perl-1.29/apaci/libperl.so, to make it more simple just put the following lines in a file:
— cut here —
#!/bin/sh
libperl=/home/rvadmin/mod_perl-1.29/apaci/libperl.so
apxs=/usr/local/apache/bin/apxs
$apxs -a -n perl -i $libperl
/etc/init.d/httpd stop
/etc/init.d/httpd start
libperl=/home/rvadmin/mod_perl-1.29/apaci/libperl.so
apxs=/usr/local/apache/bin/apxs
$apxs -a -n perl -i $libperl
/etc/init.d/httpd stop
/etc/init.d/httpd start
— cut here —
Name the file add-mod-perl.sh and execute “chmod +x add-mod-perl.sh”. after compiling apache run the script (”./add-mod-perl.sh”) and it should work.

0 comments:
Post a Comment