联系我们
在线沟通
立即在线沟通,我们随时为您解答
电邮
发送邮件,我们将尽快回复您的问题
电话
立即拨打

 首页  知识库 > 服务器教程  >  RAKsmart:centos5系统更新 yum源

RAKsmart:centos5系统更新 yum源

2020-06-11

各大镜像站只有最新版本目录有内容,其他版本目录下仅有readme文件下载的CentOS-Base.repo文件,放到/etc/yum.repos.d/下都用不了 在readme文件中发现http://vault.centos.org/网站是有各个版本镜像的

各大镜像站只有最新版本目录有内容,其他版本目录下仅有readme文件

下载的CentOS-Base.repo文件,放到/etc/yum.repos.d/下都用不了

在readme文件中发现http://vault.centos.org/网站是有各个版本镜像的


备份原来的文件

mv  /etc/yum.repos.d/CentOS-Base.repo   /etc/yum.repos.d/CentOS-Base.repo.backup

重新编辑yum源配置文件 写入如下内容 本文档以5.5版本为例 ,如是其他版本如5.8 ,可以利用txt记事本 查找替换 把5.5替换为对应的版本即可

vi /etc/yum.repos.d/CentOS-Base.repo



# CentOS-Base.repo
#
# 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=CentOS-$releasever - Base
baseurl=
http://vault.centos.org/5.5/os/i386/
gpgcheck=1
gpgkey=
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#released updates 
[updates]
name=CentOS-$releasever - Updates
baseurl=
http://vault.centos.org/5.5/updates/i386/
gpgcheck=1
gpgkey=
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=
http://vault.centos.org/5.5/addons/i386/
gpgcheck=1
gpgkey=
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=
http://vault.centos.org/5.5/extras/i386/
gpgcheck=1
gpgkey=
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=
http://vault.centos.org/5.5/centosplus/i386/
gpgcheck=1
enabled=0
gpgkey=
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
baseurl=
http://vault.centos.org/5.5/contrib/i386/
gpgcheck=1
enabled=0
gpgkey=
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5


保存文件后,运行yum clean all   yum makecache


如果您觉得【RAKsmart:centos5系统更新 yum源】这篇文章有用,请分享给您的好友,谢谢!

复制链接