前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Centos 8完美升级到Centos Stream 8教程

Centos 8完美升级到Centos Stream 8教程

作者头像
vincentKo
发布2022-09-19 15:20:57
2.6K0
发布2022-09-19 15:20:57
举报
文章被收录于专栏:VK | BLOGVK | BLOG

CentOS 8 停止维护,软件源失效 在之前安装宝塔面板的时候,发现CentOS停止维护了,导致官方软件源失效,很多依赖都拉不到包。解决方式有两种: 切换腾讯/阿里软件源 升级系统 当时实在是懒得折腾,于是尝试换源,折腾下来,发现还是各种曲折,但最终算是暂时解决了。 但是一波未平,一波又起,安装后发现宝塔面板的Nignix无法启动,报错:

代码语言:javascript
复制
error while loading shared libraries: libgd.so.2: cannot open shared object....

搜索了资料,得到原因: 这个是因为缺失gd库,把他装上就可以了,最简单的方法即yum install gd 当然使用该命令时,发现找不到gd库,又遇到到麻烦了。 最终,还是决定升级CentOS,以防以后还会遇到各种包找不到,或者依赖的相关问题,这里对升级过程进行一个记录,相对还是非常简单、轻松的 升级Centos Stream过程 首先,输入如下命令,查看你的dnf仓库是否有centos-release-stream

代码语言:javascript
复制
dnf search centos-release-stream

运行结果如图

继续输入如下命令,开始安装centos-release-stream

代码语言:javascript
复制
dnf install -y centos-release-stream

接着,输入如下命令,查看已安装完毕的

代码语言:javascript
复制
dnf repolist

结果如下:

代码语言:javascript
复制
[root@VM-0-5-centos ~]# dnf repolist
Repository AppStream is listed more than once in the configuration
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-Epel.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Repository AppStream is listed more than once in the configuration
Repository BaseOS is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository fasttrack is listed more than once in the configuration
Repository AppStream is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository fasttrack is listed more than once in the configuration
Repository PowerTools is listed more than once in the configuration
Repository epel is listed more than once in the configuration
repo id                   repo name
BaseOS                    Qcloud centos OS - x86_64
PowerTools                Qcloud centos PowerTools - x86_64
Stream-AppStream          CentOS-Stream - AppStream
Stream-BaseOS             CentOS-Stream - Base
Stream-extras             CentOS-Stream - Extras
epel                      EPEL for redhat/centos 8 - x86_64
epel-modular              Extra Packages for Enterprise Linux Modular 8 - x86_64
extras                    Qcloud centos extras - x86_64

接着,输入命令,设置默认仓库

代码语言:javascript
复制
dnf swap centos-linux-repos centos-stream-repos

最后同步下仓库(系统安装为8.2版本后,dnf仓库就一直在自动更新,所以最后这个同步命令不运行也可以)

代码语言:javascript
复制
dnf distro-sync

好了,这样就完成了系统升级,查看下自己系统信息吧:

代码语言:javascript
复制
[root@VM-0-5-centos ~]# cat /etc/redhat-release
CentOS Stream release 8

参考 Centos 8完美升级到Centos Stream 8教程 - 冰沫记

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2022-03-10,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档