centos7更新yum阿里源

  |   0 评论   |   7,642 浏览

1. 备份原来的yum源

$sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak 

2.设置aliyun的yum源

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

3.添加EPEL源

$sudo wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-7.repo

4.清理缓存,生成新缓存,执行yum更新

$sudo yum clean all
$sudo yum makecache
$sudo yum update


标题:centos7更新yum阿里源
作者:jackssybin
地址:https://jackssybin.cn/articles/2020/01/03/1578035132098.html

评论

发表评论


取消