0

0

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

星夢妙者

星夢妙者

发布时间:2025-07-19 11:06:21

|

484人浏览过

|

来源于php中文网

原创

在安装宝塔面板时,我发现centos 8已经停止维护,导致官方软件源失效,无法获取许多依赖包。解决这个问题有两种方法:一是切换到腾讯或阿里云的软件源,升级系统;二是尝试更换源。最终,我选择了更换源,尽管过程有些复杂,但最终得以暂时解决。然而,问题接连出现,安装后宝塔面板的nginx无法启动,并显示以下错误:

error while loading shared libraries: libgd.so.2: cannot open shared object....

经过查找资料,我了解到这是由于缺少gd库导致的。最简单的解决方法是通过yum install gd来安装gd库。然而,在尝试使用该命令时,发现gd库无法找到,问题依然存在。最终,我决定升级到CentOS Stream,以避免将来再次遇到类似的问题。以下是升级过程的记录,整体而言,升级过程相当简单且轻松。

首先,输入以下命令,检查你的dnf仓库中是否有centos-release-stream

dnf search centos-release-stream

运行结果如下图所示:

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

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

dnf install -y centos-release-stream

接着,输入以下命令,查看已安装完毕的仓库:

MaxAI
MaxAI

MaxAI.me是一款功能强大的浏览器AI插件,集成了多种AI模型。

下载
dnf repolist

结果如下:

[root@VM-0-5-centos ~]# dnf repolistRepository AppStream is listed more than once in the configurationInvalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-Epel.repo; Configuration: OptionBinding with id "failovermethod" does not existRepository AppStream is listed more than once in the configurationRepository BaseOS is listed more than once in the configurationRepository centosplus is listed more than once in the configurationRepository extras is listed more than once in the configurationRepository fasttrack is listed more than once in the configurationRepository AppStream is listed more than once in the configurationRepository PowerTools is listed more than once in the configurationRepository extras is listed more than once in the configurationRepository fasttrack is listed more than once in the configurationRepository PowerTools is listed more than once in the configurationRepository epel is listed more than once in the configurationrepo id                   repo nameBaseOS                    Qcloud centos OS - x86_64PowerTools                Qcloud centos PowerTools - x86_64Stream-AppStream          CentOS-Stream - AppStreamStream-BaseOS             CentOS-Stream - BaseStream-extras             CentOS-Stream - Extrasepel                      EPEL for redhat/centos 8 - x86_64epel-modular              Extra Packages for Enterprise Linux Modular 8 - x86_64extras                    Qcloud centos extras - x86_64

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

dnf swap centos-linux-repos centos-stream-repos

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

dnf distro-sync

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

[root@VM-0-5-centos ~]# cat /etc/redhat-releaseCentOS Stream release 8

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

相关专题

更多
nginx 重启
nginx 重启

nginx重启对于网站的运维来说是非常重要的,根据不同的需求,可以选择简单重启、平滑重启或定时重启等方式。本专题为大家提供nginx重启的相关的文章、下载、课程内容,供大家免费下载体验。

230

2023.07.27

nginx 配置详解
nginx 配置详解

Nginx的配置是指设置和调整Nginx服务器的行为和功能的过程。通过配置文件,可以定义虚拟主机、HTTP请求处理、反向代理、缓存和负载均衡等功能。Nginx的配置语法简洁而强大,允许管理员根据自己的需要进行灵活的调整。php中文网给大家带来了相关的教程以及文章,欢迎大家前来学习阅读。

499

2023.08.04

nginx配置详解
nginx配置详解

NGINX与其他服务类似,因为它具有以特定格式编写的基于文本的配置文件。本专题为大家提供nginx配置相关的文章,大家可以免费学习。

498

2023.08.04

tomcat和nginx有哪些区别
tomcat和nginx有哪些区别

tomcat和nginx的区别:1、应用领域;2、性能;3、功能;4、配置;5、安全性;6、扩展性;7、部署复杂性;8、社区支持;9、成本;10、日志管理。本专题为大家提供相关的文章、下载、课程内容,供大家免费下载体验。

227

2024.02.23

nginx报404怎么解决
nginx报404怎么解决

当访问 nginx 网页服务器时遇到 404 错误,表明服务器无法找到请求资源,可以通过以下步骤解决:1. 检查文件是否存在且路径正确;2. 检查文件权限并更改为 644 或 755;3. 检查 nginx 配置,确保根目录设置正确、没有冲突配置等等。本专题为大家提供相关的文章、下载、课程内容,供大家免费下载体验。

333

2024.07.09

Nginx报404错误解决方法
Nginx报404错误解决方法

解决方法:只需要加上这段配置:try_files $uri $uri/ /index.html;即可。想了解更多Nginx的相关内容,可以阅读本专题下面的文章。

3508

2024.08.07

nginx部署php项目教程汇总
nginx部署php项目教程汇总

本专题整合了nginx部署php项目教程汇总,阅读专题下面的文章了解更多详细内容。

16

2026.01.13

nginx配置文件详细教程
nginx配置文件详细教程

本专题整合了nginx配置文件相关教程详细汇总,阅读专题下面的文章了解更多详细内容。

19

2026.01.13

PS使用蒙版相关教程
PS使用蒙版相关教程

本专题整合了ps使用蒙版相关教程,阅读专题下面的文章了解更多详细内容。

23

2026.01.19

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
PostgreSQL 教程
PostgreSQL 教程

共48课时 | 7.4万人学习

Git 教程
Git 教程

共21课时 | 2.8万人学习

关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号