Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

8.2. Red Hat Enterprise Linux 6에서 버전 7으로 ID 관리 마이그레이션

다음 절차에서는 Red Hat Enterprise Linux 6 Identity Management에서 Red Hat Enterprise Linux 7 서버로 모든 데이터 및 구성을 마이그레이션하는 방법을 설명합니다. 마이그레이션 절차에는 다음이 포함됩니다.
  • Red Hat Enterprise Linux 6 기반 인증 기관(CA) 마스터 서버를 Red Hat Enterprise Linux 7로 마이그레이션.
  • 모든 서비스를 새로운 Red Hat Enterprise Linux 7 서버로 전환. 이러한 서비스에는 CRL 및 인증서 생성, DNS 관리 또는 Kerberos KDC 관리가 포함됩니다.
  • 원래 Red Hat Enterprise Linux 6 CA 마스터 폐기.
다음 절차에서는 다음을 수행합니다.
  • rhel7.example.com 은 새 CA 마스터가 될 Red Hat Enterprise Linux 7 시스템입니다.
    중요
    현재 지원되는 유일한 마이너 버전은 RHEL 7.9입니다. 시스템에 RHEL 7.9가 설치되어 있는지 확인합니다.
  • rhel6.example.com 은 원래 Red Hat Enterprise Linux 6 CA 마스터입니다.
    참고
    마스터 CA 서버인 Red Hat Enterprise Linux 6 서버를 식별하려면 certmonger 서비스가 renew_ca_cert 명령을 추적하는 서버를 결정합니다. 모든 Red Hat Enterprise Linux 6 서버에서 다음 명령을 실행하십시오.
    [root@rhel6 ~]# getcert list -d /var/lib/pki-ca/alias -n "subsystemCert cert-pki-ca" | grep post-save
    post-save command: /usr/lib64/ipa/certmonger/renew_ca_cert "subsystemCert cert-pki-ca"
    renew_ca_cert 를 실행하는 후 저장 작업은 CA 마스터에 대해서만 정의됩니다.

8.2.1. Red Hat Enterprise Linux 6에서 7로 ID 관리를 마이그레이션하기 위한 필수 조건

  • rhel6.example.com 시스템을 최신 Red Hat Enterprise Linux 6 버전으로 업데이트합니다.
  • rhel6.example.com 시스템에서 ipa-* 패키지를 업그레이드합니다.
    [root@rhel6 ~]# yum update ipa-*
    또한 이 단계에서는 bind-dyndb-ldap 패키지의 2.3-6.el6_6 버전을 제공하는 RHBA-2015:0231-2 권고를 적용했으며 Red Hat Enterprise Linux 6.6 Extended Update Support (EUS)에서 사용할 수 있습니다.
    주의
    이전 버전의 bind-dyndb-ldap 를 사용하면 Red Hat Enterprise Linux 6.6 DNS 서버와 Red Hat Enterprise Linux 7 DNS 서버 간에 제공되는 DNS 전달 영역에서 일관되지 않은 동작이 발생합니다.
  • rhel7.example.com 시스템이 2.1절. “서버 설치 사전 요구 사항”4.3절. “복제본 설치 사전 요구 사항” 의 요구 사항을 충족하는지 확인합니다.
  • rhel7.example.com 시스템에서 필요한 패키지를 설치합니다. 2.2절. “IdM 서버 설치에 필요한 패키지” 참조하십시오.

8.2.2. Red Hat Enterprise Linux 6에서 ID 관리 스키마 업데이트

copy-schema-to-ca.py 스키마 업데이트 스크립트는 rhel7.example.com 복제본 설치를 위해 rhel6.example.com 을 준비합니다. ID 관리 버전 3.1 이상 버전 간의 스키마 변경으로 인해 스키마를 업데이트해야 합니다.
  1. rhel7.example.com 시스템에서 rhel6.example.com 시스템으로 copy-schema-to-ca.py 스키마 업데이트 스크립트를 복사합니다. 예를 들어 다음과 같습니다.
    [root@rhel7 ~]# scp /usr/share/ipa/copy-schema-to-ca.py root@rhel6:/root/
  2. rhel6.example.com 에서 업데이트된 copy-schema-to-ca.py 스크립트를 실행합니다.
    [root@rhel6 ~]# python copy-schema-to-ca.py
    ipa         : INFO     Installed /etc/dirsrv/slapd-PKI-IPA//schema/60kerberos.ldif
    [... output truncated ...]
    ipa         : INFO     Schema updated successfully
  3. Red Hat Enterprise Linux 7 복제본에 연결하기 전에 인증 기관을 실행하는 모든 Red Hat Enterprise Linux 6 IdM 복제본에서 단계를 반복합니다.

8.2.3. Red Hat Enterprise Linux 7 Replica 설치

  1. rhel6.example.com 시스템에서 rhel7.example.com 복제본을 설치하는 데 사용할 복제본 파일을 생성합니다. 예를 들어 IP 주소가 192.0.2.1rhel7.example.com 의 복제본 파일을 생성하려면 다음을 수행합니다.
    [root@rhel6 ~]# ipa-replica-prepare rhel7.example.com --ip-address 192.0.2.1
    
    Directory Manager (existing master) password:
    Preparing replica for rhel7.example.com from rhel6.example.com
    [... output truncated ...]
    The ipa-replica-prepare command was successful
  2. rhel6.example.com 의 복제본 정보 파일을 rhel7.example.com 에 복사합니다.
    [root@rhel6 ~]# scp /var/lib/ipa/replica-info-replica.example.com.gpg root@rhel7:/var/lib/ipa/
  3. Red Hat Enterprise Linux 7.6 이상에 통합 CA를 사용하여 새 복제본을 설치하는 경우 /etc/httpd/conf.d/nss.conf 파일의 NSSCipherSuite 매개변수 끝에 다음 항목을 추가합니다.
    +ecdhe_rsa_aes_128_sha,+ecdhe_rsa_aes_256_sha
    Red Hat Enterprise Linux 7.6 이상에서는 IdM CA에서 특정 암호가 더 이상 기본적으로 활성화되어 있지 않습니다. 이 항목을 구성에 추가하지 않고 Red Hat Enterprise Linux 7.6에서 통합된 CA가 있는 IdM 서버를 Red Hat Enterprise Linux 6에서 실행되는 마스터 복제본으로 설정하면 CRITICAL에 CA 인스턴스 오류를 설정하지 못했습니다.
  4. 복제본 파일을 사용하여 rhel7.example.com 복제본을 설치합니다. 예를 들어 다음 명령은 이러한 옵션을 사용합니다.
    • 인증서 시스템 구성 요소를 설정하려면 --setup-ca
    • 통합 DNS 서버를 구성하고 forwarder를 설정하려면 --setup-dns 및 --forwarder
    • --IP-address: rhel7.example.com 시스템의 IP 주소를 지정
    [root@rhel7 ~]# ipa-replica-install /var/lib/ipa/replica-info-rhel7.example.com.gpg --setup-ca --ip-address 192.0.2.1 --setup-dns --forwarder 192.0.2.20
    Directory Manager (existing master) password:
    
    Checking DNS forwarders, please wait ...
    Run connection check to master
    [... output truncated ...]
    Client configuration complete.
    또한 다음을 참조하십시오.
  5. Identity Management 서비스가 rhel7.example.com 에서 실행 중인지 확인합니다.
    [root@rhel7 ~]# ipactl status
    Directory Service: RUNNING
    [... output truncated ...]
    ipa: INFO: The ipactl command was successful

8.2.4. Red Hat Enterprise Linux 7 서버로 CA 서비스 전환

시작하기 전에:
  • rhel6.example.comrhel7.example.com CA가 모두 마스터 서버로 구성되어 있는지 확인합니다.
    [root@rhel7 ~]$ kinit admin
    [root@rhel7 ~]$ ipa-csreplica-manage list
    rhel6.example.com: master
    rhel7.example.com: master
    복제 연결에 대한 세부 정보를 표시하려면 다음을 수행합니다.
    [root@rhel7 ~]# ipa-csreplica-manage list --verbose rhel7.example.com
    rhel7.example.com
    last init status: None
    last init ended: 1970-01-01 00:00:00+00:00
    last update status: Error (0) Replica acquired successfully: Incremental update succeeded
    last update ended: 2017-02-13 13:55:13+00:00
rhel6.example.com 원래 마스터 CA에서 CA 하위 시스템 인증서 갱신을 중지합니다.
  1. 원래 CA 인증서에 대한 추적을 비활성화합니다.
    [root@rhel6 ~]# getcert stop-tracking -d /var/lib/pki-ca/alias -n "auditSigningCert cert-pki-ca"
    Request "20201127184547" removed.
    [root@rhel6 ~]# getcert stop-tracking -d /var/lib/pki-ca/alias -n "ocspSigningCert cert-pki-ca"
    Request "20201127184548" removed.
    [root@rhel6 ~]# getcert stop-tracking -d /var/lib/pki-ca/alias -n "subsystemCert cert-pki-ca"
    Request "20201127184549" removed.
    [root@rhel6 ~]# getcert stop-tracking -d /etc/httpd/alias -n ipaCert
    Request "20201127184550" removed.
  2. 새 마스터 CA에서 갱신된 인증서를 검색하도록 rhel6.example.com 을 재구성하십시오.
    1. 갱신 도우미 스크립트를 certmonger 서비스 디렉터리에 복사하고 적절한 권한을 설정합니다.
      [root@rhel6 ~]# cp /usr/share/ipa/ca_renewal /var/lib/certmonger/cas/
      [root@rhel6 ~]# chmod 0600 /var/lib/certmonger/cas/ca_renewal
    2. SELinux 구성을 업데이트합니다.
      [root@rhel6 ~]# restorecon /var/lib/certmonger/cas/ca_renewal
    3. certmonger 를 다시 시작합니다.
      [root@rhel6 ~]# service certmonger restart
    4. 인증서를 검색하도록 CA가 나열되었는지 확인합니다.
      [root@rhel6 ~]# getcert list-cas
      ...
      CA 'dogtag-ipa-retrieve-agent-submit':
              is-default: no
              ca-type: EXTERNAL
      	helper-location: /usr/libexec/certmonger/dogtag-ipa-retrieve-agent-submit
    5. CA 인증서 데이터베이스 PIN을 가져옵니다.
      [root@rhel6 ~]# grep internal= /var/lib/pki-ca/conf/password.conf
    6. 외부 갱신을 위한 인증서를 추적하도록 certmonger 를 구성합니다. 이를 위해서는 데이터베이스 PIN이 필요합니다.
      [root@rhel6 ~]# getcert start-tracking \
          -c dogtag-ipa-retrieve-agent-submit \
          -d /var/lib/pki-ca/alias \
          -n "auditSigningCert cert-pki-ca" \
          -B /usr/lib64/ipa/certmonger/stop_pkicad \
          -C '/usr/lib64/ipa/certmonger/restart_pkicad \
          "auditSigningCert cert-pki-ca"' \
          -T "auditSigningCert cert-pki-ca" \
          -P database_pin
      New tracking request "20201127184743" added.
      [root@rhel6 ~]# getcert start-tracking \
          -c dogtag-ipa-retrieve-agent-submit \
          -d /var/lib/pki-ca/alias \
          -n "ocspSigningCert cert-pki-ca" \
          -B /usr/lib64/ipa/certmonger/stop_pkicad \
          -C '/usr/lib64/ipa/certmonger/restart_pkicad \
          "ocspSigningCert cert-pki-ca"' \
          -T "ocspSigningCert cert-pki-ca" \
          -P database_pin
      New tracking request "20201127184744" added.
      [root@rhel6 ~]# getcert start-tracking \
          -c dogtag-ipa-retrieve-agent-submit \
          -d /var/lib/pki-ca/alias \
          -n "subsystemCert cert-pki-ca" \
          -B /usr/lib64/ipa/certmonger/stop_pkicad \
          -C '/usr/lib64/ipa/certmonger/restart_pkicad \
          "subsystemCert cert-pki-ca"' \
          -T "subsystemCert cert-pki-ca" \
          -P database_pin
      New tracking request "20201127184745" added.
      [root@rhel6 ~]# getcert start-tracking \
          -c dogtag-ipa-retrieve-agent-submit \
          -d /etc/httpd/alias \
          -n ipaCert \
          -C /usr/lib64/ipa/certmonger/restart_httpd \
          -T ipaCert \
          -p /etc/httpd/alias/pwdfile.txt
      New tracking request "20201127184746" added.
원래 rhel6.example.com CA 마스터에서 rhel7.example.com 으로 CRL 생성을 이동합니다.
  1. rhel6.example.com 에서 CRL 생성을 중지합니다.
    1. CA 서비스를 중지합니다.
      [root@rhel6 ~]# service pki-cad stop
    2. rhel6.example.com 에서 CRL 생성을 비활성화합니다. /var/lib/pki-ca/CS.cfg 파일을 열고 ca.crl.MasterCRL.enableCRL.enableCRL .enableCRL.enableCRLUpdates 매개변수 값을 false 로 설정합니다.
      ca.crl.MasterCRL.enableCRLCache=false
      ca.crl.MasterCRL.enableCRLUpdates=false
    3. CA 서비스를 시작합니다.
      [root@rhel6 ~]# service pki-cad start
  2. rhel6.example.com 에서 CRL 요청을 리디렉션하도록 Apache를 구성합니다.
    1. /etc/httpd/conf.d/ipa-pki-proxy.conf 파일을 열고 RewriteRule 항목의 주석을 삭제합니다.
      RewriteRule ^/ipa/crl/MasterCRL.bin https://rhel6.example.com/ca/ee/ca/getCRL?op=getCRL&crlIssuingPoint=MasterCRL [L,R=301,NC]
      참고
      URL에서 서버 호스트 이름을 대체하지 마십시오. URL은 로컬 호스트 이름을 참조해야 합니다.
    2. Apache를 다시 시작합니다.
      [root@rhel6 ~]# service httpd restart
    IdM은 로컬 파일 대신 로컬 CA에서 인증서 해지 목록(CRL)을 가져옵니다.
  3. rhel7.example.com 에서 rhel7.example.com 을 새 CA 마스터로 구성합니다.
    1. D.4.1절. “Which Server가 인증서 갱신을 처리하는 변경” 에 설명된 대로 CA 하위 시스템 인증서 갱신을 처리하도록 rhel7.example.com 을 구성합니다.
    2. 6.5.2.2절. “CRL을 생성하는 서버 변경” 에 설명된 대로 rhel7.example.com 을 일반 인증서 취소 목록(CRL)으로 구성합니다.

관련 정보

8.2.5. Red Hat Enterprise Linux 6 Server 중지

rhel6.example.com 에서 모든 서비스를 중지하여 새 rhel7.example.com 서버에 도메인 검색을 강제 수행합니다.
[root@rhel6 ~]# 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)을 통해 새 서버에 연결합니다.

8.2.6. 마스터 CA 서버를 마이그레이션한 후 다음 단계

토폴로지의 각 Red Hat Enterprise Linux 6 서버에 대해 다음을 수행합니다.
  1. rhel7.example.com 에서 복제본 파일을 생성합니다.
    참고
    Red Hat Enterprise Linux 6 서버에서 Red Hat Enterprise Linux 7 복제본을 설치한 후 Identity Management 도메인의 도메인 수준은 자동으로 0으로 설정됩니다.
    Red Hat Enterprise Linux 7.3은 복제본을 더 쉽게 설치 및 관리할 수 있는 방법을 도입했습니다. 이러한 기능을 사용하려면 토폴로지가 도메인 수준 1에 있어야 합니다. 7장. 도메인 수준 표시 및 승격 참조하십시오.
  2. 복제본 파일을 사용하여 다른 Red Hat Enterprise Linux 7 시스템에 새 복제본을 설치합니다.
Red Hat Enterprise Linux 6 서버를 해제하려면 다음을 수행합니다.
  • Red Hat Enterprise Linux 7 서버에서 제거 명령을 실행하여 토폴로지에서 서버를 제거합니다.
중요
클라이언트 구성은 자동으로 업데이트되지 않습니다. IDM 서버를 해제하고 다른 이름으로 새 서버를 구성한 경우 전체 클라이언트 구성을 검토해야 합니다. 특히 다음 파일을 수동으로 업데이트해야 합니다.
  • /etc/openldap/ldap.conf
  • /etc/ipa/default.conf
  • /etc/sssd/sssd.conf