前言

由于CentOS 8的支持已经到期了,.NET 6也不支持了,然后也无法升级,导致使用起来已经非常不便,无奈只有迁移服务器这个选项了。

选择发行版本一直是一个比较头疼的问题,首先我不是专门运维的,最好使用的人比较多的版本,然后.NET要官方支持的版本才行,最好是具有中国区的镜像服务。虽然Fedora、OpenSUSE、Debian也算用的人多,但是比起UbuntuCentOS还是稍微少一点,因此首选是Ubuntu。当然这里很多人觉得Ubuntu其实并不适合做服务器系统,我觉得应该差不多,毕竟支持周期来看,Ubuntu的标准声明周期也挺长的,而且如果一直用,一直升级的话,其实也无所谓。

迁移CentOS 8到Ubuntu,找了很多资料都没找到可以比较简单实现迁移的方法,最简单的使用DVD或者U盘进行全新安装,这个对于一个已经在运行的系统来说,迁移的成本有点太高了。无奈只能继续寻找CentOS的替代。发现一个Rocky Linux好像还行,是CentOS的原作者主导开发的,而且渐渐的很多地方都开始支持并提供了国内的镜像,最重要的是,他直接提供了升级的工具:migrate2rocky

从CentOS 8升级

使用比较简单,直接执行命令:

curl https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh -o migrate2rocky.sh

chmod u+x migrate2rocky.sh

./migrate2rocky.sh -r

三个命令下去就开始检查了,我正式执行更新的时候,出现了问题:

Error: Check discovered 9 problem(s)
libnsl-2.28-164.el8_5.3.i686 has missing requires of glibc(x86-32) = 2.28-164.el8_5.3
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.0)
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.1)
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.1.3)
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.2)
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.2.3)
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.28)
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.4)

我以为是缺少这个包,使用yum install libnsl安装了一下,继续执行:

libnsl-2.28-164.el8.x86_64 is a duplicate with libnsl-2.28-164.el8_5.3.i686
libnsl-2.28-164.el8_5.3.i686 has missing requires of glibc(x86-32) = 2.28-164.el8_5.3
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.0)
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.1)
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.1.3)
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.2)
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.2.3)
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.28)
libnsl-2.28-164.el8_5.3.i686 has missing requires of libc.so.6(GLIBC_2.4)

好家伙,又多了一个,仔细检查,好像是64位程序和32位程序混装了,直接yum remove libnsl卸载,然后继续执行,会在这个界面上卡非常久,需要耐心等待。

Running dnf update before we attempt the migration.
Last metadata expiration check: 0:00:31 ago on Fri Apr 29 12:58:47 2022. Dependencies resolved.
Nothing to do.
Complete!
Added rockyappstream repo from https://dl.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/
Added rockybaseos repo from https://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/

我这边升级大概花费了不到半个小时吧,当提示出现以下信息,就成功了。

Done, please reboot your system.
A log of this installation can be found at /var/log/migrate2rocky.log

最后reboot一下,使用hostnamectl命令检查是否更新成功,当看见下面的提示,就成功了。

Operating System: Rocky Linux 8.5 (Green Obsidian)

安装GUI界面

说实在话,使用SSH进行命令行操作我觉得还是差点意思,自己使用起来还是有GUI比较顺手一点,为了远程访问比较简单,可以使用带界面的版本,并配置使用windows自带的远程桌面访问。

详情可以查看:

  1. centos7安装xfce桌面及xrdp远程桌面服务
  2. centos8安装xfce图形界面

CentOS 8迁移Rocky Linux 8手记的更多相关文章

  1. CentOS 并没有死,Rocky Linux 让其重生

    点击上方"开源Linux",选择"设为星标" 回复"学习"获取独家整理的学习资料! 近日,CentOS 官方发文称CentOS Stream ...

  2. CentOS 8 已经不再支持,Rocky Linux 才是未来

    2020年12月8日,红帽公司宣布,他们将停止开发CentOS,而在此之前CentOS一直作为红帽企业Linux的生产型分支及下游版本,此后他们将转而开发该操作系统的一个更新的上游开发变种,即 &qu ...

  3. jira从windows迁移到linux

    说明:迁移的就是 jira安装路径/atlassian/jira/atlassian-jira/WEB-INF/classes/jira-application.properties文件中的jira_ ...

  4. VMware 虚拟机图文安装和配置 Rocky Linux 8.5 教程

    前言 2020 年,CentOS 宣布:计划未来将重心从 CentOS Linux 转移到 CentOS Stream.CentOS 8 的生命周期已于 2021 年 12 月 31 日终止,而 Ce ...

  5. 如何利用mono把.net windows service程序迁移到linux上

    How to migrate a .NET Windows Service application to Linux using mono? 写在最前:之所以用要把windows程序迁移到Linux上 ...

  6. 把 SQL Server 迁移到 Linux?不如换成 MySQL

    最近几年,数量庞大的个人和组织放弃 Windows 平台选择 Linux 平台,而且随着人们体验到更多 Linux 的发展,这个数字将会继续增长.在很长的一段时间内, Linux 是网络服务器的领导者 ...

  7. Install MongoDB on Red Hat Enterprise, CentOS, Fedora, or Amazon Linux

    Install MongoDB on Red Hat Enterprise, CentOS, Fedora, or Amazon Linux¶ Overview Use this tutorial t ...

  8. SpringNote02.Blog系统迁移到Linux下

    基于SpringMVC-Hibernate的博客系统还在继续开发中 . 项目地址:https://github.com/defshine/SpringBlog 整个项目迁移到linux下开发,安装in ...

  9. ubuntu下lamp环境配置及将window代码迁移至linux系统

    因为最近要用需要去实现项目中的一个功能,比较好的做法就是在http://i.cnblogs.com/EditPosts.aspx?opt=1linux中实现.所以最近就将自己的代码全部迁移到linux ...

随机推荐

  1. SpringSecurity集成启动报 In the composition of all global method configuration, no annotation support was actually activated 异常

    异常内容: Caused by: java.lang.IllegalStateException: In the composition of all global method configurat ...

  2. 简述 synchronized 和 java.util.concurrent.locks.Lock 的异同?

    Lock 是 Java 5 以后引入的新的 API,和关键字 synchronized 相比主要相同点: Lock 能完成 synchronized 所实现的所有功能:主要不同点:Lock 有比 sy ...

  3. 简述 Mybatis 的插件运行原理,以及如何编写一个插件。

    Mybatis 仅可以编写针对 ParameterHandler.ResultSetHandler. StatementHandler.Executor 这 4 种接口的插件,Mybatis 使用 J ...

  4. 在 mapper 中如何传递多个参数?

    1.第一种: DAO 层的函数 public UserselectUser(String name,String area); 对应的 xml,#{0}代表接收的是 dao 层中的第一个参数,#{1} ...

  5. jsp:useBean报错The value for the useBean class attribute X is invalid

    一.解决方法 1.先检查<jsp:useBean id="dog" class="cn.edu.dgut.el.tools.Dog" scope=&quo ...

  6. 使用Node.js版本管理器

    使用Node.js版本管理器 完全卸载Node.js 清除Package缓存:npm cache clean --force 卸载Node.js:wmic product where caption= ...

  7. 无单位数字和行高 —— 别说你懂CSS相对单位

    前段时间试译了Keith J.Grant的CSS好书<CSS in Depth>,其中的第二章<Working with relative units>,书中对relative ...

  8. 前端网络安全——Cookies

    一.Cookies特性 1.前端数据存储 2.后端通过http头设置 3.请求时通过http头传给后端 4.前端可读写 5.遵守同源策略 二.Cookies内容 1.域名 2.有效期,删除cookie ...

  9. ES6-11学习笔记--箭头函数

    1.this指向定义时所在的对象,而不是调用时所在的对象 2.不可以当做构造函数 3.不可以使用arguments对象   ES5中定义函数的两种方式: function fn1() { consol ...

  10. Android Studio 异常以及解决方案

    1. Error:(1, 0) Plugin is too old, please update to a more recent version, or set ANDROID_DAILY_OVER ...