1、删除自带的镜像配置(当然,你也可以对自带配置进行备份)
rm -f /etc/yum.repos.d/*
2、下载ailiyun的yum源配置文件到/etc/yum.repos.d/(以centos7为例)
wget -O /etc/yum.repos.d/CentOS-base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、运行yum makecache,生成缓存
yum makecache

1、删除自带的镜像配置(当然,你也可以对自带配置进行备份)
rm -f /etc/yum.repos.d/*
2、下载ailiyun的yum源配置文件到/etc/yum.repos.d/(以centos7为例)
wget -O /etc/yum.repos.d/CentOS-base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3、运行yum makecache,生成缓存
yum makecache