CentOS 8.X升级到CentOS 8 Stream
2
2022-08-14
查看系统版本、更换华为源
# cat /etc/redhat-release CentOS Linux release 8.2.2004 (Core) wget -O /etc/yum.repos.d/CentOS-Base.repo https://repo.huaweicloud.com/repository/conf/CentOS-8-reg.repo
Centos 8.3以下须先升级到8.5 ,再升级到Stream
- 注释mirrorlist
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*.repo
- 指向baseurl至vault.epel.cloud存储库
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.epel.cloud|g' /etc/yum.repos.d/CentOS-*.repo
- 升级系统至Centos 8.5
yum update -y
Centos 8.3+升级到Centos 8 Stream
- 第1步
dnf --disablerepo '*' --enablerepo extras swap centos-linux-repos centos-stream-repos
- 第2步
dnf distro-sync
- 重启系统
reboot
- 0
-
分享