redhat6更新阿里yum源

1.下载repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
2.编辑repo文件
vi  /etc/yum.repos.d/CentOS-Base.repo
http://mirrors.aliyun.com/centos/releasever/os/basearch/
把releasever替换成6.8
按esc退出编辑模式  :%s/releasever/6.9/g
http://mirrors.aliyun.com/centos/6.9/os/$basearch/
3.清除yum缓存
yum clean all
4.重新生产yum缓存
yum makecache
THE END
分享
二维码
< <上一篇
下一篇>>