分享

CentOS YUM源配置

 krrish 2010-09-15

首先是备份/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

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多