如何在CentOS上使用yum将PHP 5.1升级到PHP 5.3

前端之家收集整理的这篇文章主要介绍了如何在CentOS上使用yum将PHP 5.1升级到PHP 5.3前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
使用Yum / CentOS.

问题是PHP 5.1已经安装并运行了

yum update PHP

不工作!

我环顾网络寻找解决方案,但他们说要做上面的事情= /

你想要yum安装PHP53.不幸的是,你需要先删除PHP(这是PHP 5.1,见下文).

PHP53自CentOS 5.6 and above起可在CentOS上使用.除非您通过第三方存储库,否则它在CentOS 5.5和之前版本中不可用.这就是为什么Serverfault上的许多答案会告诉您使用第三方存储库的原因 – 这已经不再需要了.

请注意,PHP53有很多依赖项,因此您应该考虑将CentOS更新到最新的CentOS 5.x分支,作为此升级的一部分(截至本文撰写时为CentOS 5.6).这是PHP的一次重大升级,而RedHat强迫它通过,因为它们远远落后于RHEL5.5.

注意包是如何命名为PHP53,而PHPPHP 5.1:

$yum info PHP53
Available Packages
Name       : PHP53
Arch       : x86_64
Version    : 5.3.3
Release    : 1.el5_6.1
Size       : 1.3 M
Repo       : updates
Summary    : PHP scripting language for creating dynamic web sites
URL        : http://www.PHP.net/
License    : PHP and LGPLv2 and LGPLv2+
Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
           : easy for developers to write dynamically generated webpages. PHP also
           : offers built-in database integration for several commercial and
           : non-commercial database management systems,so writing a
           : database-enabled webpage with PHP is fairly simple. The most common
           : use of PHP coding is probably as a replacement for CGI scripts.
           :
           : The PHP package contains the module which adds support for the PHP
           : language to Apache HTTP Server.

$yum info PHP
Available Packages
Name       : PHP
Arch       : x86_64
Version    : 5.1.6
Release    : 27.el5_5.3
Size       : 2.3 M
Repo       : base
Summary    : The PHP HTML-embedded scripting language. (PHP: Hypertext Preprocessor)
URL        : http://www.PHP.net/
License    : The PHP License v3.01
Description: PHP is an HTML-embedded scripting language. PHP attempts to make it
           : easy for developers to write dynamically generated webpages. PHP also
           : offers built-in database integration for several commercial and
           : non-commercial database management systems,so writing a
           : database-enabled webpage with PHP is fairly simple. The most common
           : use of PHP coding is probably as a replacement for CGI scripts.
           :
           : The PHP package contains the module which adds support for the PHP
           : language to Apache HTTP Server.

猜你在找的CentOS相关文章