1. Delete comes with yum source:
#cd /etc/yum.repos.d/
#rm -rf *
#cd /etc/yum.repos.d/
#rm -rf *
2. Configure Remote yum source:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
wget -O /etc/yum.repos 2.d / Base.repo the CentOS-http://mirrors.aliyun.com/repo/Centos-7.repo
(two kinds of a fine optionally)
### to replace the releasever $ 6, do not do this step
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
wget -O /etc/yum.repos 2.d / Base.repo the CentOS-http://mirrors.aliyun.com/repo/Centos-7.repo
(two kinds of a fine optionally)
### to replace the releasever $ 6, do not do this step
3. Verify yum source configuration Success:
Clear the cache yum source
#yum clean all
Clear the cache yum source
#yum clean all
4. Link remote yum source
#yum makecache
#yum makecache
5. Check the configured yum source information "
# yum repolist
# yum repolist