以centos7爲例 ,以 修改成阿里的yum源centos
1. 備份本地yum源centos7
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak get
2.獲取阿里yum源配置文件配置
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo date
3.更新cacheyum
yum makecache 配置文件
4.查看文件
yum -y update make
5.最後你就能夠連接國內鏡像了,其實就是那個什麼城XXX的 。。。備份
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache
yum -y update