首先是备份/etc/yum.repos.d/CentOS-Base.repo 文件, 然后把下载的和你系统相对应的CentOS-Base.repo 替换 /etc/yum.repos.d/CentOS-Base.repo 文件
然后#yum check-update
CentOS 5 最新更新源
把/etc/yum.repos.d/CentOS-Base.repo文件的内容替换为下面的内容
复制内容到剪贴板
代码:
#mirrors-shlug-org.repo # # rpm --import http://mirrors./centos/RPM-GPG-KEY-CentOS-5 # # This file uses a new mirrorlist system developed by Lance Davis for CentOS. # The mirror system uses the connecting IP address of the client and the # update status of each mirror to pick mirrors that are updated to and # geographically close to the client. You should use this for CentOS updates # unless you are manually picking other mirrors. # # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # #
[base] name=mirrors-shlug-org--CentOS-$releasever - Base baseurl=http://mirrors./centos/$releasever/os/$basearch/ gpgcheck=1 gpgkey=http://mirrors./centos/RPM-GPG-KEY-CentOS-5
#released updates [update] name=mirrors-shlug-org--CentOS-$releasever - Updates baseurl=http://mirrors./centos/$releasever/updates/$basearch/ gpgcheck=1 gpgkey=http://mirrors./centos/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released [addons] name=mirrors-shlug-org--CentOS-$releasever - Addons baseurl=http://mirrors./centos/$releasever/addons/$basearch/ gpgcheck=1 gpgkey=http://mirrors./centos/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful [extras] name=mirrors-shlug-org--CentOS-$releasever - Extras baseurl=http://mirrors./centos/$releasever/extras/$basearch/ gpgcheck=1 gpgkey=http://mirrors./centos/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages [centosplus] name=mirrors-shlug-org--CentOS-$releasever - Plus baseurl=http://mirror./centos/$releasever/centosplus/$basearch/ gpgcheck=1 gpgkey=http://mirrors./centos/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users [contrib] name=mirrors-shlug-org--CentOS-$releasever - Contrib baseurl=http://mirror./centos/$releasever/contrib/$basearch/ gpgcheck=1 enabled=0 gpgkey=http://mirrors./centos/RPM-GPG-KEY-CentOS-5
使用之前先运行: rpm --import http://mirrors./centos/RPM-GPG-KEY-CentOS-5
|