系统环境:CentOS-5.5-x86
PHP默认版本:5.1.6
因最新版的WordPress需要PHP-5.2.4以上版本,所以不得不升级PHP
1.编辑/etc/yum.repos.d/CentOS-Base.repo文件,将下面的内容添加到文件的末尾:
[CentOS-Testing]
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
# CentOS-Testing:
# !!!! CAUTION !!!!
# This repository is a proving grounds for packages on their way to CentOSPlus
name=CentOS-5 Testing
baseurl=http://dev.centos.org/centos/$releasever/testing/$basearch/
enabled=0
gpgcheck=1
gpgkey=http://dev.centos.org/centos/RPM-GPG-KEY-CentOS-testing
# 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
# 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
# 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.
在CentOS-Base.repo文件中不要启用CentOS-Testing,必要的时候用yum的enablerepo参数就可以了,所以上面enabled参数后面的值是0.
2.检查CentOS-Testing中是否有关于PHP的可用更新;
yum --disablerepo=* --enablerepo=CentOS-Testing check-update php*
3.更新PHP相关的软件
yum --disablerepo=* --enablerepo=CentOS-Testing update php*
没有评论:
发表评论