1、备份yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
2、下载yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
3、查看更新清单:yum check-update
4、剔除不需要升级的软件
vim /etc/yum.conf
添加exclude=mysql* nginx*
5、升级:yum -y update
6、重启
验证:cat /etc/redhat-release