Mod perl

From SlackWiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This is an example of installing mod_perl on SlackWare 12.0 using the SlackBuild system. I put everything in /root/SlackBuild_mod_perl and I did all the following commands as root. I figured it out from this page: http://slackbuilds.org/howto/

First, I downloaded everything. I went to http://slackbuilds.org/repository/12.0/development/mod_perl/ and I downloaded the "slackbuild" file, mod_perl.tgz, and the source, mod_perl-2.0.3.tar.gz, into /root/SlackBuild_mod_perl

I unpacked the SlackBuild package:

root@pecan:~# cd ~/SlackBuild_mod_perl/
root@pecan:~/SlackBuild_mod_perl# tar xzvf mod_perl.tgz 
mod_perl/
mod_perl/README
mod_perl/doinst.sh
mod_perl/mod_perl.SlackBuild
mod_perl/mod_perl.conf
mod_perl/mod_perl.info
mod_perl/slack-desc
root@pecan:~/SlackBuild_mod_perl# 

I moved the mod_perl source into the mod_perl SlackBuild directory, and editted the SlackBuild script:

mv mod_perl-2.0.3.tar.gz mod_perl
cd mod_perl
emacs mod_perl.SlackBuild

When editting, I just checked that the VERSION= line matched the actual version of the source (2.0.3).

Then I executed the SlackBuild script:

./mod_perl.SlackBuild

That command ran for quite a while and produced a lot of compiling output.

When it was done, there was a package left in /tmp. I moved it to /root so it would not be deleted later.

I installed it with installpkg:

root@pecan:~# installpkg mod_perl-2.0.3-i486-1_SBo.tgz 
Installing package mod_perl-2.0.3-i486-1_SBo... 
PACKAGE DESCRIPTION:
mod_perl: mod_perl (Perl Interpreter for Apache)
mod_perl:
mod_perl: Mod_perl incorporates a Perl interpreter into the Apache web server
mod_perl: so that the Apache web server can directly execute Perl code.
mod_perl: Mod_perl links the Perl runtime library into the Apache web server 
mod_perl: and provides an object-oriented Perl interface for Apache's C
mod_perl: language API. The end result is a quicker CGI script turnaround 
mod_perl: process, since no external Perl interpreter has to be started.
mod_perl:
mod_perl: Homepage: http://perl.apache.org/
mod_perl:
Executing install script for mod_perl-2.0.3-i486-1_SBo...
root@pecan:~# 

At this point I checked that the file /usr/lib/httpd/modules/mod_perl.so existed, and it did. I editted /etc/httpd/httpd.conf and uncommented the line that included /etc/httpd/mod_perl.conf, and then ran httpd -t to make sure there were no syntax errors. I ran "/etc/rc.d/rc.httpd restart" to restart the apache server, and it appeared to work. The web page still worked, and perl scripts still ran.

How can I tell if mod_perl or perl cgi is being used ? I'm not sure, please add that info you know.