Hunter的大杂烩 技术学习笔记

May 9, 2006

升级到 Apache 2.0.44 & PHP 4.3.1[zt]

Filed under: Linux — hunter @ 12:23 pm

http://www.freelamp.com/1045669393/index_html

 

由于 FastCGI 针对 Apache 2.0 的版本迟迟没有推出, FreeLAMP.com 的 Apache 2.x 计划也因此一直推迟。
今晚终于抽出一点时间,升级了 Apache + FastCGI + PHP。 办法如下:
由于不喜欢使用缺省目录安装,这次终于在 Apache make 的时候出错了。
好在 Google 上一搜索就找到下面的结论:

Figured it out. Not really. But if anyone runs into this problem,
they might want to try moving /usr/local/lib/libexpat.a & libexpat.la
somewhere else temporarily and using a configure –prefix of
/usr/local/apache2 for the apache2 install. I have both 1.3.26 and
2.0.40 running on a development machine (different ports),
though I haven’t been able to get the perchild MPM to work,
which is too bad as that what I find most compeling about Apache 2.

因此,很简单,照他的说法做:
安装到 /usr/local/apache2 ,把 libexpat.a & libexpat.la 和换名,果然成功了:

./configure –prefix=/usr/local/apache2 –enable-proxy –enable-proxy-connect –enable-proxy-http –enable-bucketeer –enable-headers –enable-deflate –enable-cache –enable-disk-cache –enable-file-cache –enable-auth-digest –enable-auth-dbm

接下来安装 fastcgi,直接从 fastcgi.com 下来的 2.4.0 版本不能安装到 2.0.44 上,看 http://fastcgi.com/dist/
目录下还有一个:
mod_fastcgi-SNAP-0302032017.tar.gz
用这个版本安装果然有效,安装办法:

$ cd
$ cp Makefile.AP2 Makefile
$ make
$ make install
然后在 httpd.conf 中加入:
LoadModule fastcgi_module Modules/mod_fastcgi.so

至于 PHP 的安装,一点悬念都没有:
./configure –with-apxs2=/usr/local/apache2/bin/apxs –enable-safe-mode –with-db3 –with-flatfile –enable-ftp –with-mysql –with-pgsql

不过在配置 httpd.conf 时,最好还是看看中文的文档:
http://www.php.net/manual/zh/install.apache2.php

然后去

http://www.php-accelerator.co.uk/download.php
(目前支持 php 4.3.0 ,但是下载后的 .so 文件可以在 4.3.1 下使用)。

升级一下 php-accelerator

在配置 httpd.conf 中 fastcgiserver 的时候,
FastCgiExternalServer ……

这句话不能写入 VirtualHost 里面了。以前是可以的。

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress