System: centOS7
- Backup you original yum file
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
- Download the Aliyun`s repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
- Clear cache
yum clean all
- Generate cache
yum makecache
Tips: If you aren`t an administrator to operate it ,you need to append "sudo " before your commands