码迷,mamicode.com
首页 > 其他好文 > 详细

centos7更新yum库为aliyun库

时间:2019-07-30 15:40:53      阅读:93      评论:0      收藏:0      [点我收藏+]

标签:base   mirror   centos7   执行   epel   net   aliyun   添加   yum源   

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

感谢阿里为国内开发者做的贡献

摘自 https://blog.csdn.net/zytbft/article/details/81166345

centos7更新yum库为aliyun库

标签:base   mirror   centos7   执行   epel   net   aliyun   添加   yum源   

原文地址:https://www.cnblogs.com/xinyumuhe/p/11270184.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!