Using silent mode to install GC 10.2.0.1 and upgrade GC to 10.2.0.5 by Using an Existing Database on

djb1008發表於2010-08-09

本文主要描述在Redhat Linux5.3_X86上如何安裝Grid Control 10.2.0.1,並升級到新的版本(10.2.0.5),具體的步驟分為:

  1. 安裝前配置OMS SERVER環境,配置REPOSITORY DB 環境,具體內容請參看我的部落格文章http://djb1008.itpub.net/post/42280/502790 ;
  2. 使用靜默方式(silent)安裝Grid Control 10.2.0.1,不進行任何配置(安裝時選擇noconfig選項,只安裝軟體);
  3. 使用靜默方式(silent)升級oms 10.2.0.5,不進行任何配置(安裝時選擇noconfig選項,只安裝軟體);
  4. 使用靜默方式(silent)升級agent 10.2.0.5,不進行任何配置(安裝時選擇noconfig選項,只安裝軟體);
  5. 執行ConfigureGC.pl,進行本次安裝唯一一次的配置操作,本次操作耗時最長(1個小時);
[@more@]

    本文下面將Grid Contol 簡稱為GC.

    . 安裝前配置OMS SERVER環境,配置REPOSITORY DB 環境

    關於OMS SERVER環境準備,REPOSITORY DB環境準備的環節,請參看我的部落格文章http://djb1008.itpub.net/post/42280/502790 裡的".OMS SERVER環境準備,REPOSITORY DB環境準備"環節,這裡不再累述。

    本次安裝也是選擇了使用已有資料庫存放資料資料.

    在安裝前如果有條件,最好調整一下repository dbsystem表空間的大小,筆者有一次因為system空間不夠,導致了GC配置的失敗.system表空間有條件的話,最好調到800M及以上.

    repository db:

    SQL>alter database datafile 1 resize 800m;

    另外,如果環境中已經安裝過GC,則需要額外地做一些清除的工作,具體的描述如下:

    Oms server:

    #rm -rf /oracle/OracleHomes

    #rm -rf /etc/oratab

    #rm -rf /etc/oraInst.loc

    #rm -rf /etc/rc.d/init.d/gcstartup

    #rm -rf /usr/local/bin/oraenv

    #Ps -ef|grep ora

    #ps -ef|grep oms

    檢視oms server上有沒有oracle 的程式,oms程式存在

    #reboot

    Repository db server:

    $/oracle/OracleHomes/agent10g/bin/emctl stop agent

    $rm -rf /oracle/OracleHomes

    #rm -rf /etc/rc.d/init.d/gcstartup

    #ps -ef|grep agent

    . 靜默方式(silent)安裝GC 10.2.0.1,只安裝軟體,不進行配置(OMS Server上執行)

  1. 編輯responseFile

    $cd /setup

    $ls

    gc_102011_linux.zip

    $unzip gc_102011_linux.zip

    $cd /setup/Disk1/response

    $cat em_ussing_existing_db.rsp|grep -v ^#|grep -v ^$>em_using_existing_db2.rsp

    $vi em_using_existing_db2.rsp

    $more /setup/Disk1/response/em_using_existing_db2.rsp

    RESPONSEFILE_VERSION=2.2.1.0.0

    UNIX_GROUP_NAME="oinstall"

    FROM_LOCATION="../oms/Disk1/stage/products.xml"

    BASEDIR="/oracle/OracleHomes"

    INSTALLATION_NAME="oms10g"

    NEXT_SESSION=true

    NEXT_SESSION_ON_FAIL=true

    DEINSTALL_LIST={"oracle.sysman.top.oms","10.2.0.1.1"}

    SHOW_DEINSTALL_CONFIRMATION=true

    SHOW_DEINSTALL_PROGRESS=true

    REMOVE_HOMES="/oracle/OracleHomes/oms10g"

    ACCEPT_LICENSE_AGREEMENT=true

    TOPLEVEL_COMPONENT={"oracle.sysman.top.oms","10.2.0.1.1"}

    COMPONENT_LANGUAGES={"en"}

    s_reposHost="ocmdb1"

    s_reposPort="1521"

    s_reposSID="gridctl"

    s_reposDBAPwd="mypwd**"

    s_mgmtTbsName="/oracle/oradata/gridctl/mgmt.dbf"

    s_ecmTbsName="/oracle/oradata/gridctl/mgmt_ecm_depot1.dbf"

    s_securePassword="mypwd**"

    s_securePasswordConfirm="mypwd**"

    b_lockedSelected="false"

    s_reposPwd="mypwd**"

    s_reposPwdConfirm="mypwd**"

    n_firstInstanceValidation=2

    n_firstReposValidation=1

    n_firstReposPwdValidation=2

    n_firstSecureValidation=2

    n_firstVldnEmailSer=2

    b_upgrade=false

    b_showOptConfigPage=TRUE

    s_installType="NOSEED"

    紅色標出的內容,是需要根據實際情況,進行手工編輯的.

  2. 進行靜默的安裝

    $cd /setup/Disk1

    $./runInstaller -ignoreSysPrereqs -noconfig -silent -responseFile /setup/Disk1/response/em_using_existing_db2.rsp -force use_prereq_checker=false

    安裝程式執行到最後,提示使用root身份執行兩個檔案:

    #!/bin/sh

    #Root script to run

    /oracle/oraInventory/orainstRoot.sh

    /oracle/OracleHomes/oms10g/allroot.sh

    To execute the configuration scripts:

    1. Open a terminal window

    2. Log in as "root"

    3. Run the scripts

    [root@ocmdb2 response]# /oracle/oraInventory/orainstRoot.sh

    Changing permissions of /oracle/oraInventory to 770.

    Changing groupname of /oracle/oraInventory to oinstall.

    The execution of the script is complete

    [root@ocmdb2 response]# /oracle/OracleHomes/oms10g/allroot.sh

    Starting to execute allroot.sh .........

    Starting to execute /oracle/OracleHomes/oms10g/root.sh ......

    Running Oracle10 root.sh script...

    nThe following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME= /oracle/OracleHomes/oms10g

    Enter the full pathname of the local bin directory: [/usr/local/bin]:

    The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)

    [n]: y

    Copying dbhome to /usr/local/bin ...

    Copying oraenv to /usr/local/bin ...

    The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

    [n]: y

    Copying coraenv to /usr/local/bin ...

    nCreating /etc/oratab file...

    Adding entry to /etc/oratab file...

    Entries will be added to the /etc/oratab file as needed by

    Database Configuration Assistant when a database is created

    Finished running generic part of root.sh script.

    Now product-specific root actions will be performed.

    Finished execution of /oracle/OracleHomes/oms10g/root.sh ......

    Starting to execute /oracle/OracleHomes/agent10g/root.sh ......

    Running Oracle10 root.sh script...

    The following environment variables are set as:

    ORACLE_OWNER= oracle

    ORACLE_HOME= /oracle/OracleHomes/agent10g

    Enter the full pathname of the local bin directory: [/usr/local/bin]:

    The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)

    [n]: y

    Copying dbhome to /usr/local/bin ...

    The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

    [n]: y

    Copying oraenv to /usr/local/bin ...

    The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)

    [n]: y

    Copying coraenv to /usr/local/bin ...

    Entries will be added to the /etc/oratab file as needed by

    Database Configuration Assistant when a database is created

    Finished running generic part of root.sh script.

    Now product-specific root actions will be performed.

    Finished product-specific root actions.

    Finished execution of /oracle/OracleHomes/agent10g/root.sh ......

    我們可以檢視安裝的滾動文件:

    $tail -f /oracle/oraInventory/logs/installActions2010-08-06_10-53-16AM.log

  3. 安裝完成GC 10.2.0.1軟體後,結果如下:

    [oracle@ocmdb2 OracleHomes]$ opmnctl status

    Processes in Instance: EnterpriseManager0.ocmdb2

    -------------------+--------------------+---------+---------

    ias-component | process-type | pid | status

    -------------------+--------------------+---------+---------

    DSA | DSA | N/A | Down

    HTTP_Server | HTTP_Server | N/A | Down

    LogLoader | logloaderd | N/A | Down

    dcm-daemon | dcm-daemon | N/A | Down

    OC4J | home | N/A | Down

    WebCache | WebCache | N/A | Down

    WebCache | WebCacheAdmin | N/A | Down

    [oracle@ocmdb2 OracleHomes]$ ps -ef|grep oms

    oracle 6971 1 0 10:57 ? 00:00:00 /oracle/OracleHomes/oms10g/opmn/bin/opmn -d

    oracle 6973 6971 0 10:57 ? 00:00:00 /oracle/OracleHomes/oms10g/opmn/bin/opmn -d

    oracle 8814 4353 0 11:12 pts/1 00:00:00 grep oms

    [oracle@ocmdb2 OracleHomes]$ opmnctl stopall

    opmnctl: stopping opmn and all managed processes...

    [oracle@ocmdb2 OracleHomes]$ ps -ef|grep opmn

    oracle 8840 4353 0 11:12 pts/1 00:00:00 grep opmn

    [oracle@ocmdb2 OracleHomes]$ pwd

    /oracle/OracleHomes

    [oracle@ocmdb2 OracleHomes]$ du -sm *

    406 agent10g

    1254 oms10g

    安裝GC 10.2.0.1_X86 後的目錄空間佔用情況,這個可以和後面升級完成做一個比較.

    [oracle@ocmdb2 OracleHomes]$ opmnctl stopall

    opmnctl: opmn is not running

    停止opmnctl,為後面的升級做準備.

    #mv /etc/rc.d/init.d/gcstartup /etc/rc.d/init.d/gcstartup.new

    禁止os啟動是啟動omsagent

  4. 升級前對GC 10.2.0.1做一個目錄備份

    安裝完10.2.0.1,最好在升級前進行一次目錄備份,這樣下次出現問題後就可以直接恢復了(注意要包括oraInventory目錄)

    #tar -cvf /setup/gc10201_noconfig.tar /oracle

    #reboot

    重新啟動OS

    . 使用靜默方式,升級OMS10.2.0.5 (OMS Server上執行)

  5. 解壓縮patch安裝檔案

    $cd /setup

    $unzip p3731593_10205_LINUX.zip

  6. 編輯reponseFile

    $cd /setup/3731593/Disk1/response

    $cat patchset.rsp |grep -v ^#|grep -v ^$>patchset2.rsp

    $vi patchset2.rsp

    $more patchset2.rsp

    RESPONSEFILE_VERSION=2.2.1.0.0

    UNIX_GROUP_NAME=oinstall

    FROM_LOCATION="../stage/products.xml"

    ORACLE_HOME="/oracle/OracleHomes/oms10g"

    b_softwareonly=true

    b_startOMS=true

    s_sysPassword="mypwd**"

    TOPLEVEL_COMPONENT={"oracle.sysman.patchset","10.2.0.5.0"}

    DEINSTALL_LIST={"oracle.sysman.patchset","10.2.0.5.0"}

    SHOW_SPLASH_SCREEN=true

    SHOW_WELCOME_PAGE=false

    SHOW_SUMMARY_PAGE=true

    SHOW_INSTALL_PROGRESS_PAGE=true

    SHOW_REQUIRED_CONFIG_TOOL_PAGE=true

    SHOW_CONFIG_TOOL_PAGE=true

    SHOW_XML_PREREQ_PAGE=true

    SHOW_END_OF_INSTALL_MSGS=true

    SHOW_ROOTSH_CONFIRMATION=true

    SHOW_END_SESSION_PAGE=true

    SHOW_EXIT_CONFIRMATION=false

    sl_pwdInfo="mypwd**"

    n_validate=1

    oracle.iappserver.st_midtier:szl_InstanceInformation="mypwd**"

    ACCEPT_LICENSE_AGREEMENT=true

    DECLINE_SECURITY_UPDATES=true

    紅色標出的內容,需要根據實際情況進行編輯.

  7. 執行命令,使用靜默方式升級OMS10.2.0.5

    $cd /setup/3731593/Disk1/

    $ ./runInstaller -ignoreSysPrereqs -silent -noconfig -responseFile /setup/3731593/Disk1/response/patchset2.rsp

    The following configuration scripts need to be executed as the "root" user.

    #!/bin/sh

    #Root script to run

    /oracle/OracleHomes/oms10g/root.sh

    To execute the configuration scripts:

    1. Open a terminal window

    2. Log in as "root"

    3. Run the scripts

    使用root身份執行root.sh檔案

    #/oracle/OracleHomes/oms10g/root.sh

  8. 靜默方式升級OMS10.2.0.5後的一些結果

    [oracle@ocmdb2 ~]$ cd /oracle

    [oracle@ocmdb2 oracle]$ ls

    OracleHomes oraInventory

    [oracle@ocmdb2 oracle]$ cd OracleHomes/

    [oracle@ocmdb2 OracleHomes]$ ls

    agent10g oms10g

    [oracle@ocmdb2 OracleHomes]$ du -sm *

    406 agent10g

    1853 oms10g

    可以看到oms10g 子目錄由原來的1254M 增加到1853M;agent10g沒有任何變化.

    . 使用靜默方式,升級AGENT10.2.0.5 (OMS Server上執行)

  9. 編輯reponseFile

    $cd /setup/3731593/Disk1/response

    $cp patchset2.rsp patchset3.rsp

    $vi patchset3.rsp

    $more patchset3.rsp

    FROM_LOCATION="../stage/products.xml"

    ORACLE_HOME="/oracle/OracleHomes/agent10g"

    b_softwareonly=true

    b_startOMS=true

    s_sysPassword="mypwd**"

    TOPLEVEL_COMPONENT={"oracle.sysman.patchset","10.2.0.5.0"}

    DEINSTALL_LIST={"oracle.sysman.patchset","10.2.0.5.0"}

    SHOW_SPLASH_SCREEN=true

    SHOW_WELCOME_PAGE=false

    SHOW_SUMMARY_PAGE=true

    SHOW_INSTALL_PROGRESS_PAGE=true

    SHOW_REQUIRED_CONFIG_TOOL_PAGE=true

    SHOW_CONFIG_TOOL_PAGE=true

    SHOW_XML_PREREQ_PAGE=true

    SHOW_END_OF_INSTALL_MSGS=true

    SHOW_ROOTSH_CONFIRMATION=true

    SHOW_END_SESSION_PAGE=true

    SHOW_EXIT_CONFIRMATION=false

    sl_pwdInfo="mypwd**"

    n_validate=1

    oracle.iappserver.st_midtier:szl_InstanceInformation="mypwd**"

    ACCEPT_LICENSE_AGREEMENT=true

    DECLINE_SECURITY_UPDATES=true

    紅色標出的內容,需要根據實際情況進行編輯.

    另外要注意的是本文patchset3.rspOMS升級的patchset2.rsp,只有一個地方不相同,就是ORACLE_HOME設定不同,這裡需要設定為agent的安裝目錄

  10. 執行runInstaller命令,進行靜默升級安裝.

    $cd /setup/3731593/Disk1/

    $./runInstaller -ignoreSysPrereqs -silent -noconfig -responseFile /setup/3731593/Disk1/response/patchset3.rsp

    The following configuration scripts need to be executed as the "root" user.

    #!/bin/sh

    #Root script to run

    /oracle/OracleHomes/agent10g/root.sh

    To execute the configuration scripts:

    1. Open a terminal window

    2. Log in as "root"

    3. Run the scripts

    #/oracle/OracleHomes/agent10g/root.sh

    開啟另外一個視窗,使用root身份,執行root.sh.

  11. 靜默方式升級agent10.2.0.5後的一些結果

    [root@ocmdb2 OracleHomes]# du -sm *

    568 agent10g

    1853 oms10g

    可以看到agent10g 子目錄由原來的406M 增加到568M;oms10g沒有任何變化.

  12. 再進行配置前,備份一下GC 10.2.0.5的執行環境

    #cd /setup

    #tar -cvf /setup/gc_10205_noconfig.tar /oracle

    #ps -ef|grep oms

    #ps -ef|grep opmnctl

    #su - oracle

    $opmnctl stopall

    #reboot

    . 執行ConfigureGC.pl命令,進行gc的配置操作

  13. 一次執行ConfigureGC.pl命令,進行gc的配置時遇到的問題描述

    [oracle@ocmdb2 bin]$ $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/sysman/install/ConfigureGC.pl /oracle/OracleHomes

    Base Directory: /oracle/OracleHomes

    No file exists. Can't rename

    Starting ito execute Configuration Assistants:

    Running the configuration assistants using the following command:

    /oracle/OracleHomes/oms10g/oui/bin/runConfig.sh INV_PTR_LOC=/oracle/OracleHomes/oms10g/oraInst.loc ORACLE_HOME=/oracle/OracleHomes/oms10g ACTION=configure MODE=perform COMPONENT_XML={encap_oms.1_0_0_0_0.xml} RESPONSE_FILE=/oracle/OracleHomes/agent10g/responsefile Error occurred during initialization of VM

    Unable to load native library: /oracle/OracleHomes/oms10g/jdk/jre/lib/i386/libjava.so: symbol JVM_GetClassSignature, version SUNWprivate_1.1 not defined in file libjvm.so with link time reference

    Configuration Assistants failed with errors. Please check the above log.

    For more details also check /oracle/OracleHomes/oms10g/cfgtoollogs/cfgfw/CfmLogger_

metalink上查詢not defined in file libjvm.so ,得到一個文件(METALINK.ID=888769.1),該文件說明了這個問題發生的原因及解決辦法,摘錄如下:

Applies to:

Enterprise Manager Grid Control - Version: 10.2.0.3 to 10.2.0.5

This problem can occur on any platform.

Symptoms

Getting the following error message during oc4j instance configuration of Grid Control upgrade:

Error occurred during initialization of VM

Unable to load native library: OMS_HOME/jdk/jre/lib/i386/libjava.so: symbol

JVM_GetClassSignature, version SUNWprivate_1.1 not defined in file libjvm.so

Cause

1. The issue might occur if the runInstaller for upgrade is involked after setting the LD_LIBRARY_PATH.

2. The issue might occur if PATH environment variable contains pointers to other oracle products.

3. This issue will also occur if the following parameter is passed as flag with runInstaller during upgrade of OMS to 10.2.0.5:

use_prereq_checker=false

Solution

Unset LD_LIBRARY_PATH variable.

Remove reference of other oracle variables from PATH variables.

Now revert back to previous OMS version and try for upgrade.

The following parameter should not be passed with runInstaller during upgrade to 10.2.0.5:

use_prereq_checker=false

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/32980/viewspace-1036523/,如需轉載,請註明出處,否則將追究法律責任。

相關文章