centos5系统更新 yum源

各大镜像站只有最新版本目录有内容,其他版本目录下仅有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替换为对应的版本即可
%RAK部落%

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-KaTeX parse error: Expected 'EOF', got '#' at position 127: …G-KEY-CentOS-5 #̲released update…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-KaTeX parse error: Expected 'EOF', got '#' at position 133: …G-KEY-CentOS-5 #̲additional pack…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-KaTeX parse error: Expected 'EOF', got '#' at position 145: …G-KEY-CentOS-5 #̲contrib – packa…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

此教程来自固定链接:http://www.rakbuluo.com/p22/

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值