CentOS8 升级CentOS 8 stream

  1. 确认CentOS8版本:

cat /etc/centos-release

  1. 从2021年2月1日后,CentOS8的repo彻底失效,全部迁移至https://vault.centos.org/,需要先替换为vault repo

sed -e ‘s|^mirrorlist=|#mirrorlist=|g’ \ -e ‘s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|’ \ -i.bak \ /etc/yum.repos.d/CentOS-*.repo详情: https://forums.centos.org/viewtopic.php?f=54&t=78708

  1. 下载转换repo:

dnf install -y centos-release-stream

  1. 确认repo列表:

dnf repolist

  1. 更换repo (https://vault.centos.org/centos/8/extras/x86_64/os/Packages/):

dnf swap -y centos-{linux,stream}-repos 或dnf swap -y centos-linux-repos centos-stream-repos

  1. 切换发行版:

dnf distro-sync

  1. 确认CentOS8版本:

cat /etc/centos-release

This entry was posted in Linux and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *