手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

搭建LAMP环境(源码方式)

[日期:2013-10-20] 来源:Linux社区  作者:justdb [字体:大 中 小]

第三步,安装PHP

--1.解压
[root@serv02 ~]# tar -xf php-5.3.6.tar.bz2 -C/usr/src/
--2.进入/usr/src/php-5.3.6/目录,配置
[root@serv02 php-5.3.6]# cd/usr/src/php-5.3.6/
[root@serv02 php-5.3.6]# ./configure —help
[root@serv02 php-5.3.6]# ./configure--prefix=/usr/local/php5 --with-apxs2=/usr/local/apache/bin/apxs--with-MySQL-sock=/tmp/mysql.sock --with-mysql=/usr/local/mysql/
 
checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found.Please check your libxml2 installation.
#如果出现上述错误,安装libxml2
[root@serv02 php-5.3.6]# yum install libxml2*-y
 
+--------------------------------------------------------------------+
| License:                                                          |
| This software is subject to the PHPLicense, available in this    |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of thislicense agreement.    |
| If you do not agree with the terms of thislicense, you must abort |
| the installation process at thispoint.                            |
+--------------------------------------------------------------------+
#如果出现如下文本,则证明配置成功
 
Thank you for using PHP.
 
--3.编译
[root@serv02 php-5.3.6]# make
 
--4.安装
[root@serv02 php-5.3.6]# make install
 
--5.拷贝php.ini文件,修改httpd.conf文件
[root@serv02 bin]# cp php.ini-development/usr/local/php5/lib/php.ini
[root@serv02 bin]# grep -e"AddHandler" -e "AddType" /usr/local/apache/conf/httpd.conf
  AddHandler php5-script .php
AddType text/html .php

linux
相关资讯       lamp  LAMP环境搭建  LAMP搭建 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款