yumでアップデートする場合はyumのリポジトリの設定を変更する。
# /etc/yum.repos.d/CentOS-Base.repo
[centosplus]
name=CentOS-$releasever – Plus baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
設定した後,
# yum update php
[root@]# vi /etc/yum.repos.d/CentOS-Base.repo
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever – Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
#enabled=0
enabled=1 ←ここを1に
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
#contrib – packages by Centos Users
[contrib]
name=CentOS-$releasever – Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
#enabled=0
enabled=1 ←ここを1に
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
:wq!
[root@]# yum list | grep php
php.i386 5.1.6-3.el4s1.5 centosplus
php-bcmath.i386 5.1.6-3.el4s1.5 centosplus
php-cli.i386 5.1.6-3.el4s1.5 centosplus
php-common.i386 5.1.6-3.el4s1.5 centosplus
php-dba.i386 5.1.6-3.el4s1.5 centosplus
php-dbase.i386 5.1.6-1.el4.centos centosplus
php-devel.i386 5.1.6-3.el4s1.5 centosplus
php-domxml.i386 4.3.9-3.22.3 update
php-eaccelerator.i386 5.1.6_0.9.5-1.el4.cent centosplus
php-gd.i386 5.1.6-3.el4s1.5 centosplus
php-imap.i386 5.1.6-3.el4s1.5 centosplus
php-ldap.i386 5.1.6-3.el4s1.5 centosplus
php-mbstring.i386 5.1.6-3.el4s1.5 centosplus
php-mcrypt.i386 5.1.6-1.el4.centos centosplus
php-mhash.i386 5.1.6-1.el4.centos centosplus
php-mysql.i386 5.1.6-3.el4s1.5 centosplus
php-ncurses.i386 5.1.6-3.el4s1.5 centosplus
php-odbc.i386 5.1.6-3.el4s1.5 centosplus
php-pdo.i386 5.1.6-3.el4s1.5 centosplus
php-pear.i386 4.3.9-3.22.3 update
(省略)
[root@]# yum list | grep mysql-server
mysql-server.i386 5.0.27-1.el4.centos centosplus