centos7升级centos8
步骤一:安装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