home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

Book HomeJava and XSLTSearch this book

11.2. 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

The EVERYTHING=1 option says to build mod_perl with all of the supported features. If this isn't what you were looking for or if you'd like to learn more about making a custom Apache build with mod_perl, you should read the INSTALL file that ships with mod_perl.

At the time of this writing, both Apache and mod_perl have been ported to Win32. However, you might have the best results with mod_perl under Win32 if you run ActiveState's Perl distribution and its precompiled version of mod_perl. For further information about building mod_perl under Win32, see INSTALL.win32.



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.











??????????????@Mail.ru