构建PHP 环境
构建PHP 环境一、 安装PHP软件包
1、 解压并释放下载的PHP编码包到“/usr/src/”目录中,并切换进入展开的源码包。
http://lulu87.blog.运维网.com/attachment/201008/18/1244696_1282134924QGPi.jpg
2、 预先配置编译时的参数。
http://lulu87.blog.运维网.com/attachment/201008/18/1244696_1282134925kUzr.jpg
--prefix:设置PHP程序的安装路径。
--enable-mbstring:设置PHP支持多字节字符串。
--with-apxs2:设置apache服务器提供的apxs模块支持程序的文件位置。
--with-mysql:设置MySQL服务器程序的安装位置。
--with-config-file-path:设置PHP程序的配置文件所在的位置。
3、编译并安装。
http://lulu87.blog.运维网.com/attachment/201008/18/1244696_1282134925DKa0.jpg
3、 复制php.ini配置文件。
http://lulu87.blog.运维网.com/attachment/201008/18/1244696_1282134929NwPd.jpg
二、 设置httpd.conf文件。
更改apache的配置文件,是他可以支持php环境。
http://lulu87.blog.运维网.com/attachment/201008/18/1244696_1282134930Yhlp.jpg
三、 测试PHP与apache的协同工作。
在www.benet.com站点的网页根目录下建立测试网页。
http://lulu87.blog.运维网.com/attachment/201008/18/1244696_1282134934YdAw.jpg
测试:
http://lulu87.blog.运维网.com/attachment/201008/18/1244696_1282134938LgYo.jpg
在www.benet.com站点的网页根目录中建立测试网页文件testdb.php用来检测与MySQL的协调工作。
http://lulu87.blog.运维网.com/attachment/201008/18/1244696_1282134939Cqvr.jpg
测试:
http://lulu87.blog.运维网.com/attachment/201008/18/1244696_1282134943NXA9.jpg
页:
[1]