CentOS低版本更换更新源-Vault.repo | IT运维网
  • 本站启用了账户登录密码错误就锁定模式,如有人误操作被锁请邮件(yvan.lu@ityww.cn)告知我账户名。
  • 本站为个人技术性站点,上面会更新一些系统、网络、虚拟化及云计算等相关的文章,与大家一起参考、学习和交流。
  • 欢迎访问本网站;本站QQ交流群:654792529;如果您觉得本站非常有看点,那么赶紧使用Ctrl+D收藏吧!

CentOS低版本更换更新源-Vault.repo

CentOS yvan 4年前 (2020-12-04) 2941次浏览 已收录 0个评论 扫描二维码

CentOS低版本更换更新源-Vault.repo

CentOS低版本更换更新源-Vault.repo

CentOS低版本更换更新源-Vault.repo

1、查询本地已有Vault.repo文件
CentOS低版本更换更新源-Vault.repo
2、复制该文件最后面CentOS6的相关镜像源信息;这儿的CentOS版本根据你当时该系统安装时啥版本这儿就显示啥版本,例如当时安装的是CentOS6.6这儿最后显示的就是6.6;

[C6.6-base]
name=CentOS-6.6 - Base
baseurl=http://vault.centos.org/6.6/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0

[C6.6-updates]
name=CentOS-6.6 - Updates
baseurl=http://vault.centos.org/6.6/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0

[C6.6-extras]
name=CentOS-6.6 - Extras
baseurl=http://vault.centos.org/6.6/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0

[C6.6-contrib]
name=CentOS-6.6 - Contrib
baseurl=http://vault.centos.org/6.6/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0

[C6.6-centosplus]
name=CentOS-6.6 - CentOSPlus
baseurl=http://vault.centos.org/6.6/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0

3、以防出错先备份CentOS-Base.repo源文件,然后把该文件内的源信息删除掉并粘贴刚刚复制Vault.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.
#
#

[C6.6-base]
name=CentOS-6.6 - Base
baseurl=http://vault.centos.org/6.6/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0

[C6.6-updates]
name=CentOS-6.6 - Updates
baseurl=http://vault.centos.org/6.6/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0

[C6.6-extras]
name=CentOS-6.6 - Extras
baseurl=http://vault.centos.org/6.6/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0

[C6.6-contrib]
name=CentOS-6.6 - Contrib
baseurl=http://vault.centos.org/6.6/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0

[C6.6-centosplus]
name=CentOS-6.6 - CentOSPlus
baseurl=http://vault.centos.org/6.6/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=0

4、根据YUM规范修改仓库命名、根据当前系统版本相应的修改系统版本号及标示名称、并且启用仓库。

# 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-6.8 - Base
baseurl=http://vault.centos.org/6.8/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1

[updates]
name=CentOS-6.8 - Updates
baseurl=http://vault.centos.org/6.8/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1

[extras]
name=CentOS-6.8 - Extras
baseurl=http://vault.centos.org/6.8/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1

[contrib]
name=CentOS-6.8 - Contrib
baseurl=http://vault.centos.org/6.8/contrib/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1

[centosplus]
name=CentOS-6.8 - CentOSPlus
baseurl=http://vault.centos.org/6.8/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
enabled=1

5、清除旧缓存创建新缓存: yum clean all && yum makecache
CentOS低版本更换更新源-Vault.repo


IT运维网 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明CentOS低版本更换更新源-Vault.repo
喜欢 (4)
yvan
关于作者:
聪明来自勤奋、知识在于积累、好记性不如烂键盘!

您必须 登录 才能发表评论!