阿里云镜像网址
http://mirrors.aliyun.com/
更新步骤
一、备份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
二、下载新的CentOS-Base.repo 到/etc/yum.repos.d/
阿里云yum源
- CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
- CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
- CentOS 7
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
163yum源
- Centos5:
wget -P /etc/yum.repos.d http://mirrors.163.com/.help/CentOS5-Base-163.repo
- Centos6:
wget -P /etc/yum.repos.d http://mirrors.163.com/.help/CentOS6-Base-163.repo
- Centos7:
wget -P /etc/yum.repos.d http://mirrors.163.com/.help/CentOS7-Base-163.repo
三、之后运行yum makecache生成缓存
yum clean all
yum makecache
本文详细介绍了如何将Linux系统的YUM源更换为阿里云镜像或163镜像,包括备份原repo文件、下载并配置新的repo文件以及更新缓存的具体步骤。
7107

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



