Sunday, January 18, 2009

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

* 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

#########
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 work.

0 comments:

Post a Comment

  © Blogger template PingooIgloo by Ourblogtemplates.com 2009

Back to TOP