Show Table of Contents
8.2. Red Hat Enterprise Linux 6 からバージョン 7 への Identity Management の移行
本セクションでは、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 システムです。rhel6.example.comは、元の Red Hat Enterprise Linux 6 CA マスターです。注記
どの Red Hat Enterprise Linux 6 サーバーがマスター CA サーバーかを特定するには、どのサーバー上で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-savepost-save command: /usr/lib64/ipa/certmonger/renew_ca_cert "subsystemCert cert-pki-ca"renew_ca_certを実行する post-save アクションは、CA マスターにのみ定義されています。
8.2.1. Identity Management の Red Hat Enterprise Linux 6 から 7 への移行の前提条件
rhel6.example.comシステムを Red Hat Enterprise Linux 6 の最新バージョンに更新します。rhel6.example.comシステムで、ipa-* パッケージをアップグレードします。[root@rhel6 ~]#
yum update ipa-*このステップにより、RHBA-2015:0231-2 アドバイザリーの適用も確認されます。これは、bind-dyndb-ldap パッケージの2.3-6.el6_6バージョンを提供するもので、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システムに必要なパッケージをインストールしてください。詳細は、「IdM サーバーのインストールに必要なパッケージ」 を参照してください。
8.2.2. Red Hat Enterprise Linux 6 上での Identity Management スキーマの更新
copy-schema-to-ca.py スキーマ更新スクリプトにより、rhel6.example.com での rhel7.example.com レプリカインストールを準備することができます。スキーマの更新は、Identity Management のバージョン 3.1 とそれ以降の間におけるスキーマの変更により必要となります。
copy-schema-to-ca.pyスキーマ更新スクリプトをrhel7.example.comシステムからrhel6.example.comシステムにコピーします。[root@rhel7 ~]#
scp /usr/share/ipa/copy-schema-to-ca.py root@rhel6:/root/- 更新された
copy-schema-to-ca.pyスクリプトをrhel6.example.com上で実行します。[root@rhel6 ~]#
python copy-schema-to-ca.pyipa : INFO Installed /etc/dirsrv/slapd-PKI-IPA//schema/60kerberos.ldif [... output truncated ...] ipa : INFO Schema updated successfully
8.2.3. Red Hat Enterprise Linux 7 レプリカのインストール
rhel6.example.comシステム上で、rhel7.example.comレプリカのインストールに使用するレプリカファイルを作成します。たとえば、rhel7.example.com用のレプリカファイルを作成します。このシステムの IP アドレスは192.0.2.1とします。[root@rhel6 ~]#
ipa-replica-prepare rhel7.example.com --ip-address 192.0.2.1Directory Manager (existing master) password: Preparing replica for rhel7.example.com from rhel6.example.com [... output truncated ...] The ipa-replica-prepare command was successful「レプリカ情報ファイル」 と 「レプリカの作成」 も参照してください。- レプリカ情報ファイルを
rhel6.example.comからrhel7.example.comにコピーします。[root@rhel6 ~]#
scp /var/lib/ipa/replica-info-replica.example.com.gpg root@rhel7:/var/lib/ipa/ - レプリカファイルを使用して
rhel7.example.comレプリカをインストールします。たとえば、この例では以下のオプションを使用しています。--setup-caは、Certificate System コンポーネントを設定します。--setup-dnsと--forwarderは、統合 DNS サーバーとフォワーダーを設定します。--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.20Directory Manager (existing master) password: Checking DNS forwarders, please wait ... Run connection check to master [... output truncated ...] Client configuration complete.関連項目:- 「レプリカの作成」 では、レプリカ情報ファイルを使用したレプリカ作成について説明しています。
- Identity Management サービスが
rhel7.example.comで稼働していることを確認します。[root@rhel7 ~]#
ipactl statusDirectory Service: RUNNING [... output truncated ...] ipa: INFO: The ipactl command was successful
8.2.4. CA サービスの Red Hat Enterprise Linux 7 サーバーへの移行
作業開始前に、以下を実行してください。
rhel6.example.comとrhel7.example.comの両方の CA がマスターサーバーとして設定されていることを確認します。[root@rhel7 ~]$
kinit admin[root@rhel7 ~]$ipa-csreplica-manage listrhel6.example.com: master rhel7.example.com: masterレプリカ合意の詳細を表示するには、以下を実行します。[root@rhel7 ~]#
ipa-csreplica-manage list --verbose rhel7.example.comrhel7.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 サブシステムの証明書更新を停止します。
- 元の CA 証明書の追跡を無効にします。
[root@rhel6 ~]#
getcert stop-tracking -d /var/lib/pki-ca/alias -n "auditSigningCert cert-pki-ca"Request "20171127184547" removed. [root@rhel6 ~]#getcert stop-tracking -d /var/lib/pki-ca/alias -n "ocspSigningCert cert-pki-ca"Request "20171127184548" removed. [root@rhel6 ~]#getcert stop-tracking -d /var/lib/pki-ca/alias -n "subsystemCert cert-pki-ca"Request "20171127184549" removed. [root@rhel6 ~]#getcert stop-tracking -d /etc/httpd/alias -n ipaCertRequest "20171127184550" removed. rhel6.example.comを再設定して、新規マスター CA から更新された証明書を取得します。certmongerサービスディレクトリーに更新ヘルパースクリプトをコピーに、適切なパーミッションを設定します。[root@rhel6 ~]#
cp /usr/share/ipa/ca_renewal /var/lib/certmonger/cas/[root@rhel6 ~]#chmod 0600 /var/lib/certmonger/cas/ca_renewal- SELinux 設定を更新します。
[root@rhel6 ~]#
restorecon /var/lib/certmonger/cas/ca_renewal certmongerを再起動します。[root@rhel6 ~]#
service certmonger restart- 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 - CA 証明書データベース PIN を取得します。
[root@rhel6 ~]#
grep internal= /var/lib/pki-ca/conf/password.conf 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_pinNew tracking request "20171127184743" 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_pinNew tracking request "20171127184744" 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_pinNew tracking request "20171127184745" 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.txtNew tracking request "20171127184746" added.
CRL 生成を元の
rhel6.example.com CA マスターから rhel7.example.com に移動します。
rhel6.example.comで CRL 生成を停止します。- CA サービスを停止します。
[root@rhel6 ~]#
service pki-cad stop rhel6.example.com上での CRL 生成を無効にします。/var/lib/pki-ca/conf/CS.cfgファイルを開いて、ca.crl.MasterCRL.enableCRLCacheおよびca.crl.MasterCRL.enableCRLUpdatesのパラメーターの値をfalseに設定します。ca.crl.MasterCRL.enableCRLCache=
falseca.crl.MasterCRL.enableCRLUpdates=false- CA サービスを起動します。
[root@rhel6 ~]#
service pki-cad start
rhel6.example.comで、Apache が CRL リクエストを新しいマスターであるrhel7.example.comにリダイレクトするよう設定します。/etc/httpd/conf.d/ipa-pki-proxy.confファイルを開き、RewriteRule引数のコメントを解除します。サーバーホスト名をサーバー URL にあるrhel7.example.comホスト名で置き換えます。RewriteRule ^/ipa/crl/MasterCRL.bin https://rhel7.example.com/ca/ee/ca/getCRL?op=getCRL&crlIssuingPoint=MasterCRL [L,R=301,NC]
- Apache を再起動します。
[root@rhel6 ~]#
service httpd restart
rhel7.example.comでrhel7.example.comを新規 CA マスターとして設定します。- 「証明書更新を処理するサーバーの変更」 にあるように、
rhel7.example.comが CA サブシステムの証明書更新を処理するように設定します。 - 「サーバーが CRL を生成するように設定する」 にあるように、
rhel7.example.comが証明書失効リスト (CRL) を生成するように設定します。
関連情報
- CA サブシステム証明書更新および CRL についての詳細は、「レプリカのマスター CA サーバーへのプロモート」 を参照してください。
8.2.5. Red Hat Enterprise Linux 6 サーバーの停止
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 ユーティリティーを使用すると、 Remote Procedure Call (RPC) で新規サーバーに接続します。
8.2.6. マスター CA サーバー移行後のステップ
トポロジー内の各 Red Hat Enterprise Linux 6 サーバーで以下を実行します。
rhel7.example.comからレプリカファイルを作成します。注記
Red Hat Enterprise Linux 6 サーバーから Red Hat Enterprise Linux 7 レプリカをインストールした後は、Identity Management ドメインのドメインレベルは自動的に 0 に設定されます。Red Hat Enterprise Linux 7.3 では、レプリカを容易にインストール、管理する方法が導入されています。これらの機能を使用するには、トポロジーのドメインレベルが 1 である必要があります。詳細は 7章ドメインレベルの表示と引き上げ を参照してください。- レプリカファイルを使用して別の Red Hat Enterprise Linux 7 システムに新規レプリカをインストールします。
4章Identity Management のレプリカのインストールとアンインストール を参照してください。
Red Hat Enterprise Linux 6 サーバーの使用を停止するには、
- Red Hat Enterprise Linux 7 サーバー上で削除コマンドを実行して、トポロジーからサーバーを削除します。
「IdM サーバーのアンインストール」 を参照してください。

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.