1.下载repo文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
2.更改发行版本及CPU体系架构参数值($releasever与$basearch)
sed -i.$(date +%F) ‘s#/$releasever#/6#g;s#/$basearch#/x86_64#g‘ CentOS-Base.repo
3.清空yum缓存
yum clean all
时间: 2024-10-14 06:27:01