centos7更换阿里yum源
2024年10月31日小于 1 分钟
cetos7.9更换yum源
备份
cp -r /etc/yum.repos.d /etc/yum.repos.d.bak
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
rm -f /etc/yum.repos.d/*.repo
下载源文件
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all & yum makecache
yum update -y
重启
注
由于是最小安装centosMinmal7.9, 所以在执行yum update -y
时,内核也升级了,所以需要重启
reboot