Red Hat Training

A Red Hat training course is available for Red Hat Satellite

3.2. シナリオ 2: 管理データベースを使用する Satellite のインストール

このシナリオでは、管理データベースのインストールの手順を説明します。管理データベースのインストールを使用すると、Satellite サーバーから切り離されたデータベースがあるフェデレーションの Red Hat Satellite インフラストラクチャーが作成されます。また、管理データベースには、データベースを維持するための基本的な Satellite 管理ツールも含まれます。
このシナリオでは、オペレーティングシステムとして Red Hat Enterprise Linux 6 がインストールされている以下の 2 台のホストが必要です。
  • Satellite Server 用のホスト
  • 管理データベース用のホスト
Satellite 5.8 インストールプログラムは、Satellite ホストと管理 DB ホストの両方で実行する必要があります。管理 DB ホストでは、インストールプログラムにより Satellite データベースの前提条件となるアプリケーションがインストールされます。Satellite ホストでは、Satellite アプリケーションがインストールされ、Satellite データベースを作成するために管理 DB ホストに接続されます。管理 DB は最初にインストールし、Satellite ホストのインストール中に利用可能である必要があります。

3.2.1. インストールメディアのダウンロード

Satellite 5.8 のインストールメディアは、Red Hat カスタマーポータルから ISO 形式でダウンロードできます。 

手順3.7 インストールメディアのダウンロード

  1. カスタマーポータルにログインします。
  2. Downloads (ダウンロード) をクリックします。
  3. Red Hat Satellite をクリックします。
  4. バージョン ドロップダウンリストから 5.8 for RHEL 6 を選択します。
  5. アーキテクチャー の一覧で x86_64 または s390x を選択します。
  6. Red Hat Satellite 5.8 Binary DVD をダウンロードします。
  7. 使用するインストールソースに応じて、DVD ISO イメージを Satellite ホストにコピーするか、DVD メディアに書き込みます。
    1. ISO イメージをマウントし、そこからインストールプログラムを実行する場合は、ISO イメージを Satellite ホストと管理 DB ホストの両方にコピーします。
      # scp satellite.iso root@satellite_hostname:/root
      # scp satellite.iso root@manageddb_hostname:/root
      
    2. DVD をマウントし、そこからインストールプログラムを実行する場合は、DVD ISO イメージを DVD メディアに書き込みます。

3.2.2. インストールメディアのマウント

ディスクまたは ISO イメージを Satellite ホストおよび管理 DB ホストにマウントします。

手順3.8 ディスクからのマウント

  1. root でマシンにログインします。
  2. インストールファイルを含む Red Hat Satellite Server の CD または DVD を挿入します。
  3. Red Hat Enterprise Linux が自動でディスクをマウントする場合があります。この場合、ディスクは /media/cdrom/ ディレクトリーにマウントされます。自動マウントが行われない場合は、次のコマンドを使って手作業で /media/cdrom/ ディレクトリーにマウントします。
    # mkdir /media/cdrom
    # mount /dev/cdrom /media/cdrom
    

手順3.9 ISO イメージからのマウント

  1. root でホストにログインします。
  2. ユーザーのファイルシステム上の場所に ISO イメージをマウントします。
    # mkdir /media/cdrom
    # mount -o loop iso_filename /media/cdrom
    
インストールメディアは /media/cdrom/ にマウントされます。Red Hat Satellite インストールプログラムにアクセスする場合は、この場所を使用します。

3.2.3. マニフェストの生成

In previous versions of Red Hat Satellite 5, details of product subscriptions and content repositories were contained in a Satellite Certificate. You downloaded the certificate from the Red Hat Customer Portal and imported it into Satellite. From Satellite 5.8, all content and subscriptions are hosted by the Red Hat Content Delivery Network (CDN), replacing Red Hat Network.
The Red Hat Customer Portal enables you to group subscriptions into multiple subscription allocations. The Red Hat CDN uses a Subscription Manifest, instead of the certificate. A Subscription Manifest is an exported file that lists the subscriptions in one subscription allocation.

注記

If you are installing multiple instances of Satellite 5.8, ensure you divide the available subscriptions amongst the individual subscription allocations. For example, if you intend running two instances of Satellite 5.8, you might divide the subscriptions equally between the two subscription allocations.

手順3.10 新しい Satellite 5.8 マニフェストの生成

  1. Log on to the Customer Portal and navigate to Subscriptions in the upper-left corner.
  2. Navigate to Subscription Allocations.
  3. Click New subscription allocation.
  4. Enter a name in the Name field, select Satellite 5.8 from the Type drop-down list, and click Create.
  5. Navigate to the Subscription tab and click Add subscriptions.
  6. For each product to be attached to the manifest, specify the desired quantity in the Entitlements field, and click Submit. It may take several minutes for the subscriptions to be attached.
  7. Click Export Manifest and save the manifest file locally.
  8. カスタマーポータルからログアウトします。
  9. マニフェストファイルがダウンロードされたホストのシェルプロンプトにアクセスします。
    Satellite ホストにマニフェストファイルをコピーします。以下の例では、ファイルは /root ディレクトリーにコピーされます。
    # scp manifest_file.zip root@satellite.example.com:/root
    

3.2.4. HTTP プロキシーの内側でのインストール: 事前設定 (オプション)

注記

  • 本セクションは、HTTP プロキシーの内側にあるネットワークにのみ適用されます。
  • Satellite は HTTP アクセス認証方法としての NTLM をサポートしません。Basic アクセス認証および Digest アクセス認証方法がサポートされます。
Red Hat Enterprise Linux ホストの登録では、そのホストと Red Hat コンテンツ配信ネットワーク間の通信が必要です。これらの間に HTTP プロキシーがある場合は、サブスクリプションマネージャーでプロキシーサーバーの詳細と認証情報を設定する必要があります。これらの変更は Satellite ホストと管理 DB ホストの両方に適用されます。
設定ファイル /etc/rhsm/rhsm.conf を編集し、HTTP プロキシーの詳細と認証情報を追加して以下の行を編集します。
proxy_hostname = proxy_hostname
proxy_port = proxy_port
proxy_user = proxy_user
proxy_password = proxy_password

3.2.5. Red Hat コンテンツ配信ネットワークでのホストの登録

Red Hat コンテンツ配信ネットワークにホストを登録すると、ホストはサブスクリプションで利用可能なコンテンツを使用できます。これには、Red Hat Enterprise Linux、Red Hat Software Collection (RHSCL) および Red Hat Satellite などのコンテンツが含まれます。

注記

この手順は Satellite ホストと管理 DB ホストの両方で実行してください。
システムを Red Hat コンテンツ配信ネットワークに登録します。プロンプトが表示されたら、カスタマーポータルのユーザー名とパスワードを入力します。
# subscription-manager register
このコマンドを実行すると、以下のような出力が表示されます。
The system has been registered with ID: 541084ff2-44cab-4eb1-9fa1-7683431bcf9a

3.2.6. Satellite リポジトリーのアクティベート

Red Hat Satellite 5.8 のインストールでは、特定のリポジトリーを有効にする必要があります。利用可能なリポジトリーの一覧は、ホストに割り当てられたサブスクリプションによって決まります。以下の手順は、必要なサブスクリプションを特定し、割り当てる方法と、どのリポジトリーを有効にする必要があるかを示しています。

注記

この手順は Satellite ホストと管理 DB ホストの両方で実行してください。

手順3.11 Satellite リポジトリーのアクティベート

  1. 利用可能なすべてのサブスクリプションを一覧表示し、Red Hat Satellite 5 サブスクリプションを特定します。
    利用可能なサブスクリプションの一覧は長くなることがありますが、lessmore などのページャーユーティリティーに出力をパイプすると、出力を一度に 1 画面ずつ表示できます。
    # subscription-manager list --all --available | less
    
    Pool ID は、サブスクリプションの割り当てに必要であるため、メモしてください。
  2. サブスクリプションをホストに割り当てます。
    # subscription-manager attach --pool=pool_id
    出力は以下のようになります。
    		Successfully attached a subscription for: Red Hat Satellite
    
  3. すべてのリポジトリーを無効にします。
    # subscription-manager repos --disable "*"
    
  4. Red Hat Enterprise Linux 6 リポジトリーを有効にします。Red Hat Satellite 5.8 リポジトリーはインストールプログラムで自動的に有効にされます。
    ⁠AMD64 と Intel 64 の場合
    # subscription-manager repos --enable=rhel-6-server-rpms
    
    IBM System z の場合
    # subscription-manager repos --enable=rhel-6-for-system-z-rpms
    

3.2.7. 管理データベースのインストール

管理データベースコンポーネントは、データベースサーバーと Red Hat Satellite ツールを含む必須パッケージを Red Hat Satellite サーバーから離れたホストにインストールします。

注記

Red Hat Satellite のインストールに使用されたメディアと同一のものが 管理データベース のインストールにも使われます。

手順3.12 管理データベースのインストール

  1. root ユーザーで 管理データベース を使用するホストにログインします。
  2. Satellite インストールプログラムを含むディレクトリーに移動します。
    # cd /media/cdrom
    
  3. --managed-db オプションを使用してインストールプログラムを実行します。
    # ./install.pl --managed-db
    
  4. インストールプログラムにより、以下の情報が求められます。
    • データベース名
    • データベースのユーザー
    • データベースのパスワード
    • リッスンするローカルアドレスのコンマ区切りのリスト。すべてのアドレスを空白のままにしておきます。
    • アドレス/ネットマスク形式でのリモートアドレスのコンマ区切りリスト。管理データベース はこれらのアドレスからの接続を許可します。
    Database name: mydb
    Database user: mydbuser
    Database password:  mydbpassword
    Local addresses to listen on (comma-separated, RETURN for all): 127.0.0.1
    Remote addresses to allow connection from (address/netmask format, comma-separated): 192.168.1.10/32
    Initializing database:                                     [  OK  ]
    Starting postgresql service:                               [  OK  ]
    
インストールプログラムにより、管理データベースに必要なパッケージがインストールされます。これには、データベース用の一連の管理ツールが含まれます。また、データベースの準備や PostgreSQL サービスの起動が実行されます。
管理データベースのホストはインストール時に Red Hat コンテンツ配信ネットワークに登録されます。Red Hat Satellite 5.8 がインストールされ、設定されると、管理データベースホストを Satellite に登録できます。このオプションには、管理データベースホストの基礎となる Red Hat Enterprise Linux 6 インスタンスを Satellite から管理できるという利点があります。前提条件として、まず Satellite で Red Hat Satellite 管理データベースの子チャンネルの同期を実行する必要があります。システムの Satellite への登録およびチャンネルのサブスクライブについての詳細は、Red Hat Satellite 5.8 の『『スタートガイド』』を参照してください。

3.2.8. Satellite のインストール

以下の手順では、管理データベースを使用した Red Hat Satellite のインストールを実行します。必ず root ユーザーで実行してください。

警告

インストールスクリプトにより、カーネルを含む利用可能なすべてのパッケージアップデートがインストールされます。

手順3.13 インストールスクリプトの実行

  1. /media/cdrom/ ディレクトリーからインストールスクリプトを実行します。
    # ./install.pl --external-postgresql
    
    インストールプログラムはまず 2章要件 に記載された要件が満たされていることを確認します。
    * Starting the Red Hat Satellite installer.
    * Performing pre-install checks.
    * Pre-install checks complete.  Beginning installation.
    
  2. このスクリプトにより、ホストが Red Hat サブスクリプションマネージャーに登録され (まだ登録されていない場合)、必要なパッケージすべてがインストールおよび更新され、管理データベースホスト上のデータベースにデータが設定力されます。
    * RHSM Registration.
    ** Registration: System is already registered with RHSM.  Not re-registering.
    * RHSM Subscriptions.
    ** Subscriptions: Subscription providing 'Red Hat Satellite' already attached.
    ** Subscriptions: Subscription providing 'Red Hat Enterprise Linux Server' already attached.
    ** Subscriptions: Disabling all RHSM repositories (rhel-6-server-rpms).
    ** Subscriptions: All repositories disabled.
    ** Subscriptions: Enabling RHEL repository.
    ** Subscriptions: RHEL repository enabled.
    * Checking for uninstalled prerequisites.
    ** Checking if yum is available ...
    There are some packages from Red Hat Enterprise Linux that are not part
    of the @base group that Satellite will require to be installed on this
    system. The installer will try resolve the dependencies automatically.
    However, you may want to install these prerequisites manually.
    Do you want the installer to resolve dependencies [y/N]? y
    * Installing Satellite packages.
    Warning: yum did not install the following packages:
    	libXt
    * Now running spacewalk-setup.
    * Setting up SELinux..
    ** Database: Setting up database connection for PostgreSQL backend.
    Hostname (leave empty for local)? satellite-db.example.com
    Port [5432]?
    Database? mydb
    Username? mydbuser
    Password? ************
    ** Database: Populating database.
    *** Progress: ####################################

3.2.9. Satellite の設定

インストールプログラムにより、 ユーザーの Red Hat Satellite 環境での基本的な設定タスクが実行されます。
Red Hat Network Satellite インストーラーが Red Hat GPG キーのダウンロードとインストールを行い、必要に応じて /root/.gnupg/ ディレクトリーの設定も行います。
* Configuring tomcat.
* Setting up users and groups.
** GPG: Initializing GPG and importing key.
プロンプトが表示されたら、Red Hat Satellite からの通知を受信するメールアドレスを入力します。大量のメールが送信される可能性があるため、個人アドレスよりも汎用アドレスを選択した方がよいでしょう。
You must enter an email address.
Admin Email Address? admin@example.com
* Performing initial configuration.
Red Hat Satellite をアクティベートするには、「マニフェストの生成」 でダウンロードされたマニフェストファイルの場所を入力します。
* Activating Red Hat Satellite.
Where is your satellite manifest file? /path/manifest_file.zip
** Loading Red Hat Satellite Manifest.
** Verifying manifest locally.
** Activating Red Hat Satellite.
次に、SSL アクセスができるよう CA 証明書を作成します。Apache SSL 設定の質問に対して y と回答し、CA 証明書の質問に対して回答します。
CA cert
証明書のパスワードを入力します。
Organization
組織名を入力します。
Organization Unit
組織内の部署名を入力します。
Email Address
この証明書に関連付けるメールアドレスを入力します (例: 前述のステップで入力した Admin Email Address など)。
City
都市名を入力します。
State
州名を入力します。
Country
国名を入力します。国コードは必ず 2 文字にします。それ以外だと、証明書の生成に失敗します。国コード一覧を表示するには ? を入力します。
* Configuring apache SSL virtual host.
Should setup configure apache's default ssl server for you (saves original ssl.conf) [Y]? 
** /etc/httpd/conf.d/ssl.conf has been backed up to ssl.conf-swsave
* Configuring jabberd.
* Creating SSL certificates.
CA certificate password? 
Re-enter CA certificate password? 
Organization? Red Hat
Organization Unit [satellite.example.com]? Sales
Email Address [admin@example.com]? admin@example.com
City? Raleigh
State? NC
Country code (Examples: "US", "JP", "IN", or type "?" to see a list)? US
** SSL: Generating CA certificate.
** SSL: Deploying CA certificate.
** SSL: Generating server certificate.
** SSL: Storing SSL certificates.
* Deploying configuration files.
* Update configuration in database.
CA 証明書の作成後に、Cobbler で必要なサービスを有効にするかどうか尋ねられます。PXE プロビジョニング機能を使用する場合は、y と回答します。
* Setting up Cobbler..
cobblerd does not appear to be running/accessible
Cobbler requires tftp and xinetd services be turned on for PXE provisioning functionality. Enable these services [Y]?
Cobbler の設定後に、インストールスクリプトによって関連するサービスが再起動されます。
* Restarting services.
Installation complete.
Visit https://satellite.example.com to create the satellite administrator account.
ホストのプロビジョニングに Cobbler を使用する場合、/tftpboot ディレクトリーに Cobbler の書き込みアクセスを付与します。
setsebool -P cobbler_anon_write on
これで Red Hat Satellite のインストールが完了しました。4章設定 の手順を実行してください。