20080115

mod_perl+php+apach

apache编译参数

../configure --prefix=/opt/apache --enable-modules=most
--enable-mods-shared=all --enable-info --enable-cgi --enable-rewrite
--enable-so --enable-cgid --enable-FEATURE=yes --enable-ssl

mod_perl编译参数

1 ln -s /usr/lib/libperl.so.x.x.x /usr/lib/libperl.so

2 perl Makefile.PL MP_APXS=/opt/apache/bin/apxs
MP_APR_CONFIG=/opt/apache/bin/apr-1-config MP_AP_PREFIX=/opt/mod_perl &&
make && make install
可以加个 make test
考居然要root权限
mkdir /usr/local/lib/perl/5.8.8/auto/Apache2

Appending installation info to /usr/local/lib/perl/5.8.8/perllocal.pod
/usr/local/lib/perl/5.8.8/Apache/ 安装的都在这边

3 add below to /path/to/http.conf
LoadModule perl_module modules/mod_perl.so

php5 编译参数

'../php-5.2.3/configure' '--prefix=/opt/php5/' '--with-apxs2=/opt/apache/'
'--with-apxs2=/opt/apache/bin/apxs' '--enable-fastcgi' '--enable-calendar'
'--enable-force-cgi-redirect' '--enable-trans-sid' '--with-gd'
'--with-xml' '--with-xsl' '--with-ttf=/usr' '--with-freetype-dir=/usr'
'--enable-exif' '--with-xslt' '--with-xslt-sablot=/usr'
'--with-dom-xslt=/usr' '--with-jpeg-dir=/usr' '--with-png-dir=/usr'
'--with-zlib-dir=/usr' '--enable-mbstring' '--with-gettext'
'--with-mysql=/usr/include/mysql/' --enable-track-vars

apache2/conf/httpd.conf,在文件最后添加如下内容:
AddType application/x-httpd-php .php

cp ..