CentOS 7.9升级至CentOS 8 Linux

识字粗堪供赋役,不须辛苦慕公卿。这篇文章主要讲述CentOS 7.9升级至CentOS 8 Linux相关的知识,希望能为你提供帮助。
?1、?查看系统版本:

# cat /etc/redhat-release


?2、    ?安装epel源:
# yum -y install epel-release

?3、    ?安装yum-utils软件包:
# yum -y install yum-utils

?4、    ?安装rpmconf软件包:
# yum -y install rpmconf

?5、    ?使用rpmconf命令检查所有软件包的配置文件:
# rpmconf -a


备注:保持默认配置
?6、    ?清理不需要的RPM包:
# package-cleanup --leaves


# package-cleanup --orphans


?7、    ?安装CentOS 8默认包管理器dnf:
# yum -y install dnf

?8、    ?删除CentOS 7默认包管理器yum:
# dnf -y remove yum yum-metadata-parser
# rm -rf /etc/yum


9、升级系统:
# dnf upgrade


?10、?安装CentOS 8发行包:
# dnf install http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-linux-repos-8-3.el8.noarch.rpm,centos-linux-release-8.5-1.2111.el8.noarch.rpm,centos-gpg-keys-8-3.el8.noarch.rpm


?11、?升级epel源:
# dnf upgrade https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm


?12、?删除所有临时文件:
# dnf clean all


?13、?删除CentOS 7.9内核:
# rpm -e `rpm -q kernel`

?14、?CentOS 8系统升级:
# dnf --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync

报错:

解决:
# dnf remove dracut-network

?15、?CentOS 8系统再次升级:
# dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync

依旧报错:

解决:
# rpm -e --nodeps sysvinit-tools

?16、?CentOS 8系统第三次升级:
# dnf -y --releasever=8 --allowerasing --setopt=deltarpm=false distro-sync

?17、?CentOS 8安装新内核:
# dnf -y install kernel-core


提示信息:Invalid configuration value:failovermethod=priority in /etc/yum.repos.d/epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
解决:
# vim /etc/yum.repos.d/epel.repo

注释所有的failovermethod=priority
?18、?CentOS 8安装软件包:
# dnf groupupdate "Core" "Minimal Install"

?19、?查看系统版本:
# cat /etc/redhat-release


?20、?部署nginx并访问测试:
【CentOS 7.9升级至CentOS 8 Linux】?(1)?部署Nginx:
# dnf -y install nginx
# systemctl start nginx
# systemctl status nginx
# ss -tunlp | grep 80
# systemctl enable nginx

?(2)?浏览器访问192.168.0.200:


    推荐阅读