目录
linux 升级centos7版本
我这里从centos7.*升级到centos7.9
查看系统版本
[root@centos7-2 ~]# cat /etc/redhat-release
CentOS Linux release 7.8.2003 (Core)
更换国内源
//更换国内源(可选)类似应用市场,如安卓有安卓应用市场,Apple有App应用市场一样
//备份Linux自带的EPEL源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
//下载源环境,默认下载升级系统最高为7.9,要更新到8.X版本的可以更换8的源参考https://blog.csdn.net/huang431127/article/details/119864243?spm=1001.2014.3001.5501
cd /etc/yum.repos.d
wget -O CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
//清空缓存
yum clean all
//重新生成缓存
yum makecache
//系统升级,更新完成会自动重启
yum -y update
验证
[root@centos7-2 ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
标签:repo,CentOS,centos7,etc,yum,版本,linux
From: https://www.cnblogs.com/liwenchao1995/p/16714098.html