|
楼主 |
发表于 2003-1-1 23:02:03
|
显示全部楼层
Apache的模块静态编译与DSO
(一)以静态方式安装Apache ,则每次 PHP 有升级后,就必须重新编译安装 Apache。Apache模块静态编译安装过程的特点是在编译指令中加入模块激活指令--activate-module=src/modules/php4/libphp4.a,而libphp4.a是在PHP编译过程中生成的。
例如:
./configure --prefix=/usr/local/apache --activate-module=src/modules/php4/libphp4.a
(二)DSO 是动态共享对象,详细的文档可以参考 Apache 的在线手册。步骤如下:
1、编译Apache
#./configure --prefix=/usr/local/apache2 --enable-auth-anon --enable-auth-dbm --enable-ext-filter --enable-http --enable-dav --enable-rewrite --enable-so
关键的指令就是 --enable-so (so 意思是 Share Object)
2、编译PHP 时,使用 --with-apxs=/usr/local/apache/apxs 的指令,apxs(Apache Extension Tool) 所在的路径需要根据Apache的安装路径来修改。
3、修改httpd.conf,加入LoadModule指令。
安装成功,以后 PHP 有新的补丁/版本出来,就不需要重新编译 Apache 了。
(Manual 原文)
The Apache HTTP Server is a modular program where the administrator can choose the functionality to include in the server by selecting a set of modules. The modules can be statically compiled into the httpd binary when the server is built.
Alternatively, modules can be compiled as Dynamic Shared Objects (DSOs) that exist separately from the main httpd binary file. DSO modules may be compiled at the time the server is built, or they may be compiled and added at a later time using the Apache Extension Tool (apxs). |
|