日曜日, 8月 28, 2011

Oracle VM 3.0入門
(第2回 Oracle VM Managerのインストール)

[概要]
Oracle VM (OVM) Manager Managerのインストールについて説明します。
[詳細]
前回は、OVM Serverのインストールについて説明しました。今回は複数のOVM Serverの環境を統合管理するためOVM Managerについて説明します。OVM Serverを使用するためにはOVM Managerを必ず用意しなければなりません。
なお入門編では、仮想マシンの構築が出来ることを、目的としていますので詳細な設定については管理編で触れます。
では、必要となるサーバのスペックから説明を始めます。
  1. サーバ・スペック
    Oracle VM Managerには、次のスペックのマシンが必要です。
    • HWスペック
      メモリ4GB
      1.5GB (別にDBサーバ用意した場合)
      CPUアーキテクチャ64ビット
      CPUスピード1.83GHz
      swap サイズ2.1GB
      HDD/u01 5GB
      /tmp 2GB

    • サポートOS
      Oracle VM ManagerがサポートするOSは3.0からは、Oracle Linuxだけになりました。
      Oracle Linux以外のディストリビューションで動作するかについての検証は改めて行います。
      • Oracle Linux 5 Update 5 64-bit 以降
      • Oracle Linux 6 64-bit

    Oracle Linuxは、OVMをダウンロードしたサイト(http://linux.oracle.com/)にアクセスし、E-Deliveryのページにからダウンロードできます。

  2. パッケージの追加
    libaioパッケージとunzipをインストールされている必要があります。

    [root@linux ~]# rpm -Uvh libaio-version.rpm [root@linux ~]# rpm -Uvh unzip-version.rpm

  3. /etc/hostsのへ追加
    "/etc/hosts"に、自ホストのIPアドレスを登録します。

    [root@jp-lin03 ~]# vi /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 192.168.1.30 ovmmgr

  4. 時刻の設定
    サーバの時刻を合わせます。OVM Managerのインストール後に、時刻を戻すと戻す前の時刻になるまで動作が不安定になります。

  5. インストール・ディスクのマウント
    OVM Serverと一緒にをダウンロードしたOVM Managerのイメージを、OVM Managerをインストールするサーバにコピーしマウントします。

    [root@linux ~]# mount -o loop,ro ./OracleVM-Manager-2.2.0.iso /mnt

  6. 環境設定スクリプトの実行
    Oracleユーザの作成、ファイアウォールの設定、ユーザの制限値(limits)の変更、インストール・ディレクトリの作成を行うスクリプトを実行します。

    Oracleユーザの作成、Fierwallの設定、ユーザの制限値の変更を行うスクリプトを実行します。環境設定スクリプトの実行には、最初に"LANG=C"をつけて英語環境にすること忘れないでください。
    [root@linux ~]# cd /mnt [root@ovmmgr CDROM]# LANG=C ./createOracle.sh Adding group 'oinstall' with gid '54321' ... Adding group 'dba' Adding user 'oracle' with user id '54321', initial login group 'dba', supplementary group 'oinstall' and home directory '/home/oracle' ... Changing ownership of '/home/oracle' to oracle:dba Creating user 'oracle' succeeded ... Verifying user 'oracle' OS prerequisites for Oracle VM Manager ... oracle soft nofile 8192 oracle hard nofile 8192 oracle soft nproc 4096 oracle hard nproc 4096 oracle soft core unlimited oracle hard core unlimited Setting user 'oracle' OS limits for Oracle VM Manager ... Altered file /etc/security/limits.conf Original file backed up at /etc/security/limits.conf.orabackup Verifying & setting of user limits succeeded ... Creating mountpoint '/u01' ... Modifying iptables Adding rules to enable access to : 7001 : Oracle VM Manager http 7002 : Oracle VM Manager https 15901 : Oracle VM Manager VM console proxy 54321 : Oracle VM Manager core Saving old iptables config file to /etc/sysconfig/iptables.ovmm


    次の項目が設定されていることを確認してください。
    • ユーザ"oracle",グループ"dba"を作成されていること。
    • ファイアウォールは1521, 7001, 7002, 8080, 54321のポートが開放されていること。
    • "/etc/security/limits.conf"
      oraclesoftnofile8192
      oraclehardnofile8192
      oraclesoftnproc4096
      oraclehardnproc4096
      oraclesoftcoreunlimited
      oraclehardcoreunlimited

  7. インストーラの起動
    インストーラを起動します。

    [root@linux ~]# sh ./sh runInstaller.sh

    (Tpis)
    3.0のインストーラは、X サーバを必要としなくなりました。

  8. インストールタイプの選択
    今回は、インストールタイプを、「シンプル (Simple)」にします。

    Please select an installation type: 1: Simple 2: Standard 3: Uninstall 4: Help
    Select Number (1-4): 1
    Starting simple installation ...

  9. パスワードの設定
    OVM Managerでは、いくつかの管理用のパスワードがあります。Simpleインストールでは、次のパスワードがすべてのパスワードを同じものに設定されます。なお、パスワードは8文字から16文字。文字以上の大文字と小文字、数字を合わせる必要があります。(例:FooBar1234)
    • Oracle XEの"SYS"ユーザと"SYSTEM"ユーザ
    • Oracle VM Manager OVSのデータベース・ユーザ
    • Oracle WebLogicの"admin"ユーザ


    Verifying installation prerequisites ...
    One password is used for all users created and used during the installation. Enter a password for all logins used during the installation: Enter a password for all logins used during the installation (confirm):

  10. インストールの開始
    インストーラが環境の設定をチェックしたあと、問題なければインストール開始の確認を聞かれますので"1(Continue)"を入力します。

    Verifying configuration ...
    Start installing the configured components: 1: Continue 2: Abort Select Number (1-2): 1

  11. インストーラの完了
    9つのステップが終わると、設定内容が"Installation Summary"として表示され、インストールは終了です。

    Installation Summary -------------------- Database configuration: Database host name : ovmmgr Database instance name (SID): XE Database listener port : 1521 Application Express port : 8080 Oracle VM Manager schema : ovs
    Weblogic Server configuration: Administration username : weblogic
    Oracle VM Manager configuration: Username : admin Core management port : 54321 UUID : 0004fb00000100006b45ff6585208a1c
    Passwords:
    There are no default passwords for any users. The passwords to use for Oracle VM Manager, Oracle Database 11g XE, and Oracle WebLogic Server have been set by you during this installation. In the case of a default install, all passwords are the same.
    Oracle VM Manager UI: http://ovmmgr:7001/ovm/console https://ovmmgr:7002/ovm/console Log in with the user 'admin', and the password you set during the installation.
    Please note that you need to install tight-vnc on this computer to access a virtual machine's console.
    For more information about Oracle Virtualization, please visit: http://www.oracle.com/virtualization/
    Oracle VM Manager installation complete.

  12. これで、マネージャのインストールは完了です。
  13. OVM Managerへの接続確認
    次にWebブラウザでマネージャにアクセスできることを確認します。
    下のURLでマネージャに接続します。
    • http://サーバ名:7001/ovm/console
    • https://サーバ名:7002/ovm/console




    これでOVM Managerのインストールが完了しました。次回は仮想マシンの作成について説明します。