centos7升级centos8
步骤一:安装epel存储库
yum install epel-release -y
步骤二:安装yum-utils工具
1
|
yum install yum-utils |
步骤三:解析rpm包
1
2
3
4
|
yum install rpmconf rpmconf -a package-cleanup --leaves package-cleanup --orphans |
步骤四:安装dnf
1
|
yum install dnf -y |
步骤五:删除软件包管理器
1
|
dnf remove yum yum-metadata-parser<br>rm -Rf /etc/yum |
步骤六:升级
1
|
dnf upgrade<br> |
步骤七:使用dnf安装CentOS 8发行包
1
|
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存储库
1
|
dnf -y upgrade https: //dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm |
步骤九:成功升级EPEL存储库后,请删除所有临时文件
1
|
dnf clean all |
步骤十:删除用于CentOS 7的旧内核内核
1
|
rpm -e `rpm -q kernel` |
步骤十一:删除有冲突的软件包
rpm -e --nodeps sysvinit-tools
步骤十二:
1
|
dnf -y --releasever=8 --allowerasing --setopt=deltarpm= false distro-sync |
步骤十三:CentOS 8安装新的内核
1
|
dnf -y install kernel-core |
步骤十四:最后,安装CentOS 8最小软件包。
1
|
dnf -y groupupdate "Core" "Minimal Install" |
步骤十五:检查版本
1
|
cat /etc/redhat-release |