この付録では、Oracle Web Tierをサイレント・モードでコマンドラインからインストールする方法について説明します。 この付録の構成は、次のとおりです。
サイレント・インストールでは、グラフィック出力は表示されず、ユーザーからの入力も必要ないので、Oracle Web Tierのインストールを監視する必要がなくなります。
Oracle Web Tierのサイレント・インストールは、インストーラにレスポンス・ファイルを指定し、コマンドラインに-silent
フラグを使用して実行します。 レスポンス・ファイルは、インストーラのプロンプトに対する答えを指定した変数値とパラメータ値を含むテキスト・ファイルです。
注意: UNIXユーザーが今回初めてOracle Web Tierをインストールする場合は、開始する前にoraInst.loc ファイルを作成する必要があります。 詳細は、第C.3.1項「UNIXユーザー: oraInst.loc ファイルの作成」を参照してください。
Oracle Web Tierをインストールした後、 |
注意: Windowsユーザーが今回初めてOracle Web Tierをインストールする場合は、開始する前にレジストリ・キーを作成する必要があります。 レジストリ・キーの作成方法は、第C.3.2項「Windowsユーザー: レジストリ・キーの作成」に説明されています。 |
サイレント・インストールを実行する前に、インストール固有の情報をレスポンス・ファイルに指定する必要があります。 正しく構成されていないレスポンス・ファイルを使用してインストールしようとすると、インストーラでエラーが発生します。 レスポンス・ファイルはテキスト・ファイルなので、テキスト・エディタで作成または編集できます。
表C-1は、インストールCD-ROMのDisk1/stage/Response
ディレクトリ(UNIXの場合)またはDisk1\stage\Response
ディレクトリ(Windowsの場合)に用意されているレスポンス・ファイルのリストです。
表C-1 Oracle Web Tierのインストールと構成用のレスポンス・ファイル・テンプレート
テンプレート | 説明 |
---|---|
|
このテンプレート・レスポンス・ファイルは、Oracle Web Tierソフトウェアをすでにインストールしたが構成ツールを実行していない場合に使用します。 このスクリプトは、GUIの「インストール・タイプの選択」画面で「ソフトウェアのインストール - 構成なし」オプションを使用してソフトウェアをインストールした後に、 このファイルの内容は、第C.2.1項「 |
|
このテンプレート・レスポンス・ファイルは、Oracle Web Tier製品のインストールと構成を1回の手順で行う場合に使用します。 このスクリプトは、GUIの「インストール・タイプの選択」画面で「インストールと構成」オプションを選択する場合と同じ処理を実行します。 このファイルの内容は、第C.2.2項「 |
|
このテンプレート・レスポンス・ファイルは、システムにソフトウェアのインストールのみを行う場合に使用します。 後で構成ツールを(コマンドラインまたはGUIから)実行するまで、これらの製品の管理は行えません。 このスクリプトは、GUIの「インストール・タイプの選択」画面で「ソフトウェアのインストール - 構成なし」オプションを選択する場合と同じ処理を実行します。 このファイルの内容は、第C.2.3項「 |
これらの既存のレスポンス・ファイル以外に、独自のレスポンス・ファイルも作成できます。インストールのGUIを実行した後、「インストール・サマリー」画面で「保存」をクリックします。 このレスポンス・ファイルの作成先の名前と場所を入力するよう求められます。 作成した後は、このファイルを使用して、他のシステムに同一のインストールを複製することも、必要に応じて変更することもできます。
Web TierConfigureOnly.rsp
ファイルの内容この項では、UNIXシステム上のDisk1/stage/Response/Web TierConfigureOnly.rsp
レスポンス・ファイルの内容を示します。
[ENGINE] #DO NOT CHANGE THIS. Response File Version=1.0.0.0.0 [GENERIC] #The name of the Oracle Instance. Instance name must begin with an alphabetic character, may only contain alphanumeric characters, or the underscore (_) or hyphen (-) characters and are 4 to 30 characters long. INSTANCE_HOME=/oracle/product/11.1.1/as_1/instances/instance1 #Provide the Oracle Instance location. The Oracle Instance directory name may only contain alphanumeric , hyphen (-) , dot (.) and underscore (_) characters, and it must begin with an alphanumeric character. The total length has to be less than or equal to 128 characters. The location has to be an empty or non existing directory. INSTANCE_NAME=instance1 #If set to true, installer will auto assign ports AUTOMATIC_PORT_DETECT=true #This is required if "AUTOMATIC_PORT_DETECT" variable is set to false, absolute path of a staticports file location need to be provided with values for ports.\nThe template for staticports.ini can be found from Disk1/staget/Response directory of the shiphome. STATICPORT INI FILE LOCATION= [SYSTEM] #Set true to create a new instance and configure Oracle Process Management Notification, else skip the configuration CONFIGURE_OPMN=true #Set true to configure Oracle HTTP Server, else skip Oracle HTTP Server configuration CONFIGURE_OHS=true #Set true to configure Oracle Web Cache, else skip Oracle Web Cache configuration CONFIGURE_WEBCACHE=true #The Oracle HTTP Server (OHS) component name (required only if CONFIGURE_OHS is set to true). OHS component name must begin with an alphabetic character, may only contain alphanumeric characters, or the underscore (_) or hyphen (-) characters and are 4 to 30 characters long. OHS_COMPONENT_NAME=ohs1 #The Web Cache component name (required only if CONFIGURE_WEBCACHE is set to true). Web Cache component name must begin with an alphabetic character, may only contain alphanumeric characters, or the underscore (_) or hyphen (-) characters and are 4 to 30 characters long. WEBCACHE_COMPONENT_NAME=webcache1 #Valid passwords are 5 to 30 characters long, must begin with an alphabetic character, use only alphanumeric, underscore (_), dollar ($) or pound (#) characters and include at least one number. WEBCACHE_ADMINISTRATOR_PASSWORD=<SECURE VALUE> #The confirmation password for Web Cache administrator. WEBCACHE_ADMINISTRATOR_PASSWORD_CONFIRM=<SECURE VALUE> [APPLICATIONS] [RELATIONSHIPS] #If set to true, the instance and components will be registered with an existing weblogic server ASSOCIATE_WEBTIER_WITH_DOMAIN=true #Provide the exiting Middleware Home location. This is required only if ASSOCIATE_WEBTIER_WITH_DOMAIN is set to true. MIDDLEWARE_HOME=/Oracle/Middleware #Provide an existing domain host name. Required only if ASSOCIATE_WEBTIER_WITH_DOMAIN is set to true DOMAIN_HOST_NAME=machinename.machinedomain #Provide the existing domain port number. Required only if ASSOCIATE_WEBTIER_WITH_DOMAIN is set to true DOMAIN_PORT_NO=7001 #Provide the domain user name. Required only if ASSOCIATE_WEBTIER_WITH_DOMAIN is set to true DOMAIN_USER_NAME=weblogic #The domain user password. Required only if ASSOCIATE_WEBTIER_WITH_DOMAIN is set to true DOMAIN_USER_PASSWORD=<SECURE VALUE>
Web TierInstallAndConfigure.rsp
ファイルの内容この項では、UNIXシステム上のDisk1/stage/Response/Web TierInstallAndConfigure.rsp
レスポンス・ファイルの内容を示します。
[ENGINE] #DO NOT CHANGE THIS. Response File Version=1.0.0.0.0 [GENERIC] #Set this to true if installation and configuration need to be done, all other required variables need to be provided. Variable "INSTALL AND CONFIGURE LATER TYPE" must be set to false if this is set to true as the variables are mutually exclusive INSTALL AND CONFIGURE TYPE=true #Set this to true if only Software only installation need to be done. If this is set to true then variable "INSTALL AND CONFIGURE TYPE" must be set to false, since the variables are mutually exclusive. INSTALL AND CONFIGURE LATER TYPE=false #Provide the Oracle Home location. The Oracle Home directory name may only contain alphanumeric , hyphen (-) , dot (.) and underscore (_) characters, and it must begin with an alphanumeric character. The total length has to be less than or equal to 128 characters. The location has to be an empty directory or a valid Web Tier Oracle Home. ORACLE_HOME=/oracle/product/11.1.1/as_1 #The name of the Oracle Instance. Instance name must begin with an alphabetic character, may only contain alphanumeric characters, or the underscore (_) or hyphen (-) characters and are 4 to 30 characters long. INSTANCE_HOME=/oracle/product/11.1.1/as_1/instances/instance1 #Provide the Oracle Instance location. The Oracle Instance directory name may only contain alphanumeric , hyphen (-) , dot (.) and underscore (_) characters, and it must begin with an alphanumeric character. The total length has to be less than or equal to 128 characters. The location has to be an empty or non existing directory. INSTANCE_NAME=instance1 #If set to true, installer will auto assign ports AUTOMATIC_PORT_DETECT=true #This is required if "AUTOMATIC_PORT_DETECT" variable is set to false, absolute path of a staticports file location need to be provided with values for ports.\nThe template for staticports.ini can be found from Disk1/staget/Response directory of the shiphome. STATICPORT INI FILE LOCATION= [SYSTEM] #Set true to create a new instance and configure Oracle Process Management Notification, else skip the configuration CONFIGURE_OPMN=true #Set true to configure Oracle HTTP Server, else skip Oracle HTTP Server configuration CONFIGURE_OHS=true #Set true to configure Oracle Web Cache, else skip Oracle Web Cache configuration CONFIGURE_WEBCACHE=true #The Oracle HTTP Server (OHS) component name (required only if CONFIGURE_OHS is set to true). OHS component name must begin with an alphabetic character, may only contain alphanumeric characters, or the underscore (_) or hyphen (-) characters and are 4 to 30 characters long. OHS_COMPONENT_NAME=ohs1 #The Web Cache component name (required only if CONFIGURE_WEBCACHE is set to true). Web Cache component name must begin with an alphabetic character, may only contain alphanumeric characters, or the underscore (_) or hyphen (-) characters and are 4 to 30 characters long. WEBCACHE_COMPONENT_NAME=webcache1 #Valid passwords are 5 to 30 characters long, must begin with an alphabetic character, use only alphanumeric, underscore (_), dollar ($) or pound (#) characters and include at least one number. WEBCACHE_ADMINISTRATOR_PASSWORD=<SECURE VALUE> #The confirmation password for Web Cache administrator. WEBCACHE_ADMINISTRATOR_PASSWORD_CONFIRM=<SECURE VALUE> [APPLICATIONS] [RELATIONSHIPS] #If set to true, the instance and components will be registered with an existing weblogic server ASSOCIATE_WEBTIER_WITH_DOMAIN=true #Provide the exiting Middleware Home location. This is required only if ASSOCIATE_WEBTIER_WITH_DOMAIN is set to true. MIDDLEWARE_HOME=/Oracle/Middleware #Provide an existing domain host name. Required only if ASSOCIATE_WEBTIER_WITH_DOMAIN is set to true DOMAIN_HOST_NAME=machinename.machinedomain #Provide the existing domain port number. Required only if ASSOCIATE_WEBTIER_WITH_DOMAIN is set to true DOMAIN_PORT_NO=7001 #Provide the domain user name. Required only if ASSOCIATE_WEBTIER_WITH_DOMAIN is set to true DOMAIN_USER_NAME=weblogic #The domain user password. Required only if ASSOCIATE_WEBTIER_WITH_DOMAIN is set to true DOMAIN_USER_PASSWORD=<SECURE VALUE>
Web TierSoftwareOnly.rsp
ファイルの内容この項では、UNIXシステム上のDisk1/stage/Response/Web TierSoftwareOnly.rsp
レスポンス・ファイルの内容を示します。
[ENGINE] #DO NOT CHANGE THIS. Response File Version=1.0.0.0.0 [GENERIC] #Set this to true if installation and configuration need to be done, all other required variables need to be provided. Variable "INSTALL AND CONFIGURE LATER TYPE" must be set to false if this is set to true as the variables are mutually exclusive INSTALL AND CONFIGURE TYPE=false #Set this to true if only Software only installation need to be done. If this is set to true then variable "INSTALL AND CONFIGURE TYPE" must be set to false, since the variables are mutually exclusive. INSTALL AND CONFIGURE LATER TYPE=true #Provide the Oracle Home location. The Oracle Home directory name may only contain alphanumeric , hyphen (-) , dot (.) and underscore (_) characters, and it must begin with an alphanumeric character. The total length has to be less than or equal to 128 characters. The location has to be an empty directory or a valid Web Tier Oracle Home. ORACLE_HOME=/oracle/product/11.1.1/as_1 [SYSTEM] [APPLICATIONS] [RELATIONSHIPS]
レスポンス・ファイルには、インストーラで必要なパスワードが含まれています。 レスポンス・ファイル内のパスワードが必要な場所は、<SECURE VALUE>
という文字列で検索します。この値を、実際のパスワードで置き換えます。 これらのパスワードは、レスポンス・ファイルにクリア・テキスト形式で保存されます。 レスポンス・ファイル内のこれらのパスワードに関するセキュリティ問題を最小限に抑えるために、次のガイドラインに従ってください。
レスポンス・ファイルに権限を設定して、サイレント・インストールを実行するオペレーティング・システム・ユーザーのみが読取り可能にします。
可能であれば、サイレント・インストールの完了後にレスポンス・ファイルをシステムから削除します。
この項では、サイレント・インストールの実行前に必要になる場合がある、インストール前の作業について説明します。
内容は、次のとおりです。
oraInst.loc
ファイルの作成インストーラは、Oracleインベントリ・ディレクトリを使用して、コンピュータにインストールされるすべてのOracle製品を管理します。 インベントリ・ディレクトリは、oraInst.loc
というファイルに保存されています。 このファイルがシステムにまだない場合は、サイレント・インストールを開始する前に作成する必要があります。 このファイルはインストーラが使用します。
root
ユーザーでログインします。
prompt> su
viやemacsなどのテキスト・エディタを使用して、oraInst.loc
ファイルを任意のディレクトリに作成します。 このファイルには、次の2行を記述します。
inventory_loc=oui_inventory_directory inst_group=oui_install_group
oui_inventory_directoryを、インストーラがインベントリ・ディレクトリを作成するディレクトリのフルパスで置き換えます。 次に、oui_install_group
を、このディレクトリに対する書込み権限を持つメンバーのグループ名で置き換えます。
root
ユーザーを終了します。
# exit
Oracle Web Tierをコンピュータにまだインストールしていない場合は、次のレジストリ・キーと値を作成する必要があります。
HKEY_LOCAL_MACHINE / SOFTWARE / Oracle / inst_loc = [inventory_directory]
Inventory_Directory
を、インストーラ・ファイルへのフルパスで置き換えます。たとえば、次のとおりです。
C:Program Files\Oracle\Inventory
UNIXシステムでコマンドラインからインストーラを実行する場合の構文を、次に示します。
runInstaller [-mode] [-options] [(<CommandLinevariable=Value>)*]
Windowsシステムの場合:
setup.exe [-mode] [-options] [(<CommandLinevariable=Value>)*]
表C-2 インストーラのコマンドライン・パラメータ
パラメータ | 説明 |
---|---|
インストール・モード: 指定できるのは1つのモードのみです |
|
|
インストーラをGUIモードで起動します。 これがデフォルト・モードです。モードをコマンドラインに指定しないと、このモードが使用されます。 |
|
サイレント・モードでインストールします。 レスポンス・ファイルまたはコマンドライン変数値のペアをインストーラに渡す必要があります。 |
|
削除用のインストーラをGUIモードで起動します。 |
|
インストーラをGUIモードで起動しますが、前提条件のチェックのみを実行します。 ソフトウェアはインストールされません。 |
|
インストーラをGUIモードで起動して、すべて前提条件と検証のチェックを実行しますが、ソフトウェアはインストールしません。 |
|
すべての前提条件と検証のチェックをサイレント・モードで実行します。 レスポンス・ファイルまたは一連のコマンドライン変数値のペアをインストーラに渡す必要があります。 |
インストール・オプション |
|
|
|
|
インベントリの場所のファイルへのポインタ。 fileを |
|
レスポンス・ファイルへのポインタ。 fileをレスポンス・ファイルへのフルパスと名前で置き換えます。 |
|
Java Runtime Environment(JRE)がインストールされている場所へのポインタ。 locationを、JREがインストールされている |
|
インストーラが実行するロギング・レベルを指定します。指定したlevelより優先度が低いすべてのメッセージが記録されます。 有効なレベルは次のとおりです。
|
|
インストーラからデバッグ情報を取得します。 |
|
空でないディレクトリで、サイレント・インストールを続行できるようにします。 |
|
ディスク使用に関するデバッグ情報をロギングします。 |
|
メモリー使用に関するデバッグ情報をロギングします。 |
|
時間使用に関するデバッグ情報をロギングします。 このコマンドでは、 |
|
Windowsのみ。インストーラは、Javaエンジンの起動と終了をせずに処理の完了を待ちます。 |
|
メッセージがコンソール・ウィンドウに表示されなくなります。 |
|
システムの前提条件チェックの結果を無視してインストールを続行します。 |
|
システムの前提条件チェックのみを実行して終了します。 |
|
|
|
インストーラが実行するすべての検証チェックを無効にします。 |
|
GUIインストールの場合、いくつかの画面の情報やデフォルト値は事前移入されています。 このオプションを指定すると、この動作が無効になり、情報や値が事前移入されなくなります。 |
コマンドライン変数 |
|
インストーラの変数 |
インストーラの変数は、 ORACLE_HOME=/home/Oracle/Middleware/as_1 Windowsシステムの場合: ORACLE_HOME=C:\products\Oracle\Middleware\as_1 |
セッションの変数 |
セッションの変数は、 |
コンポーネントの変数 |
コンポーネントの変数は、 |
今回が初めてのインストールの場合(つまり既存のOracleインベントリの場所がない場合)、UNIXシステムでは、次のコマンドを使用してサイレント・インストールを実行します。
./runInstaller -silent -response file -invPtrLoc file
Windowsシステムの場合:
setup.exe -silent -response file -invPtrLoc file
UNIXシステムの場合のこのコマンドの詳細な例:
./runInstaller -silent -response /home/Oracle/response/Web TierInstallAndConfigure.rsp -invPtrLoc /home/Oracle/oraInst.loc
Windowsシステムの場合:
setup.exe -silent -response C:\products\Oracle\response\Web TierInstallAndConfigure.rsp -invPtrLoc C:\products\Oracle\oraInst.loc
Oracle製品がシステムにすでにインストールされていてインベントリの場所を指定する必要がない場合、UNIXシステムでは次のようなコマンドを使用できます。
./runInstaller -silent -response file
Windowsシステムの場合:
setup.exe -silent -response file
UNIXシステムの場合のこのコマンドの詳細な例:
./runInstaller -silent -response /home/Oracle/response/Web TierInstallAndConfigure.rsp
Windowsシステムの場合:
setup.exe -silent -response C:\products\Oracle\response\Web TierInstallAndConfigure.rsp
次に、WebTierSoftwareOnly.rsp
テンプレートを使用したサイレント・インストールをUNIXシステムで実行したサンプル出力を示します。
Platform is Linux X86 32 bit Starting Oracle Universal Installer... Checking Temp space: must be greater than 80 MB. Actual 65464 MB Passed Checking swap space: must be greater than 150 MB. Actual 1590 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2009-03-26_01-50-03PM. Please wait ...[khwang@dadvmn0789 Disk1]$ Log: /scratch/khwang/oraInventory/logs/install2009-03-26_01-50-03PM.log Copyright © 1999, 2009, Oracle and/or its affiliates. All rights reserved. Reading response file.. Expected result: One of enterprise-4,enterprise-5,redhat-4,redhat-5,SuSE-10,asianux-2,asianux-3 Actual Result: redhat-4 Check complete. The overall result of this check is: Passed CertifiedVersions Check: Success. Checking for gcc-3.4.3-22.1; found gcc-3.4.6-10.0.1-i386. Passed Checking for gcc-c++-3.4.3-22.1; found gcc-c++-3.4.6-10.0.1-i386. Passed Checking for openmotif21-2.1.30-11.RHEL4.4 ; found openmotif21-2.1.30-11.0.1.RHEL4.6-i386. Passed Checking for setarch-1.6-1; found setarch-1.6-1-i386. Passed Checking for pdksh-5.2.14-30; found pdksh-5.2.14-30.6-i386. Passed Checking for sysstat-5.0.5-1; found sysstat-5.0.5-19.el4-i386. Passed Checking for gnome-libs-1:1.4.1.2.90-44.1; found gnome-libs-1:1.4.1.2.90-44.2-i386. Passed Checking for libstdc++-3.4.3-22.1 ; found libstdc++-3.4.6-10.0.1-i386. Passed Checking for libstdc++-devel-3.4.3-22.1; found libstdc++-devel-3.4.6-10.0.1-i386. Passed Checking for compat-libstdc++-296-2.96-132.7.2; found compat-libstdc++-296-2.96-132.7.2-i386. Passed Checking for compat-db-4.1.25-9; found compat-db-4.1.25-9-i386. Passed Checking for control-center-2.8.0-12; found control-center-1:2.8.0-12.rhel4.5-i386. Passed Checking for glibc-common-2.3.4-2.9; found glibc-common-2.3.4-2.41-i386. Passed Checking for binutils-2.15.92.0.2-13; found binutils-2.15.92.0.2-25-i386. Passed Checking for make-1:3.80-5; found make-1:3.80-7.EL4-i386. Passed Checking for xscreensaver-4.18-5.rhel4.2; found xscreensaver-1:4.18-5.rhel4.14.0.1-i386. Passed Check complete. The overall result of this check is: Passed Packages Check: Success. Checking for VERSION=2.6.9; found VERSION=2.6.9-78.0.0.0.1.ELxenU. Passed Checking for hardnofiles=4096; found hardnofiles=4096. Passed Checking for softnofiles=4096; found softnofiles=4096. Passed Check complete. The overall result of this check is: Passed Kernel Check: Success. Expected result: ATLEAST=2.3.4-2.19 Actual Result: 2.3.4-2.41 Check complete. The overall result of this check is: Passed GLIBC Check: Success. Expected result: 922MB Actual Result: 4000MB Check complete. The overall result of this check is: Passed TotalMemory Check: Success. Verifying data...... Copying Files... -----------20%----------40%----------60%----------80%---------100% The installation of Oracle Web Tier 11g completed successfully.