
1. 升级前准备1.1 创建系统快照或备份虚拟机创建快照。物理机备份系统盘及关键数据。1.2 检查磁盘空间df-h/boot /var /var/lib/leapp确保/boot可用空间 ≥ 1GB/var/lib/leapp可用空间 ≥ 5GB1.3 检查并清理挂载与认证配置mount|grep-Enfs|cifsgrep-Ewinbind|wins/etc/nsswitch.conf卸载所有 NFS/CIFS 挂载并清理/etc/fstab中相关条目。从/etc/nsswitch.conf中移除winbind和wins配置。1.4 确认 ISO 镜像使用 RHEL 8.10 完整 DVD ISO例如/u4/soft/rhel-8.10-x86_64-dvd.iso校验 ISO 完整性。1.5 记录当前系统状态cat/etc/redhat-releaseuname-arpm-qa/root/rpm-list-before-upgrade.txt systemctl list-units--typeservice/root/services-before-upgrade.txt2. 安装 Leapp 及相关依赖2.1 方法一上传离线 RPM 包安装unzippackages.zipunzippackages.zip-d/u5/bakcd/u5/bak yum localinstall *.rpm2.2 方法二使用 YUM 源安装cd/etc/yum.repos.d/mkdirbakmv*.repo bakwget-O/etc/yum.repos.d/redhat.repo http://10.167.192.112:8080/redhat/redhat7.9/redhat.repo yum makecache yum repolist all安装所需软件包yuminstall-yaudit yuminstall-yaudit-libs yuminstall-yaudit-libs-python yuminstall-ycheckpolicy yuminstall-ydnf yuminstall-ydnf-data yuminstall-yjson-glib yuminstall-yleapp yuminstall-yleapp-deps yuminstall-yleapp-upgrade-el7toel8 yuminstall-yleapp-upgrade-el7toel8-deps yuminstall-ylibcgroup yuminstall-ylibcomps yuminstall-ylibdnf yuminstall-ylibmodulemd yuminstall-ylibrepo yuminstall-ylibreport-filesystem yuminstall-ylibrhsm yuminstall-ylibsemanage-python yuminstall-ylibsolv yuminstall-ylibyaml yuminstall-ypciutils yuminstall-ypolicycoreutils yuminstall-ypolicycoreutils-python yuminstall-ypython-IPy yuminstall-ypython-chardet yuminstall-ypython-enum34 yuminstall-ypython-requests yuminstall-ypython-urllib3 yuminstall-ypython2-dnf yuminstall-ypython2-hawkey yuminstall-ypython2-leapp yuminstall-ypython2-libcomps yuminstall-ypython2-libdnf yuminstall-ysetools-libs查看安装历史yumhistory3. 预升级检查上传 RHEL 8.10 系统镜像文件至指定路径例如/u4/soft/rhel-8.10-x86_64-dvd.iso。执行预升级leapp preupgrade --no-rhsm--target8.10--iso/u4/soft/rhel-8.10-x86_64-dvd.iso查看报告cat/var/log/leapp/leapp-report.txt根据报告内容逐项处理直至无 Errors 和 Inhibitors。3.1 常见问题处理设置 answer 文件leapp answer--sectionremove_pam_pkcs11_module_check.confirmTrue移除冲突内核开发包yum-yremove kernel-devel-3.10.0-1160.119.1.el7卸载依赖模块modprobe-rpata_acpi modprobe-rfloppy4. 正式升级leapp upgrade --no-rhsm--target8.10--iso/u4/soft/rhel-8.10-x86_64-dvd.iso升级完成后重启reboot5. 升级后验证5.1 检查系统版本与内核cat/etc/redhat-releaseuname-runame-a预期输出示例Red Hat Enterprise Linux release 8.10 (Ootpa) 4.18.0-553.el8_10.x86_645.2 检查残留 el7 软件包rpm-qa|grep-Eel7[.-]5.3 检查 SELinux 状态getenforce sestatus如为 permissive确认业务正常后恢复 enforcing。5.4 检查失败服务systemctl list-units--failedjournalctl-b-perr5.5 验证关键业务网络、存储、数据库、中间件、认证、定时任务、监控 Agent 等。5.6 重新注册订阅如需若后续需要在线更新重新注册 RHEL 8 订阅。6. 升级后系统状态参考升级前[rootrhel7t1 ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.9 (Maipo) [rootrhel7t1 ~]# uname -r 3.10.0-1160.119.1.el7.x86_64 [rootrhel7t1 ~]# uname -a Linux rhel7t1 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue May 14 11:55:25 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux升级后[rootrhel7t1 ~]# cat /etc/redhat-release Red Hat Enterprise Linux release 8.10 (Ootpa) [rootrhel7t1 ~]# uname -r 4.18.0-553.el8_10.x86_64 [rootrhel7t1 ~]# uname -a Linux rhel7t1 4.18.0-553.el8_10.x86_64 #1 SMP Fri May 10 15:19:13 EDT 2024 x86_64 x86_64 x86_64 GNU/Linux