Search code examples
perlapachemod-perl

How do I use a vendor Apache with a self-compiled Perl and mod_perl?


I want to use Apple's or RedHat's built-in Apache but I want to use Perl 5.10 and mod_perl. What's the least intrusive way to accomplish this? I want the advantage of free security patching for the vendor's Apache, dav, php, etc., but I care a lot about which version of Perl I use and what's in my @INC path. I don't mind compiling my own mod_perl.


Solution

    1. Build your version of Perl 5.10 following any special instructions from the mod_perl documentation. Tell Perl configurator to install in some non-standard place, like /usr/local/perl/5.10.0

    2. Use the instructions to build a shared library (or dynamic, or .so) mod_perl against your distribution's Apache, but make sure you run the Makefile.PL using your version of perl:

      /usr/local/perl/5.10.0/bin/perl Makefile.PL APXS=/usr/bin/apxs

    3. Install and configure mod_perl like normal.

    It may be helpful, after step one, to change your path so you don't accidentially get confused about which version of Perl you're using:

    export PATH=/usr/local/perl/5.10.0/bin:$PATH