1.6. 停止并退出 RHEL 7 服务器

  1. 确保所有数据(包括最新的更改)已从 rhel7.example.com 正确迁移到 rhel8.example.com。例如:

    1. rhel7.example.com 上添加一个新用户:

      [root@rhel7 ~]# ipa user-add random_user
      First name: random
      Last name: user
    2. 检查用户是否已复制到 rhel8.example.com:

      [root@rhel8 ~]# ipa user-find random_user
      --------------
      1 user matched
      --------------
        User login: random_user
        First name: random
        Last name: user
  2. 确保为 rhel8.example.com 分配了分布式数字分配(DNA)ID 范围。使用以下方法之一:

    • 通过创建另一个测试用户,直接在 rhel8.example.com 上激活 DNA 插件:

      [root@rhel8 ~]# ipa user-add another_random_user
      First name: another
      Last name: random_user
    • 将特定的 DNA ID 范围分配给 rhel8.example.com

      1. rhel7.example.com 上,显示 IdM ID 范围:

        [root@rhel7 ~]# ipa idrange-find
        ----------------
        3 ranges matched
        ----------------
          Range name: EXAMPLE.COM_id_range
          First Posix ID of the range: 196600000
          Number of IDs in the range: 200000
          First RID of the corresponding RID range: 1000
          First RID of the secondary RID range: 100000000
          Range type: local domain range
      2. rhel7.example.com 上,显示分配的 DNA ID 范围:

        [root@rhel7 ~]# ipa-replica-manage dnarange-show
        rhel7.example.com: 196600026-196799999
        rhel8.example.com: No range set
      3. 减少分配给 rhel7.example.com 的 DNA ID 范围,以便一部分对 rhel8.example.com 可用:

        [root@rhel7 ~]# ipa-replica-manage dnarange-set rhel7.example.com 196600026-196699999
      4. 将 IdM ID 范围的剩余部分分配给 rhel8.example.com

        [root@rhel7 ~]# ipa-replica-manage dnarange-set rhel8.example.com 196700000-196799999
  3. 停止 rhel7.example.com 上的所有 IdM 服务,以强制域发现新的 rhel8.example.com 服务器。

    [root@rhel7 ~]# ipactl stop
    Stopping CA Service
    Stopping pki-ca:                                           [  OK  ]
    Stopping HTTP Service
    Stopping httpd:                                            [  OK  ]
    Stopping MEMCACHE Service
    Stopping ipa_memcached:                                    [  OK  ]
    Stopping DNS Service
    Stopping named: .                                          [  OK  ]
    Stopping KPASSWD Service
    Stopping Kerberos 5 Admin Server:                          [  OK  ]
    Stopping KDC Service
    Stopping Kerberos 5 KDC:                                   [  OK  ]
    Stopping Directory Service
    Shutting down dirsrv:
        EXAMPLE-COM...                                         [  OK  ]
        PKI-IPA...                                             [  OK  ]

    之后,ipa 工具将通过远程过程调用(RPC)联系新的服务器。

  4. 通过在 RHEL 8 服务器上执行删除命令,从拓扑中删除 RHEL 7 服务器。详情请参阅 卸载 IdM 服务器