1.检查一下,是否配置了wget
[root@localhost /]# man wget
没有 wget 的手册页条目
2.配置wget
yum -y install wget
3.wget下载repo
wget http://mirrors.aliyun.com/repo/Centos-7.repo
4.移动Centos-7.repo到/etc/yum.repos.d/
mv Centos-7.repo /etc/yum.repos.d/
5.切换到/etc/yum.repos.d/
cd /etc/yum.repos.d/
6.备份和替换
[root@localhost yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak
[root@localhost yum.repos.d]# mv Centos-7.repo CentOS-Base.repo
7.更新
yum clean all
yum makecache
yumupdate
8.检查
yum repolist