TeRiTeRi

  1. 首页
  2. linux
  3. 正文

将Centos的yum源更换为阿里云源

2019年10月17日 1948点热度 11人点赞 0条评论

阿里云镜像源地址:http://mirrors.aliyun.com/

①备份原镜像源文件到原文件夹,便于恢复

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

②下载新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS 5

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

CentOS 6

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

CentOS 7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

③更改CentOS-Media.repo使其为不生效

enabled=0

④运行yum makecache生成缓存

yum clean all
yum makecache

 

标签: centos linux
最后更新:2019年10月17日

kamisamak

这个人很懒,什么都没留下

点赞
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2023 TeRiTeRi. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang