Last modified: Wed Apr 6 20:51:18 2005 +0900 (JST)
この文書は、学内において CentOS を利用するという前提で記述されています。
centos-announce メーリングリスト に参加することで更新情報を入手できます。 CentOS 利用者は必ず参加しましょう。
CentOS の更新には up2date と yum が使えます。ここでは yum を簡単に解説します。以下の操作は root 権限で実行するものとします。
/etc/yum.conf ファイルを編集し、[base] [update] [addons] [extras] を次のようにします。
[base] name=CentOS-$releasever - Base baseurl=ftp://ftp.st.ryukoku.ac.jp/pub/Linux/centos/$releasever/os/$basearch/ gpgcheck=1 #released updates [update] name=CentOS-$releasever - Updates baseurl=ftp://ftp.st.ryukoku.ac.jp/pub/Linux/centos/$releasever/updates/$basearch/ gpgcheck=1 #packages used/produced in the build but not released [addons] name=CentOS-$releasever - Addons baseurl=ftp://ftp.st.ryukoku.ac.jp/pub/Linux/centos/$releasever/addons/$basearch/ gpgcheck=1 #additional packages that may be useful [extras] name=CentOS-$releasever - Extras baseurl=ftp://ftp.st.ryukoku.ac.jp/pub/Linux/centos/$releasever/extras/$basearch/ gpgcheck=1
CentOS の GPG キーを登録するため、 コンソールから rpm --import /usr/share/doc/centos-release-3/RPM-GPG-KEY-CentOS-3 を実行します。
# rpm --import /usr/share/doc/centos-release-3/RPM-GPG-KEY-CentOS-3
コンソールから yum check-update を実行し、更新可能なパッケージが存在するかどうかを確認します。 更新可能なパッケージが存在する場合は、次のようになります。
# yum check-update Gathering header information file(s) from server(s) Server: CentOS-3 - Addons Server: CentOS-3 - Base Server: CentOS-3 - Extras Server: CentOS-3 - Updates Finding updated packages Downloading needed headers gdk-pixbuf-1-0.22.0-12.el 100% |=========================| 5.0 kB 00:00 curl-devel-0-7.10.6-6.rhe 100% |=========================| 4.2 kB 00:00 curl-0-7.10.6-6.rhel3.i38 100% |=========================| 4.7 kB 00:00 gdk-pixbuf-gnome-1-0.22.0 100% |=========================| 3.1 kB 00:00 gdk-pixbuf-devel-1-0.22.0 100% |=========================| 4.7 kB 00:00 Name Arch Version Repo -------------------------------------------------------------------------------- curl i386 7.10.6-6.rhel3 update curl-devel i386 7.10.6-6.rhel3 update gdk-pixbuf i386 1:0.22.0-12.el3 update
この例では curl, curl-devel, gdk-pixbuf について更新可能です。
コンソールから yum update を実行し、更新を実行します。
# yum update Gathering header information file(s) from server(s) Server: CentOS-3 - Addons Server: CentOS-3 - Base Server: CentOS-3 - Extras Server: CentOS-3 - Updates Finding updated packages Downloading needed headers Resolving dependencies Dependencies resolved I will do the following: [update: curl-devel 7.10.6-6.rhel3.i386] [update: gdk-pixbuf 1:0.22.0-12.el3.i386] [update: curl 7.10.6-6.rhel3.i386] Is this ok [y/N]:
確認の意味で Is this ok [y/N]: と聞いています。 ここで y を入力してリターンを押すと、更新が実行されます。
Is this ok [y/N]: y Downloading Packages Getting curl-devel-7.10.6-6.rhel3.i386.rpm curl-devel-7.10.6-6.rhel3 100% |=========================| 159 kB 00:00 Getting gdk-pixbuf-0.22.0-12.el3.i386.rpm gdk-pixbuf-0.22.0-12.el3. 100% |=========================| 221 kB 00:00 Getting curl-7.10.6-6.rhel3.i386.rpm curl-7.10.6-6.rhel3.i386. 100% |=========================| 228 kB 00:00 Running test transaction: Test transaction complete, Success! curl 100 % done 1/6 gdk-pixbuf 100 % done 2/6 curl-devel 100 % done 3/6 Completing update for curl-devel - 4/6 Completing update for gdk-pixbuf - 5/6 Completing update for curl - 6/6 Updated: curl-devel 7.10.6-6.rhel3.i386 gdk-pixbuf 1:0.22.0-12.el3.i386 curl 7.10.6-6.rhel3.i386 Transaction(s) Complete
上記の例では不要だと思われますが、kernel や glib といった、OS の主要コンポーネントを更新した場合には、OS を再起動してください。