步驟一:安裝epel存儲庫
yum install epel-release -y
步驟二:安裝yum-utils工具
yum install yum-utils
步驟三:解析rpm包
yum install rpmconf rpmconf -a package-cleanup --leaves package-cleanup --orphans
步驟四:安裝dnf
yum install dnf -y
步驟五:刪除軟件包管理器
dnf remove yum yum-metadata-parser
rm -Rf /etc/yum
步驟六:升級
dnf upgrade
步驟七:使用dnf安裝CentOS 8發行包
dnf -y upgrade http://mirror.bytemark.co.uk/centos/8/BaseOS/x86_64/os/Packages/centos-release-8.0-0.1905.0.9.el8.x86_64.rpm
步驟八:升級EPEL存儲庫
dnf -y upgrade https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
步驟九:成功升級EPEL存儲庫后,請刪除所有臨時文件
dnf clean all
步驟十:刪除用於CentOS 7的舊內核內核
rpm -e `rpm -q kernel`
步驟十一:刪除有沖突的軟件包
rpm -e --nodeps sysvinit-tools
步驟十二:
dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync
步驟十三:CentOS 8安裝新的內核
dnf -y install kernel-core
步驟十四:最后,安裝CentOS 8最小軟件包。
dnf -y groupupdate "Core" "Minimal Install"
步驟十五:檢查版本
cat /etc/redhat-release