你想要yum安装PHP53.不幸的是,你需要先删除PHP(这是PHP 5.1,见下文).
原文链接:/centos/373795.htmlPHP53自CentOS 5.6 and above起可在CentOS上使用.除非您通过第三方存储库,否则它在CentOS 5.5和之前版本中不可用.这就是为什么Serverfault上的许多答案会告诉您使用第三方存储库的原因 – 这已经不再需要了.
请注意,PHP53有很多依赖项,因此您应该考虑将CentOS更新到最新的CentOS 5.x分支,作为此升级的一部分(截至本文撰写时为CentOS 5.6).这是PHP的一次重大升级,而RedHat强迫它通过,因为它们远远落后于RHEL5.5.
$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.