1、安装dnf

CentOS 8开始使用dnf作为包管理器替代yum,参数和yum命令几乎一样,同时安装wget,后面需要单独下载一些 rpm包

[root@localhost yum.repos.d]# yum install -y dnf wget
...
Installed:dnf.noarch 0:4.0.9.2-1.el7_6                                                               Dependency Installed:deltarpm.x86_64 0:3.6-3.el7                         dnf-data.noarch 0:4.0.9.2-1.el7_6      libcomps.x86_64 0:0.1.8-14.el7                      libdnf.x86_64 0:0.22.5-1.el7_6         libmodulemd.x86_64 0:1.6.3-1.el7                    librepo.x86_64 0:1.8.1-7.el7           libreport-filesystem.x86_64 0:2.1.11-53.el7.centos  libsolv.x86_64 0:0.6.34-4.el7          python-enum34.noarch 0:1.0.4-1.el7                  python2-dnf.noarch 0:4.0.9.2-1.el7_6   python2-hawkey.x86_64 0:0.22.5-1.el7_6              python2-libcomps.x86_64 0:0.1.8-14.el7 python2-libdnf.x86_64 0:0.22.5-1.el7_6             Complete!

2、安装CentOS 8发行包

下载CentOS 8的发行包,之所以先下载不直接安装,是因为直接安装有太多依赖,我们需要用–nodeps手动安装,

[root@localhost home]# wget https://mirrors.aliyun.com/centos/8.2.2004/BaseOS/x86_64/os/Packages/centos-release-8.2-2.2004.0.1.el8.x86_64.rpm
[root@localhost home]# ls
centos  centos-release-8.2-2.2004.0.1.el8.x86_64.rpm
[root@localhost home]# rpm -Uvh centos-release-8.2-2.2004.0.1.el8.x86_64.rpm --nodeps
warning: centos-release-8.2-2.2004.0.1.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 8483c65d: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...1:centos-release-8.2-2.2004.0.1.el8################################# [ 50%]
Cleaning up / removing...2:centos-release-7-6.1810.2.el7.cen################################# [100%]

3、添加CentOS 8 base repo

为了下载速度快一点,我们使用阿里云的yum源,

[root@localhost yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-8.repo

4、安装CentOS 8 EPEL release

[root@localhost yum.repos.d]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
warning: /var/tmp/rpm-tmp.tR2kHM: Header V3 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...1:epel-release-8-8.el8             ################################# [ 50%]
Cleaning up / removing...2:epel-release-7-12                ################################# [100%]

5、删除冲突组件

有一些组件在8系列会有冲突,比如内核包,因此我们提前卸载,也可以等你升级时报错,看有哪些有冲突再卸载

rpm -e kernel sysvinit-tools gdbm kexec-tools systemd-sysv yum --nodeps

6、开始升级

按照CentOS 8发行版的repo,更新当前系统上组件到对应的CentOS 8版本,耗时会久一点,

[root@localhost  home]# dnf --allowerasing distro-sync -y

7、安装内核

[root@localhost boot]# dnf -y install kernel
...
Installed:kernel-4.18.0-193.14.2.el8_2.x86_64            kernel-core-4.18.0-193.14.2.el8_2.x86_64   kernel-modules-4.18.0-193.14.2.el8_2.x86_64   Complete!

8、重启系统

[root@localhost home]# reboot

9、查看系统版本和内核

[root@localhost ~]# uname -a
Linux localhost 4.18.0-193.14.2.el8_2.x86_64 #1 SMP Sun Jul 26 03:54:29 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 8.2.2004 (Core)

CentOS 7.X升级至CentOS 8.2相关推荐

  1. centos7安装uwsgi报错_如何将CentOS 7升级到CentOS 8

    在本文中,您将学习如何将CentOS 7升级到CentOS 8.本文描述的步骤尚未描述正式升级,因此不能应用于生产服务器. ​ Upgrade-CentOS-7-to-CentOS-8 步骤1:安装E ...

  2. 【Centos 8】【Centos 7】【Docker】 添加 DockerHub 的镜像地址

    前言 CentOS Linux release 8.2 CentOS Linux release 7.6 [Centos 8][Centos 7][Docker] 安装 RabbitMQ时,拉取doc ...

  3. 【Centos 8】【Centos 7】【Docker】 安装 RabbitMQ

    前言 CentOS Linux release 8.2 CentOS Linux release 7.6 docker 19.03.14 准备 docker 已安装. 安装 docker 参考:[Ce ...

  4. centos系统服务器关机,centos 7 重启服务器

    centos 7 重启服务器 内容精选 换一换 本节操作介绍Linux操作系统云服务器在单用户模式下重置密码的操作步骤.本文档适用于X86架构的弹性云服务器.进入单用户模式下重置root密码前请先做好 ...

  5. centos镜像 from_下载 CentOS 7 镜像文件

    CentOS 7 镜像文件的下载地址 点击"Get CentOS Now" 点击想要下载的ISO镜像,(目前仅有"DVD ISO"和"Minimal ...

  6. CentOS 6.x 和 CentOS 7.x 中 Nginx 的操作命令(启动/重启/退出/...)

    CentOS 6.x 和 CentOS 7.x 中 Nginx 的操作命令(启动/重启/退出/...) --------- CentOS 6.x 中 Nginx 的操作命令 --------- # n ...

  7. 华为服务器centos系统重装,重装centos系统

    重装centos系统 内容精选 换一换 运行exagear命令,即可启动一个x86 shell,也称为guest shell,进入到虚拟的x86 OS环境.显示:Starting /bin/bash ...

  8. RHEL/CentOS/Fedora常用的 CentOS 5/6/7 yum 源(EPEL、Remi、RPMForge、RPMFusion, ius,163,sohu,阿里云)配置...

    RHEL以及他的衍生发行版如CentOS.Scientific Linux为了稳定,官方的rpm repository提供的rpm包往往是很滞后的,当然了,这样做这是无可厚非的,毕竟这是服务器版本,安 ...

  9. CentOS内核版本升级至4.4

    CentOS内核升级至4.4 所需资源下载地址 一.查看系统版本,内核版本 二.拷贝至服务器安装 三.指定默认启动内核 四.重新创建内核配置 五.重启服务器使用新内核启动 六.查看内核版本 所需资源下 ...

最新文章

  1. Shell 定时清理小脚本
  2. mobilenetv2_unet
  3. zookeeper入门综合概要介绍
  4. 解决虚拟机在能ping通网关情况下出现From 192.168.1.10: icmp_seq=1 Redirect Network(New nexthop: 192.168.1.1)问题
  5. spark sql练习之join操作
  6. python做服务器需要什么模块_用Python自带的包建立简单的web服务器
  7. 阿里云云计算 50 云监控的使用
  8. MediaCreationTool工具重装win10系统(小白专用)
  9. AdapterView.AdapterContextMenuInfo
  10. 开源究竟差哪了--- 关于开源软件和自由软件的区别
  11. 网格员试题计算机,网格员考试 计算机基础知识试题库完整.doc
  12. 基于海康威视IP摄像头和虹软的MFC人脸识别系统开发教程
  13. c++勾股定理解直三角形边长
  14. php阴阳万年历转换的接口,PHP编程实现阳历转换为阴历的方法实例
  15. 【报告分享】2021年度小红书高效种草营销手册-标记我的生活-小红书(附下载)
  16. 数据挖掘实战(6)——机器学习实现文本分类(今日头条tnews数据集)
  17. 计算各位数字的平方和
  18. Excel COUNT COUNTA区别
  19. 直播|BIA Separations 和元生物两位大咖关于质粒DNA的制造工艺和质量控制
  20. 线程八—— 线程插队 join()

热门文章

  1. 水满自溢「限流算法第四把法器:漏桶算法」- 第303篇
  2. Shader实例:Planar Reflection 平面反射
  3. Android逆向入门7——Smali语法学习(1)
  4. 蚂蚁花呗1-5面(高级):分布式+MySQL+HashMap+线程池+MQ+Redis
  5. 用 Python 写一个颜值测试小工具
  6. 使用dpkg命令安装deb文件包
  7. 唱吧开源库KTVHTTPCache学习(二)
  8. python合并excel出现多余列等问题
  9. VUE简单上手学习 摸摸就上道1
  10. gitflow的规范