WebHosting Blog

« Install Ruby | Home | Linux XP Desktop Key Features »

Install Mod_perl on cpanel server

By bob | June 25, 2008

Here is the set of directories which let you install mod_perl onto a cpanel server.

* You can go to your existing account or create new account where you will install mod_perl. You may select either the rvskin admin account or fantastico admin account. Suppose 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
* Unpack the file:
tar xzf mod_perl-1.29.tar.gz
* Move to the mod_perl directoy:
cd mod_perl-1.29
* Configure
perl Makefile.PL USE_APXS=1 WITH_APXS=/usr/local/apache/bin/apxs EVERYTHING=1
*  Run Make
make
Run Install
make install
*  Activate Mod Perl
/usr/local/apache/bin/apxs -a -n perl -i libperl.so
#########
Now 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
— 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 now work.

Topics: Hosting Tools, Hosting Tutorials |

Comments