1俯在、下載wget工具
yum install –y wget
2丁侄、進(jìn)入yum源配置文件所在文件夾
cd /etc/yum.repos.d/
3、備份本地yum源
mv CentOS-Base.repo CentOS-Base.repo_bak
4朝巫、獲取國(guó)內(nèi)yum源(阿里鸿摇、163二選一)
阿里云:
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
163:
wget -O CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
5、清理緩存劈猿、重建緩存拙吉、升級(jí)Linux系統(tǒng)
清理yum緩存:
yum clean all
重建緩存:
yum makecache
升級(jí)Linux系統(tǒng):
yum -y update