您的位置:首页 > 运维架构 > Linux

centos7 修改yum源为阿里源

2017-10-24 17:32 295 查看
1、安装base reop源

cd /etc/yum.repos.d


2、备份旧的配置文件

sudo mv CentOS-Base.repo CentOS-Base.repo.bak


3、下载阿里源的文件

sudo wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo[/code] 
4、安装epel repo源:

epel(RHEL 7)

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


epel(RHEL 6)

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


epel(RHEL 5)

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


5、清理缓存

yum clean all


6、重新生成缓存

yum makecache
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  centos 阿里 yum 备份