Centos7设置阿里源
1、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
2、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、执行yum源更新命令
运行yum clean all 清除缓存,运行 yum makecache 生成新的缓存。
yum clean all
yum makecache
yum update
依次执行上述三条命令即配置完毕。
齐活😃

本文指导您如何在CentOS 7系统中备份原有yum源,然后切换至阿里云官方镜像,包括备份旧文件、下载并替换新的repo文件,并执行清理与更新操作。
1万+

被折叠的 条评论
为什么被折叠?



