12.27.2012

[Linux]CentOS5系のアップデート方法


忘れてるのでメモ^^;

CentOS5系はバージョンによってアップデート方法が異なるとのこと。

◆OSタイプ確認(i386, x86_64等)
# uname -a

----------------------------------------------------------------------
◆レポジトリ追加

■epelレポジトリ追加
下記でreleaseされたrpmを探す
http://ftp.iij.ad.jp/pub/linux/fedora/epel/5/

# wget http://ftp.iij.ad.jp/pub/linux/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm
# rpm -Uvh epel-release-5-4.noarch.rpm

■remiレポジトリ追加
# wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm
# rpm -Uvh remi-release-5.rpm

■dagレポジトリ追加
下記参照
http://dag.wieers.com/

# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
# rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm

※レポジトリは/etc/yum.repos.d/以下に追加追記しても大丈夫、好きな方をば~♪
----------------------------------------------------------------------


yum-updatesdの削除
# /etc/init.d/yum-updatesd stop
# yum -y remove yum-updatesd

yum-fastestmirrorのインストール
# yum --enablerepo=epel,remi,remi-test,dag list yum-fastestmirror
# yum --enablerepo=epel,remi,remi-test,dag install yum-fastestmirror

update確認
# yum --enablerepo=epel,remi,remi-test,dag check-update

CentOS5.5以下からアップデートする場合は下記のコマンドを実行
■CentOSのアップデート
# yum clean all
# yum --enablerepo=epel,remi,remi-test,dag update glibc\*
# yum --enablerepo=epel,remi,remi-test,dag update yum\* rpm\* pyth\*
# yum clean all
# yum --enablerepo=epel,remi,remi-test,dag update mkinitrd nash
# yum --enablerepo=epel,remi,remi-test,dag update selinux\*
# yum --enablerepo=epel,remi,remi-test,dag update
# more /etc/redhat-release
# shutdown -r now


CentOS5.6以上からアップデートする場合は下記のコマンドを実行
■CentOSのアップデート
# yum clean all
# yum --enablerepo=epel,remi,remi-test,dag update
# more /etc/redhat-release
# shutdown -r now

※レポジトリは随時自分用に変更~♪

以上

0 件のコメント:

コメントを投稿