一、更新现有centos7系统
[root@bogon ~]# yum update -y [root@bogon ~]# yum upgrade -y
二、安装Elevate
[root@bogon ~]# yum install -y https://repo.almalinux.org/elevate/elevate-release-latest-el7.noarch.rpm [root@bogon ~]# rpm -qa|grep elevate elevate-release-1.0-1.el7.noarch [root@bogon ~]#
三、安装leapp和leapp-data
[root@bogon ~]# yum install -y leapp-upgrade leapp-data-rocky [root@bogon ~]# rpm -qa|grep leapp leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.1.noarch python2-leapp-0.14.0-1.el7.noarch leapp-0.14.0-1.el7.noarch leapp-data-rocky-0.1-6.el7.noarch leapp-deps-0.14.0-1.el7.noarch leapp-upgrade-el7toel8-deps-0.16.0-6.el7.elevate.1.noarch
四、开始预升级
[root@bogon ~]# leapp preupgrade ============================================================ UPGRADE INHIBITED ============================================================ Upgrade has been inhibited due to the following problems: 1. Inhibitor: Newest installed kernel not in use 2. Inhibitor: Use of NFS detected. Upgrade can't proceed 3. Inhibitor: Possible problems with remote login using root account 4. Inhibitor: Missing required answers in the answer file Consult the pre-upgrade report for details and possible remediation. ============================================================ UPGRADE INHIBITED ============================================================ Debug output written to /var/log/leapp/leapp-preupgrade.log ============================================================ REPORT ============================================================ A report has been generated at /var/log/leapp/leapp-report.json A report has been generated at /var/log/leapp/leapp-report.txt ============================================================ END OF REPORT ============================================================
查看具体需要修复的信息
[root@bogon ~]# vim /var/log/leapp/leapp-report.txt
根据提示信息,进行修复
[root@bogon ~]# rpm -e nfs-utils-1.3.0-0.68.el7.2.x86_64 --nodeps [root@bogon ~]# leapp answer --section remove_pam_pkcs11_module_check.confirm=True
[root@bogon ~]# sed -i "s/#PermitRootLogin yes/PermitRootLogin yes/g" /etc/ssh/sshd_config
重启服务器reboot后,再次运行预升级
[root@bogon ~]# leapp preupgrade Total size: 720 M Total download size: 609 M Downloading Packages: Check completed. ====> * local_repos_inhibit Inhibits the upgrade if local repositories were found. ====> * tmp_actor_to_satisfy_sanity_checks The actor does NOTHING but satisfy static sanity checks ====> * report_set_target_release Reports information related to the release set in the subscription-manager after the upgrade. ====> * check_initramfs_tasks Inhibit the upgrade if conflicting "initramfs" tasks are detected ==> Processing phase `Reports` ====> * verify_check_results Check all dialogs and notify that user needs to make some choices. ====> * verify_check_results Check all generated results messages and notify user about them. Debug output written to /var/log/leapp/leapp-preupgrade.log ============================================================ REPORT ============================================================ A report has been generated at /var/log/leapp/leapp-report.json A report has been generated at /var/log/leapp/leapp-report.txt ============================================================ END OF REPORT ============================================================
没有提示需要修复的问题,可以升级了