首页 / PHP / linux下如何安装Php
linux下如何安装Php
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了linux下如何安装Php,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1923字,纯文字阅读大概需要3分钟。
内容图文
本篇文章主要介绍如何在linux下如何安装PHP,感兴趣的朋友参考下,希望对大家有所帮助。Linux 安装 php-5.4.5
1. 下载 php-5.4.5.tar.gz
2. 解压
[root@test31~] tar -zxvf php-5.4.5.tar.gz
3. 进入安装文件目录
[root@test31~] cd php-5.4.5
4. 执行
[root@test31 php-5.4.5]# ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache/bin/apxs --with-mysql
注意:绿色标记为你 apache的安装目录
出现问题:
"configure: error: xml2-config not found. Please check your libxml2 installation."
检查是否安装了libxm包
[root@test31 php-5.4.5]# rpm -qa |grep libxml2
libxml2-2.6.26-2.1.12
libxml2-python-2.6.26-2.1.12
重新安装libxml2和libxml2-devel包
yum install libxml2
yum install libxml2-devel -y (装这个)
安装完之后查找xml2-config文件是否存在
[root@test31 php-5.4.5]# find / -name "xml2-config"
/usr/bin/xml2-config
如果存在的话重新安装php
[root@test31 php-5.4.5]# ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache/bin/apxs --with-mysql
执行如果报错: “Cannot find MySQL header files under yes”
需要指定mysql的安装路径
[root@test31 php-5.4.5]# ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql
安装成功的标志是:
出现
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
相关推荐:
最详细的linux安装php过程
linux安装php 模块--with-mysql --with-mysqli非得需要安装mysql吗
Linux安装php报错记录
以上就是linux下如何安装Php的详细内容,更多请关注Gxl网其它相关文章!
内容总结
以上是互联网集市为您收集整理的linux下如何安装Php全部内容,希望文章能够帮你解决linux下如何安装Php所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。