如何从 CentOS 8 迁移到 AlmaLinux(转换)

[ad_1]

一世 已经写过关于从 CentOS 8 迁移到 CentOS Stream 的文章。 我还有一个关于从 CentOS 8 迁移到 Rocky Linux 的指南。 今天,我和我的搭档正在做另一个副项目,我想尝试一下 AlmaLinux。 因此,这篇快速文章将列出将现有 VM 或裸机服务器从 CentOS 8 转换为 AlmaLinux 8 的步骤。该服务器目前充当移动应用程序的 API,包括 PostgreSQL、Redis、Python+Django、 Apache Web 服务器,以及 SELinux 和 firewalld。

警告! 在开始升级和转换过程之前进行备份。 我是一名经验丰富的 Linux 用户、开发人员和系统管理员。 但是,备份是无可替代的。 保留经过验证的备份。 不要在没有备份的情况下继续操作。 nixCraft 不对数据丢失负责。

如果您通过 SSH 会话执行此操作,我建议您通过 GNU/screen 或 Tmux 终端多路复用器运行命令。

从 CentOS 8 迁移到 AlmaLinux(转换)

CentOS 8 Linux stable 迁移到AlmaLinux的步骤如下

  1. 以 root 用户身份登录:
    sudo -i
  2. 通过运行 dnf 命令/yum 命令将挂起的更新应用到 CentOS 8:
    dnf update
  3. 安装新的内核更新后重新启动 Linux 机器:
    reboot
  4. 重启后,您需要使用 wget 或 curl 命令,输入:
    wget https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
    # read the script #
    vim almalinux-deploy.sh
  5. 接下来使用 chmod 命令设置可执行权限,运行:
    chmod -v +x almalinux-deploy.sh
  6. 最后,通过键入 almalinux-deploy.sh 将 CentOS 迁移到 AlmaLinux:
    ./almalinux-deploy.shMigrating from CentOS 8 to AlmaLinux started
  7. 升级和迁移将花费他们自己的美好时光。 这完全取决于您的服务器硬件规格和 Internet 速度。 所以等待并注意屏幕上的错误。 最后,您应该在屏幕上看到如下确认消息:
    Complete!
    Run dnf distro-sync -y                                                OK
    Restoring of alternatives is done                                     OK
    Generating grub configuration file ...
    done
    All Secure Boot related packages which were released by not AlmaLinux are reinstalledOK
     
    Migration to AlmaLinux is completed
  8. 重新启动托管在 AWS 或 Linode 上的 Linux 机器:
    shutdown -r now
    Connection to 3.1x.2xx.2xx closed by remote host.
  9. 最后,验证AlmaLinux版本,运行:cat /etc/redhat-release
    ## OR ##
    cat /etc/os-release
    Verify the AlmaLinux version after conversion from CentOS 8 server
  10. 此外,请确保所有服务,例如 PGSQL、 Apache 和其他人正在使用 ps 命令或 ss 命令运行:
    ss -tulpn | more
    ss -tulpn | grep ":80"
    # Verify logs using the tail command and dmesg command+egrep command #
    tail -f /var/log/httpd/app_name_goes_here
    dmesg | egrep -i 'error|critical|warn'

视频教程

YouTube video player

加起来

目前,我使用 CentOS 8 Steam、Rocky Linux 和 Alma Linux。 我想研究三个主要的 CentOS 8 替代品如何在生产中工作,尤其是在提供更新时。 这 admin 除 CentOS 8 Stream ABI/API 外,所有三个发行版上的部分和命令都是相同的,但我现在并不关心这一点。

这就是所有人。 从 CentOS 8 Linux 迁移到 AlmaLinux 8 毫不费力。请检查 AlmaLinux 项目网站Github 仓库.

这个条目是 44 在里面 CentOS Linux 迁移 系列。 继续阅读本系列的其余部分:

  1. CentOS Linux 8 将于 2021 年结束并将重点转移到 CentOS Stream
  2. 从 CentOS 8 迁移到 CentOS 流转换
  3. 如何从 CentOS 8 迁移到 Rocky Linux
  4. 从 CentOS 8 迁移到 AlmaLinux

[ad_2]

Related Posts