Installing mod_perl
If you already have Apache installed on your machine, you will have to rebuild it with mod_perl. If you prefer, you can install the mod_perl-enabled Apache installation somewhere else, which we’ll also detail in this section. You can get the source for both Apache and mod_perl from http://www.apache.org/dist/httpd/. You can get mod_perl alone from CPAN or from http://perl.apache.org/dist/. The mod_perl build process is quite configurable, and after you’ve met some Perl module dependencies, you should be well on your way to building and getting your mod_perl-enabled Apache installation online.
First, you should take a look at your existing Apache installation (or installations) and make sure that you don’t unintentionally interfere with a working Apache installation. If you’re running Apache-1.3.X, it’s likely that your Apache installation lives under /usr/local/apache, or C:\apache if you’re on a Win32 platform. Second, make sure that you’re running a current version of Perl and that you’ve installed the LWP Bundle of modules. If you haven’t installed the LWP modules bundle, mod_perl might not build correctly and will not run its tests correctly.
Once you’ve met the requirements listed above, you should unpack the Apache and mod_perl distributions and run:
% perl Makefile.PL EVERYTHING=1 APACHE_PREFIX=[target directory]Next, run make, make test, and assuming all goes well, make install to install the mod_perl-enabled Apache:
% make % make test % make install
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access