在 CentOS 5 上将 php 升级到 5.2

在 CentOS 5 上将 php 升级到 5.2

我正在尝试在 centos 5 上将 php 5.1 升级到 5.2按照这些指示

我启用了 centos-testing 仓库:

但是 yum 找不到任何要升级的软件包......

rpm -qa |grep php
php-mbstring-5.1.6-39.el5_8
php-common-5.1.6-39.el5_8
php-xml-5.1.6-39.el5_8
php-xmlrpc-5.1.6-39.el5_8
php-pear-1.4.9-8.el5
php-cli-5.1.6-39.el5_8
php-pdo-5.1.6-39.el5_8
php-soap-5.1.6-39.el5_8
php-gd-5.1.6-39.el5_8
php-mysql-5.1.6-39.el5_8
php-5.1.6-39.el5_8
php-mcrypt-5.1.6-15.el5.centos.1
php-devel-5.1.6-39.el5_8

yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.serveraxis.net
 * extras: mirror.ubiquityservers.com
 * updates: mirror.nexcess.net
Reducing CentOS-5 Testing to included packages only
Finished
Setting up Update Process
No Packages marked for Update

yum update php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.serveraxis.net
 * extras: mirror.ubiquityservers.com
 * updates: mirror.nexcess.net
Reducing CentOS-5 Testing to included packages only
Finished
Setting up Update Process
No Packages marked for Update

cat /etc/yum.repos.d/CentOS-Testing.repo 
#CentOS-Testing:
#!!!! CAUTION !!!!
#This repository is a proving grounds for packages on their way to CentOSPlus and CentOS Extras.
#They may or may not replace core CentOS packages, and are not guaranteed to function properly.
#These packages build and install, but are waiting for feedback from testers as to
#functionality and stability. Packages in this repository will come and go during the
#development period, so it should not be left enabled or used on production systems without due
#consideration.
[c5-testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=1
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
includepkgs=php*

请问有什么帮助吗?

答案1

您可以尝试使用 remi 存储库。有关安装 remi 存储库的说明可在此处找到 http://blog.famillecollet.com/pages/Config-en

我会选择采用 yum 路线(而不是尝试安装 rpms)但是您必须导入 remi GPG 密钥。

安装后,您可以使用以下命令安装 php:

yum --enablerepro=remi install php

首先进行 yum 搜索来检查所需版本的正确名称可能是一个好主意。

此外,这篇文章可能对您有帮助:在 CentOS 5.4 上将 PHP 从 5.1 升级到 5.2

相关内容