CentOS7.4怎樣更新yum源
阿新 • • 發佈:2019-04-08
bsp entos epo wget spa centos7 cache 原來 ror
1. 備份原來的yum源
$sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo-backup
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(可選)
參考文章:
https://blog.csdn.net/zytbft/article/details/81166345
https://yq.aliyun.com/articles/691851?spm=a2c4e.11155472.0.0.42e22088vZPR8y
CentOS7.4怎樣更新yum源