![]() |
|
|
||||
|
mod_perl in Apache 2.x
STEP 1:
Download mod_perl 2.0 : http://perl.apache.org/download/index.html then run tar zxf mod_perl* then CD into the mod_perl directory STEP 2: Before you proceed, make sure that Apache 2.0 has been built and installed. mod_perl cannot be built before that. It seems that most users use pre-packaged Apache installation, most of which tend to spread the Apache files across many directories (i.e. not using --enable-layout=Apache, which puts all the files under the same directory). If Apache 2.0 files are spread under different directories, you need to use at least the MP_APXS option, which should be set to a full path to the apxs executable. For example: % perl Makefile.PL MP_APXS=/path/to/apxs For example RedHat Linux system installs the httpd binary, the apxs and apr-config scripts (the latter two are needed to build mod_perl) all in different locations, therefore they configure mod_perl 2.0 as: % perl Makefile.PL MP_APXS=/path/to/apxs \ MP_APR_CONFIG=/another/path/to/apr-config However a correctly built Apache shouldn't require the MP_APR_CONFIG option, since MP_APXS should provide the location of this script. If however all Apache 2.0 files were installed under the same directory, mod_perl 2.0's build only needs to know the path to that directory, passed via the MP_AP_PREFIX option: % perl Makefile.PL MP_AP_PREFIX=$HOME/httpd/prefork STEP 3: make STEP 4: make install STEP 5: Add LoadModule perl_module modules/mod_perl.so into your httpd.conf file |
![]() |
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|