欢迎光临
我们一直在努力

通过UNIX源码编译安装-PHP教程,其它文章

建站超值云服务器,限时71元/月

本章将引导您如何安装和设置php3。并介绍必要的知识和软件。

基本的unix技巧(学会如何操作和“制作”一个c编译器)

一个标准的ansi c的编译器

一个web服务器(显然需要)

 

通过unix源码编译安装

下载源文件

最新的源代码可以在以下网址找到:http://www.php.net

快速安装说明书(apache module 版本)

1. gunzip apache_1.3.x.tar.gz

2. tar xvf apache_1.3.x.tar

3. gunzip php-3.0.x.tar.gz

4. tar xvf php-3.0.x.tar

5. cd apache_1.3.x

6. ./configure –prefix=/www

7. cd ../php-3.0.x

8. ./configure –with-mysql –with-apache=../apache_1.3.x –enable-track-vars

9. make

10. make install

11. cd ../apache_1.3.x

12. ./configure –prefix=/www –activate-module=src/modules/php3/libphp3.a

13. make

14. make install

instead of this step you may prefer to simply copy the httpd binaryovertop of your existing binary. make sure you shut down yourserver first though.

(也可以使用直接拷贝httpd的二进制文件覆盖已经存在的二进制文件的方法代替上面的步骤,但是,您必须首先关闭您的服务器。)

15. cd ../php-3.0.x

16. cp php3.ini-dist /usr/local/lib/php3.ini

you can edit /usr/local/lib/php3.ini file to set php options. if you prefer this file in another location, use –with-config-file=/path in step 8.

(您可以直接编辑/usr/local/lib/php3.ini文件来设置php选项,如果您将此文件存放在另一个位置,那么请在步骤8中使用with-config-file=/path)

17. edit your httpd.conf or srm.conf file and add:

addtype application/x-httpd-php3 .php3 you can choose any extension you wish here. .php3 is simply the one we suggest.

(您可以选择任何您希望的扩展,我们认为php3是一个十分简单的东西。)

18. use your normal procedure for starting the apache server.

(you must stop and restart the server, not just cause the server to reload by use a hup or usr1 signal.)

(您必须停止和重新启动服务器,而不能仅仅使用服务器的reload(重新载入)功能。)

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 通过UNIX源码编译安装-PHP教程,其它文章
分享到: 更多 (0)

相关推荐

  • 暂无文章