• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

通过UNIX源码编译安装_PHP

php 搞代码 4年前 (2022-01-25) 9次浏览 已收录 0个评论

unix安装

本章将引导您如何安装和设置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 —本2文来*源gao($daima.com搞@代@#码(网搞gaodaima代码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(重新载入)功能。)


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:通过UNIX源码编译安装_PHP

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址