您需要:
获取您需要的源代码。将 apache、php、gd 和 ssl 解压到 /usr/src
。将 SSL 补丁解压到 /usr/src/apache_1.2.6
。
cd
到 /usr/src/gd1.2 并输入 make。 这将构建 GD 库 libgd.a
,该库应该复制到 /usr/lib
。 现在 cd
到 php-2.0.1
并运行 ./install
。
相关的问题是
Would you like to compile PHP/FI as an Apache module? [yN] y Are you compiling for an Apache 1.1 or later server? [Yn] y Are you using Apache-Stronghold? [yN] y Does your Apache server support ELF dynamic loading? [yN] y Apache include directory (which has httpd.h)? [/usr/local/include/apache] /usr/src/apache_1.2.6/src Would you like to build an ELF shared library? [yN] y Additional directories to search for .h files []: /usr/src/gd1.2 Would you like the bundled regex library? [yN] n
与 frontpage 扩展一样,phtml 包含一个安全问题,因为它在 webserver 的 uid 下运行。 请务必在 src/php.h 中启用安全模式,并将搜索路径限制为安全值。 php.h 中还有一些其他选项您可能想要编辑。 如果您非常关心安全性,请将 php 编译为 cgi。 但是,这会导致性能损失,并且不如模块版本那样智能。
输入 make
以构建所有文件。 编译完成后,将 mod_php.*
和 libphp.a
复制到 /usr/src/apache_1.2.6/src
添加一行
Module php_module mod_php.o到
/usr/src/apache_1.2.6/src/Configuration
的末尾,添加-lphp -lm -lgdbm -lgd到同一文件中的
EXTRA_LIBS
,application/x-httpd-php phtml到 Apache 的
mime.types
以及AddType application/x-httpd-php .phtml到 Apache 的
srm.conf
。您可能还想将 index.phtml
添加到该文件中的 DirectoryIndex
,以便在请求其目录时自动加载文件 index.phtml。
cd /usr/src/SSL-0.8.0; ./Configure linux-elf; make; make rehash
这将创建 apache 所需的库。 您可以执行 make test
来验证编译。 您必须对 apache 应用补丁。 重要的是,您要在 frontpage 补丁之前应用它,否则 frontpage 将无法正常工作。 cd
到 /usr/src/apache_1.2.6/src
并执行 patch < /usr/src/apache_1.2.6/SSLpatch
。 在 Configuration
中设置 SSL_BASE=/usr/src/SSLeay-0.8.0
。 确保禁用 Module proxy_module
,否则 Apache 将无法编译。 如果您需要代理,请使用 Squid http://squid.nlanr.net/
现在 make certificate
生成 SSLconf/conf/httpsd.pem
。
将 fp30.linux.tar.Z
文件重命名为 fp30.linux.tar.gz
,否则安装脚本将找不到它。 运行 ./fp_install
将扩展文件复制到 /usr/local/frontpage
。 zcat 通常可以作为 /usr/bin/zcat 调用。
现在您必须应用 FP 补丁。 cd
到 /usr/src/apache_1.2.6/src
并键入 patch < /usr/src/frontpage/version3.0/apache-fp/fp-patch-apache_1.2.5
这将创建 mod_frontpage.*
文件并对 Configuration
等进行一些修改。 1.2.5 补丁适用于 apache 1.2.5 和 1.2.6。 跳过关于安装 web 的部分,您可以稍后执行此操作