CentOS7 config aliyun yum repository

https://www.cnblogs.com/lpbottle/p/7875400.html

1. 备份原来的yum源

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

2. 下载阿里云的CentOS-Base.repo 到/etc/yum.repos.d/

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

或者

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

执行结果如下图:

CentOS7 config aliyun yum repository

3. 清理缓存

sudo yum clean all

执行结果:

CentOS7 config aliyun yum repository

4. 生成新的缓存

sudo yum makecache

执行结果:

CentOS7 config aliyun yum repository

上一篇:lightswitch Grid 控件添加 CheckBox 多选


下一篇:xfs文件系统磁盘配额