首先安装wget组件:
yum install -y wget
国外地址yum源下载慢,下到一半就断了,就这个原因就修改它为国内yum源地址
国内也就是ali 与 网易
以centos7为例 ,以 修改为阿里的yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
2.获取阿里yum源配置文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3.更新cache
yum makecache
4.查看
yum -y update
“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill
标 题:Centos 7换源