How-to - ModPerl Installation
This section provides installation information for two different classes of Operating Systems. Installation on BSD/Unix/Linux Operating Systems are generally very straight-forward because these products were originally developed for these environments. Later, they were also ported to Microsoft's well-known Windows Operating System, and we have included installation instructions under the "Windows" heading (below) to simplify that installation process too.
§ Installing on FreeBSD, NetBSD, OpenBSD, Linux, etc.
The majority of configurations will likely utilize FreeBSD, NetBSD, OpenBSD, Linux, or some other Unix-like Operating System, most of which include some sort of packaging system such as NetBSD's packages system or the common RPM system on many flavours of Linux. For these, the following software and Perl modules need to be installed:
- Apache HTTPd server v2.2.10 (or newer)
- Perl 5.10 (or newer)
- ModPerl 2.0.4 (or newer)
The respective packages will either be named apache22, perl5, ap2-perl, and p5-libapreq2, or, in the case of pkgsrc, the sources can be found in the www/apache22, lang/perl5, www/ap2-perl, and www/p5-libapreq2 directories.
§ Installing on Windows
For Microsoft's Windows Operating System, which usually serves as a convenient pre-production or proof-of-concept environment although it is also sometimes actually used for production internet hosting, the following instructions will help to get you started with an operational system:
- Download and install Apache HTTPd Server v2.2.10 (or newer)
- The default settings will be fine -- if you choose the "Advanced" options, APR is needed, but the source code isn't required unless you plan to do some compiling (this is beyond the scope of what we're explaining in this guide). Note that even if SSL isn't needed now, that we recommend choosing it from the downloads section anyway since that is very likely to become a requirement (even with self-signed certificates) since your future interactive web site users may expect it.
- Download and install ActiveState Perl v5.10 (or newer)
- The default settings will be fine. In our experience, some odd problems occur when Perl is not installed in its default location of /Perl/ so we recommend leaving the default in C:\Perl\ (the default drive letter will be the same as your Operating System's drive if it's not C:). Perl needs to be added to the PATH environment variable for a number of reasons, so don't turn this option off. This portion of the installation is I/O intensive and requires a lot of time, so this is a good time to take a short break.
- Download and install ModPerl v2.0.4 and Libapreq2 v2.0.8 (or newer)
- Use the ActiveState Perl Package Manager ("ppm.exe") to obtain pre-compiled versions of ModPerl v2.0.4 or newer, and Libapreq2 v2.0.8 or newer.
In your Start Menu navigate to the newly created "ActivePerl" folder and start the "Perl Package Manager." The needed modules are not in ActiveState's repository -- the University of Winnipeg's repository can be accessed through the following functions:
- "Edit" menu
- "Preferences" menu item
- "Repositories" tab
- "Suggested:" pull-down menu
- "uwinnipeg :: University of Winnipeg" option
- "Add" button
- "OK" button
After the list of modules appears, exit the Perl Package Manager -- do NOT use the PPM to install these two packages because it will fail.
- [libapreq2] At the DOS prompt type "ppm install libapreq2" then, when prompted for the path to the top-level Apache2 directory, enter the full path to the Apache HTTPd installation (do not include the "modules" or "bin" directories -- you will be prompted for these later, and the defaults that appear will suffice), which will most likely be "C:\Program Files\Apache Software Foundation\Apache2.2" (without the quotation marks).
- [mod_perl] At the DOS prompt type "ppm install mod_perl" then, when prompted for the location of mod_perl.so, enter the full path to the Apache HTTPd installation, including its "modules" sub-directory, which will most likely be "C:\Program Files\Apache Software Foundation\Apache2.2\modules" (without the quotation marks).
Upon completion, check Apache's "modules" directory to see that both apreq2.so and mod_perl.so were copied correctly.
§ Installation checklist
Now that you have installed the Apache HTTPd server, Perl, and other needed software, please take a moment to quickly review the checklist in the following table before proceeding with the step-by-step configuration guide:
- Apache HTTPd version 2.2.10 or newer (documentation: http://httpd.apache.org/docs/2.2/)
- Perl version 5.10 or newer (documentation: http://www.perl.org/docs.html)
- ModPerl version 2.0.4 or newer (documentation: http://perl.apache.org/)
- Libapreq2 version 2.0.8 or newer (documentation: http://httpd.apache.org/apreq/ and http://apr.apache.org/)
All the software in this checklist must be installed before proceeding with the configuration. If any of these modules are missing, the configuration will not be entirely successful.
Index | Next