Centos设置阿里云yum源

技术文章 11个月前 完美者
2,165 0

标签:mirrors   rgba   bsp   centos 6   https   curl   centos   repo   ack   

1. 备份

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

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

CentOS 6

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

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-6.repo

CentOS 7

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

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

 

CentOS 8

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

或者

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo

3. 运行  yum makecache 生成缓存

 

Centos设置阿里云yum源

标签:mirrors   rgba   bsp   centos 6   https   curl   centos   repo   ack   

原文地址:https://www.cnblogs.com/seeyoumiter/p/14198525.html

版权声明:完美者 发表于 2021-01-01 12:02:48。
转载请注明:Centos设置阿里云yum源 | 完美导航

暂无评论

暂无评论...