Show Table of Contents
9.3. CA 証明書の再生成と置き換え
サブスクリプションサービスに使用している CA 証明書の置き換えが必要になる場合があります。そのような時には、サブスクリプションサービスとして Subscription Asset Manager を使用しているすべてのシステムが新たな証明書を使用するように更新する必要があります。
これは、証明書ファイルを含む新たな RPM を生成し、これをクライアントシステムに配布することで実行できます。
- Subscription Asset Manager サーバー上で、クライアントにインストールする新たな証明書 RPM を生成します。これはすべて、単一行にする必要があります。各引数は、必要なオプションを示すために分割されています。
[root@sam-server ~]# /usr/share/katello/certs/gen-rpm.sh --name "candlepin-cert-consumer-$(hostname)" --version 1.4 --release 2 --packager None --vendor None --group 'Applications/System' --summary "Subscription-manager consumer certificate for Katello instance $(hostname)" --description 'Consumer certificate and post installation script that configures rhsm.' --requires subscription-manager --post /root/ssl-build/rhsm-katello-reconfigure /etc/rhsm/ca/candlepin-local.pem:644=/root/ssl-build/candlepin-cert.crt 2>>/var/log/katello/katello-configure/certificates.log && /sbin/restorecon ./*rpm
このスクリプトは、新規 Subscription Asset Manager 証明書ファイルを含む新しい RPM を生成し、その証明書をインストールするように RPM を設定し、各システム上の Red Hat Subscription Manager クライアントを適切に設定します。bash スクリプトの引数が RPM 設定を定義します。--name、--version、および--releaseは、name.version-release.rpm という形式で RPM の名前を設定します。--vendorと--packageは、RPM 情報に必要となりますが、値は何でも構いません。--groupは、RPM がインストールするアプリケーションまたはパッケージのタイプを指定します。--summaryと--descriptionは、RPM についての情報を設定します。--requiresは、この RPM がインストール可能となる前に利用可能またはインストールする必要があるパッケージを設定します。この RPM はローカルの Red Hat Subscription Manager クライアントを設定するので、subscription-managerパッケージが必要になります。--postは、RPM パッケージのインストール後に特定のコマンド、スクリプト、または複数のコマンドを実行します。このケースでは、ローカルの Red Hat Subscription Manager クライアントがサブスクリプションサービスとして指定された Subscription Asset Manager サーバーを使用するよう設定し、Red Hat Subscription Manager 設定ファイル内に必要な接続および証明書属性を設定します。
- サーバーマシンの
/var/www/html/pubディレクトリーにある既存の証明書 RPM を削除します。 - 新規に生成された RPM を
/var/www/html/pubディレクトリーにコピーし、HTTP でダウンロードできるようにします。 - 各 Subscription Asset Manager クライアントシステム上 で、新規 RPM をダウンロードしてインストールします。例を示します。
[root@server1 ~]# rpm -ivh http://SAM_server_hostname/pub/candlepin-cert-consumer-SAM_server_hostname.noarch.rpm

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.