Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
# Become root
$ sudo su -

# Update the CentOS 8 repositories:
$ for k in $(ls /etc/yum.repos.d/CentOS-Linux-*.repo); do sudo sed -e 's/^mirrorlist=/#mirrorlist=/' -e 's/#baseurl=http:\/\/mirror/baseurl=http:\/\/vault/' -i $k; done

# Update to the latest version of CentOS 8 & reboot
$ sudo dnf update
$ sudo shutdown -r now

In some cases it could happens that the first update fails reporting SSL certificate problems like this

Code Block
languagetext
[...]
CentOS Linux 8 - AppStream 0.0 B/s | 0 B 00:01
Errors during downloading metadata for repository 'appstream':
- Curl error (60): Peer certificate cannot be authenticated with given CA certificates for https://vault.centos.org/centos/8/AppStream/x86_64/os/repodata/repomd.xml [SSL certificate problem: certificate has expired]
Error: Failed to download metadata for repo 'appstream': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
[...]

If it happens the workaround is to add the parameter sslverify=0  in /etc/dnf/dnf.conf  and re-run dnf update . Remember to remove the sslverify  parameter before going on and after the first reboot.

Code Block
languagebash
# Become root
$ sudo su -

# Update the CentOS 8 repositories:
$ for k in $(ls /etc/yum.repos.d/CentOS-Linux-*.repo); do sudo sed -e 's/^mirrorlist=/#mirrorlist=/' -e 's/#baseurl=http:\/\/mirror/baseurl=http:\/\/vault/' -i $k; done

# Update to the latest version of CentOS 8 & reboot
$ sudo dnf update
$ sudo shutdown -r now

# Install CentOS Stream packages repositories 
$ sudo dnf in centos-release-stream

# Migrate from CentOS 8 to CentOS Stream 8 & reboot
$ sudo dnf swap centos-linux-repos centos-stream-repos
$ sudo dnf distro-sync
$ sudo shutdown -r now

...