Show Table of Contents
8.7.3. レポーティングの設定
- 「強化レポーティングのインストールと設定」 にある追加パッケージを使用して、「Subscription Asset Manager の基本的なインストールと設定」 の手順に従って Subscription Asset Manager をインストールします。
- ホストシステムを登録します。
--autoattachオプションを使用して、オペレーティングシステムに必要なサブスクリプションを直ちにアタッチします。[root@server ~]# subscription-manager register --autoattach Username: jsmith@example.com Password:
- 更新したコンテンツリポジトリーをシステム設定に追加するには数分かかります。
[rhel-6-server-sam-rpms]リポジトリーを有効にします。[root@server ~]# yum-config-manager --enable rhel-6-server-sam-rpms Loaded plugins: product-id, refresh-packagekit ========================= repo: rhel-6-server-sam-rpms ========================= [rhel-6-server-sam-rpms] bandwidth = 0 base_persistdir = /var/lib/yum/repos/x86_64/6Server baseurl = https://cdn.redhat.com/content/dist/rhel/server/6/6Server/x86_64/subscription-asset-manager/1/os cache = 0 cachedir = /var/cache/yum/x86_64/6Server/rhel-6-server-sam-rpms cost = 1000 enabled = 1 enablegroups = True exclude = failovermethod = priority ...
yum installを使用してkatello-headpin-allパッケージをインストールします。[root@server ~]# yum install -y katello-headpin-all splice ruby193-rubygem-splice_reports spacewalk-splice-tool
--enhanced_reportingオプションを使うと、ISO イメージからインストールする方法でも (「ISO イメージを使ったインストール」) これが実行できます。[root@server cdrom]# ./install_packages --enhanced_reporting
- レポーティングのデータベースは MongoDB データベースです。自動的に起動するようにシステム上で Mongo サービスを設定し、続いてサービスを起動します。
[root@sam-server ~]# chkconfig mongod on [root@sam-server ~]# service mongod start
- 設定スクリプトを実行し、Subscription Asset Manager サーバー、デフォルトの管理者ユーザー、および最初の組織を設定します。
[root@server ~]# katello-configure --deployment=sam --org=Example_Org --user-name=samadmin --user-pass=secret
Subscription Asset Manager 管理者ユーザーは、Satellite 5.6 管理者ユーザーとは別のユーザーになります。 - Subscription Asset Manager マシン上で、Satellite 5.6 マシンへの認証に使用する SSH キーを作成します。
[root@sam-server ~]# su - splice -s /bin/sh -c 'ssh-keygen -t rsa -f /var/lib/splice/id_rsa-sat -N ""' Generating public/private rsa key pair. Your identification has been saved in /var/lib/splice/id_rsa-sat. Your public key has been saved in /var/lib/splice/id_rsa-sat.pub. The key fingerprint is: 78:fa:c9:68:71:a2:a7:c1:ec:35:e3:43:ce:27:b7:d8 splice@dhcp129-162.rdu.redhat.com The key's randomart image is: +--[ RSA 1024]----+ | | | | | | | . | | . S | | o +o. | | +==+ | | ..+BOo. | | o++=E. | +-----------------+
- Satellite 5.6 マシンへ切り替えます。
- 必須の Satellite レポートを実行して Subscription Asset Manager サーバーに送信ができる、新規ユーザーを作成します。
[root@sat-server ~]# useradd swreport
- Subscription Asset Manager マシン上で作成されたキーファイルを、Satellite 5.6 マシン上の
swreportユーザー向けにauthorized_keysファイルに追加します。command=オプションにより、swreportユーザーは、システム上で Satellite レポートのみを実行するよう限定されます。[root@sat-server ~]# vim /home/swreport/.ssh/authorized_keys command="/usr/bin/spacewalk-report $SSH_ORIGINAL_COMMAND" \ ssh-rsa key_hash swreport@sat-server
commandディレクティブは、キーファイル内で 1 行にします。 .sshディレクトリーおよびauthorized_keysファイルで、適切なパーミッションを設定します。[root@sat-server ~]# chown -R swreport:swreport /home/swreport/.ssh [root@sat-server ~]# chmod 700 /home/swreport/.ssh [root@sat-server ~]# chmod 600 /home/swreport/.ssh/authorized_keys
- データベースに接続できるように、
swreportsユーザーをapacheシステムグループに追加します。[root@sat-server ~]# gpasswd -a swreport apache
- Subscription Asset Manager マシンに戻ります。
- レポーティングサービスユーザー (
splice) に切り替え、ユーザーがswreportキーを使用して Satellite マシンに SSH 接続できるかテストします。[root@sam-server ~]# su - splice -s /bin/bash [splice@sam-server ~]$ ssh -i /var/lib/splice/id_rsa-sat swreport@sat-server.example.com splice-export
プロンプトが表示されたら、キーフィンガープリントを了承します。 - Satellite 5.6 サーバーを認識するように、レポーティング設定を編集します。
[root@sam-server ~]# vim /etc/splice/checkin.conf [spacewalk] host=sat-server.example.com ssh_key_path=/var/lib/splice/id_rsa-sat login=swreport
- Subscription Asset Manager のセットアップ時に設定された Subscription Asset Manager 管理者パスワードを使用するよう、レポーティング設定を編集します。
admin-pass=secret
- Subscription Asset Manager サーバー上で、Satellite 5.6 のデータを Subscription Asset Manager のデータベースに取り込むよう、同期ユーティリティーを実行します。
[root@sam-server ~]# su - splice -s /bin/bash [splice@sam-server ~]$ spacewalk-splice-checkin
注記
初回の同期操作は、長時間かかる場合があります。ツールのパフォーマンスを改善するには、spacewalk-splice-toolプロセスで使用するスレッド数を設定します。使用頻度の少ないシステムでは、コア数 2 つに対してスレッド 1 つ、使用頻度の多いシステムでは、コア数 3 つに対してスレッド 1 つにします。以下に例を示します。[root@sam-server]# /etc/splice/checkin.conf num-threads=3
- カスタマーポータルから Satellite 5.6 マニフェストを取得します。
- カスタマーポータルにログインします。
- サブスクリプション タブを展開し、サブスクリプション管理 > サブスクリプション管理アプリケーション を選択します。

- Satellite タブを開きます。
- ポータルエントリーが存在していない場合は、Satellite 5.6 エントリーを作成し、必要なサブスクリプションをアタッチします。
- Satellite タブで Satellite の登録 リンクをクリックします。

- Satellite 5.6 インスタンスについて以下の必要な情報を入力します。
- Satellite サーバーエントリーの名前
- Satellite インスタンスのバージョン。5.6 になります。

- 登録 ボタンをクリックします。
- Satellite 5.6 サーバーの サブスクリプション タブで、追加するサブスクリプションを 利用可能なサブスクリプション エリアから選択します。
選択した製品ごとに適切なサブスクリプション数を設定してください。数量は、子組織が利用できる、そのタイプのサブスクリプションの合計数です。 - 下にスクロールして、ウィンドウ下部にある をクリックします。サブスクリプションをアタッチすると、自動的に子組織のマニフェストが更新されます。
- Satellite 5.6 サーバーのエントリーページで、 ボタンをクリックし、アーカイブファイルを保存します。

- Satellite の管理者として Subscription Asset Manager UI (
https://sam-hostname/sam) にログインし、適切な Satellite 5.6 の組織に切り替えます。 - サブスクリプション > サブスクリプション タブを開き、マニフェストのインポート リンクをクリックします。

- インポートタブの中央にある参照をクリックし、保存したマニフェストファイルへ移動します。
- ボタンをクリックします。

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.