下载wget
yum install wget
打开xshell,查看yum源信息:
yum repolist
跳转base reop源:
cd /etc/yum.repos.d
备份旧的配置文件:
mv CentOS-Base.repo CentOS-Base.repo.bak
下载基础源文件(阿里云):
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
下载扩展源文件(epel----企业版linux的额外软件包):
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
清理缓存:
yum clean all
重新生成缓存:
yum makecache
再次查看yum源信息:
yum repolist