centos 配置 aliyun yum源

版权声明:本文为博主原创文章,转载请标明出处。 https://blog.csdn.net/ctypyb2002/article/details/77531759

备份

cd /etc/yum.repos.d
mv ./CentOS-Base.repo ./CentOS-Base.repo.bak
mv ./CentOS-Debuginfo.repo ./CentOS-Debuginfo.repo.bak
mv ./CentOS-fasttrack.repo ./CentOS-fasttrack.repo.bak
mv ./CentOS-Media.repo ./CentOS-Media.repo.bak
mv ./CentOS-Vault.repo ./CentOS-Vault.repo.bak

下载新的CentOS-Base.repo

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

运行yum makecache生成缓存

yum makecache

展开阅读全文

没有更多推荐了,返回首页