默认的yum下载源不在国内,导致下载极其缓慢,甚至中途断掉
更换国内源,国内有阿里和网易源
备份本地yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
获取yum源配置文件
阿里源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
网易源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
更新cache
yum makecache
查看
yum -y update
最后你就可以链接国内镜像了