CentOS 5.9にアップデートとCR repositoryの有効化

投稿日:

CentOS 5.9 がリリースされたようなのでアップデートしました。

5.7→5.8 はコチラ

前回同様、今回もリリースノートにはアップデートの手順についての言及はありませんが、メーリングリストの方に一応書かれています。

Upgrading from CentOS-5.8 ( or any older CentOS-5 release ):

If you are already running CentOS-5.8 or an older CentOS-5 distro, all
you need to do is update your machine via yum by running :

'yum update'

Running 'yum list updates' before doing the update is recommended, so
you can get a list of packages that are going to be updated. To check
you are indeed on CentOS-5.9, run : 'rpm -q centos-release' and that
should return: 'centos-release-5-9.el5.centos.1'

If you are running CentOS-5.8 and have the CR repo enabled, a simple
'yum update' will still move your machine to 5.9. But since the CR repo
already contained all the 5.9 updates, there will only be a handful of
rpms that need to be installed for the 5.8 to 5.9 upgrade. If you are
not running the CR repo, we highly encourage everyone to install and run
this repository on their machines. More details on the CR repo can be
found online at http://wiki.centos.org/AdditionalResources/Repositories/CR

今回も単純に yum update を実行すれば良いみたいですが、CR repoについて書いてあるので、そちらも一緒に見て行こうかと思います。

手順としては CR repository を有効にした後に 5.9 にアップデートしたほうが楽だとは思いつつ、何となく問題が起きた時に切り分けするのが面倒なので、とりあえず 5.9 にアップデートしてから CR repository をインストールするような手順で行きます。


ということで、早速 5.9 に。

まずは、手順に有るように yum list updates で、どんなパッケージがアップデートされるのかの確認。

# yum list updates

まぁ、yum update でも同じようなリストが出てくるので、list updates を事前に実行する必要があるのか?っと言われると何もと言えませんが、私の環境では 144個のアップデートが出て来ました。

ということで、アップデートを実行。

# yum update

今回は、綺麗に終わりました

一応、アップデートの確認をします。

# cat /etc/redhat-release
CentOS release 5.9 (Final)

一応、メーリングリストでは rpm を確認する方法が紹介されていますが、どちらでも良いと思います。

# rpm -q centos-release
centos-release-5-9.el5.centos.1


で、引き続き CR Repository を有効にします。

# yum install centos-release-cr

とりあえず、リポジトリをインストール。

CR Repository はインストールするだけで有効になるようなので、通常はここで終わりです。

が、私の環境では yum-priorities が入ってるので、priority=1 を追記しておきます。

# vim /etc/yum.repos.d/CentOS-CR.repo

[cr]
name=CentOS-$releasever - CR
baseurl=http://mirror.centos.org/centos/$releasever/cr/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=1

一応、yum update を実行してみましたが、今のところ更新はないようですね。

ということで、再起動して暫く様子を見ます。

更新日: