CentOS   发布时间:2022-05-09  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了Apache与PHP的整合(编译安装),不涉及MySQL数据库的整合大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
最近开始看《Ajax for Dummies》,书里的示例一些是基于php的所以需建个php服务器才可以演示这些示例。拿自己的Ubuntu试了一下。1.准备工作先分别从和下载回httpd2和php5的源码包,分别为:httpd-2.2.3.tar.gz和php-5.2.0.tar.gz。在编译之前,先大概浏览一下它们的INSTALL文件,看看都有哪些说明。httpd的说明很简单,再看php的说明,里面有一段是:  Prerequisite kNowledge and software for compiling:     * Basic Unix skills (being able to operate "make" and a C compiler)     * An ANSI C compiler     * flex: Version 2.5.4     * bison: Version 1.28 (preferred),1.35,or 1.75     * A web server     * Any module specific components (such as gd,pdf libs,etc.)也 就是说,要有C编译器,flex,bison,一个web服务器,还要一些模块的组件。由于计划用apache做web服务器程序,基本编译环境早就装好 (如果没有,就sudo apt-get install build-essential 安装之。),就看flex和bison这两个东东了。新立得里面搜索了一下,有是有,就不知道是不是版本太陈旧了。还是问了一下google,得到了flex和bison的地址,和。分别下载回源码包,然后先编译安装这两个东西,同样看了看说明,直接
figuremakesudo make install
2.开始安装Apache 再回过头来看php的说明。文件里先讲到的是apache1.3.×的版本如何编译,这里我下载的是2.2.3版的Apache了,直接跳过这一节,看关于Apache2的编译安装说明。   Example 2-4. Installation instructions (Apache 2 Shared Module   Version)1.  gzip -d httpd-2_0_NN.tar.gz2.  tar xvf httpd-2_0_NN.tar3.  gunzip php-NN.tar.gz4.  tar -xvf php-NN.tar5.  cd httpd-2_0_NN6.  ./configure --enable-so7.  make8.  make install    now you have Apache 2.0.NN available under /usr/local/apache2,    configured with loadable module support and the standard MPM prefork.    To test the installation use your normal procedure for starTing    the Apache server,e.g.:    /usr/local/apache2/bin/apachectl start    and stop the server to go on with the configuration for php:    /usr/local/apache2/bin/apachectl stop.前 面还有一点版本方面的说明就不管了,根据示例,进入httpd的文件夹,直接执行  ./configure --enable-so来编译apache就可以了。虑到,Apache在我机器上待的时间可能不长,如果按默认的安装,安装到/usr/local下 面去,我可能过几天就忘了,找不到了。就用prefix参数修改一下安装路径。  
figure --enable-so --prefix

大佬总结

以上是大佬教程为你收集整理的Apache与PHP的整合(编译安装),不涉及MySQL数据库的整合全部内容,希望文章能够帮你解决Apache与PHP的整合(编译安装),不涉及MySQL数据库的整合所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: