我有一台centos7 1611 的机器 想着升级一下 简单进行测试
1. 操作系统的信息为:
[root@CentOS1611 yum.repos.d]# uname -a Linux CentOS1611 3.10.0-514.el7.x86_64 #1 SMP Tue Nov 22 16:42:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux [root@CentOS1611 yum.repos.d]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) [root@CentOS1611 yum.repos.d]#
2. 备份 yum的包源
cd /etc/yum.repos.d/
mkdir back
mv * back
3. 设置阿里的包源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
4. 创建cache
yum makecache
5. 执行升级
yum update -y
升级的包源会很多
6. 执行升级完重启之后的效果为:
[root@CentOS1611 ~]# cat /etc/redhat-release CentOS Linux release 7.7.1908 (Core) [root@CentOS1611 ~]# uname -a Linux CentOS1611 3.10.0-1062.18.1.el7.x86_64 #1 SMP Tue Mar 17 23:49:17 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux [root@CentOS1611 ~]#
7. 统计了一下时间. 大概耗时 80分钟 下载加安装加重启 速度其实还是挺快的.