!
也想出现在这里? 联系我们
广告位
当前位置:首页>教程分享>服务器教程>云服务器centos stream 8 升级 centos stream 9遇到的坑

云服务器centos stream 8 升级 centos stream 9遇到的坑

1.安装epel源

dnf -y install epel-release

2.更新系统至最新版

dnf -y update

3.重启系统

reboot

4.安装rpmconf和yum-utils

dnf -y install rpmconf yum-utils

5.执行rpmconf ,如果出现一些提示,请输入Y和回车继续,如果没提示继续第四步操作

rpmconf -a

6.移除epel源

dnf -y remove rpmconf yum-utils epel-release

7.安装Centos-Stream-9相关的包

rpm -e --nodeps `rpm -qa|grep centos`

 

rpm -ivh --nodeps --force https://mirrors.aliyun.com/centos-stream/9-stream/BaseOS/x86_64/os/Packages/centos-stream-release-9.0-12.el9.noarch.rpm

rpm -ivh --nodeps --force https://mirrors.aliyun.com/centos-stream/9-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-9.0-12.el9.noarch.rpm

rpm -ivh --nodeps --force https://mirrors.aliyun.com/centos-stream/9-stream/BaseOS/x86_64/os/Packages/centos-stream-repos-9.0-12.el9.noarch.rpm

dnf clean all

 

8.升级Centos-Stream-9

 dnf -y --releasever=9-stream --allowerasing --setopt=deltarpm=false distro-sync

执行这条命令会提示失败,首先是提示缺少很多组件,我这个竟然缺少了40多个,所以先一次性禁用

dnf -y module disable perl-YAML perl-libwww-perl virt varnish swig subversion squid  satellite-5-client  rust-toolset ruby rhn-tools redis python39 python38 python36 python27 postgresql php perl nodejs nginx mysql mercurial maven mariadb mailman llvm-toolset jmc inkscape idm httpd  go-toolset gimp freeradius container-tools perl-IO-Socket-SSL perl-FCGI perl-DBI perl-DBD-SQLite perl-DBD-Pg perl-DBD-MySQL perl-App-cpanminus

然后reboot重启

再次 

dnf -y --releasever=9-stream --allowerasing --setopt=deltarpm=false distro-sync 还是无法更新,提示 centos-gpg-keys-9.0-12.el9 无支持。

只好改成非最佳选项升级:  

dnf -y --releasever=9-stream --allowerasing --setopt=deltarpm=false distro-sync --nobest

终于开始了更新。

9.  重建rpm数据库

rpm --rebuilddb

  rpm -qa | grep kernel 查看安装的内核

10.卸载Centos-Stream-8的内核

rpm -e --nodeps `rpm -qa|grep -i kernel|grep 4.18`

11.安装新内核

dnf -y install kernel kernel-core shim

 12.安装基础环境

dnf group install minimal-environment -y

13.安装epel源、rpmconf和yum-utils

dnf -y install epel-release

dnf -y install rpmconf yum-utils

14.更新系统

 dnf -y update

15.执行rpmconf,会出现如下界面,一直输入Y和回车即可

rpmconf -a

16. 修改设置,核对是否允许root 远程登录

vi /etc/ssh/sshd_config
查看下是否有有的话改成然后保存。

不然可能重启后 root 无法远程登录了。

 16.重启系统

reboot

给TA打赏
共{{data.count}}人
人已打赏
服务器教程

YZMCMS登录后台提示Controller does not exist:index

2021-4-17 19:29:36

服务器教程

linux云服务器apache下设置指定域名跳转到https

2021-4-17 19:29:38

声明 本站上的部份代码及教程来源于互联网,仅供网友学习交流,若您喜欢本文可附上原文链接随意转载。无意侵害您的权益,请发送邮件至 [email protected] 或点击右侧 私信:吉吉国王 反馈,我们将尽快处理。
0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索
OneEase