The first step is to get the mod_perl software itself. As of
this writing, the current version is 1.15 and should work with Apache 1.2.6
and higher. Once you've downloaded and expanded the source, change your
working directory to the mod_perl source directory (usually named
mod_perl-1.15).
In the source directory, type the following:
perl Makefile.PL EVERYTHING=1
make
make install
The Makefile.PL script will search for the Apache source directory. If it
doesn't find the source, it will prompt you to enter the path to the Apache
source tree. The script will also ask if you want to build Apache. You'll
probably want to say yes here. But building it yourself isn't
necessarily a bad thing; consult the README files for more information
on whether to build or not to build.
By default, mod_perl only turns on the minimum amount of handlers. To
allow us to expand Apache in every way we can, we've just turned on all the
handlers by typing in EVERYTHING=1. But if you're looking for extra
memory and performance, lose the unnecessary handlers by running the
Makefile.PL script without the EVERYTHING=1 argument.
By typing make, you actually make those changes. Then make install installs it into the Perl libraries. But to install the newly compiled binary, you'll have to
run make install within the Apache subdirectory. Do so now.
Congratulations. You have now installed mod_perl. To make sure all's well,
run the httpd binary with the -l flag. If you run the command ./httpd
-l | grep perl, you should get mod_perl.c in the output.
Now let's check out what you can do with it.
next page»