redhat5.9 应用centos的源进行升级

(1).通过 http://mirror-status.centos.org 网站查找离自己最近的镜像站点


(2).创建和修改/etc/yum.repos.d/centos.repo


#vim /etc/yum.repos.d/centos.repo
[base]
name=Red Hat Enterprise Linux $releasever - Base
baseurl=http://mirror.bit.edu.cn/centos/5.9/os/$basearch/
enabled=1
gpgcheck=1
[update]
name=Red Hat Enterprise Linux $releasever - Update
baseurl=http://mirror.bit.edu.cn/centos/5.9/updates/$basearch/
enabled=1
gpgcheck=1
[extras]
name=Red Hat Enterprise Linux $releasever - Extras
baseurl=http://mirror.bit.edu.cn/centos/5.9/extras/$basearch/
enabled=1
gpgcheck=1
[addons]
name=Red Hat Enterprise Linux $releasever - Addons
baseurl=http://mirror.bit.edu.cn/centos/5.9/addons/$basearch/
enabled=1
gpgcheck=1
[centosplus]
name=Red Hat Enterprise Linux $releasever - centosplus
baseurl=http://mirror.bit.edu.cn/centos/5.9/centosplus/$basearch/
enabled=1
gpgcheck=1
[contrib]
name=Red Hat Enterprise Linux $releasever - contrib
baseurl=http://mirror.bit.edu.cn/centos/5.9/contrib/$basearch/
enabled=1
gpgcheck=1
(3).下载并导入KEY
#cd /etc/pki/rpm-gpg 
#wget http://mirror.bit.edu.cn/centos/RPM-GPG-KEY-CentOS-5 
#rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-GentOS-5


yum install gcc.i386 --nogpgcheck

你可能感兴趣的:(redhat5.9 应用centos的源进行升级)