redhat6更新阿里yum源

  • A+
所属分类:Problem
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
avatar

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: