Step By Step Install Oracle GC 10.2.0.5 on Redhat Linux 5.5 x86_64 (2/2)

djb1008發表於2010-08-13

1. 執行安裝目錄的runInstaller命令,進行靜默安裝

noconfig 選擇項一定與slient選擇項一起使用的(the noconfig option must be executed only during silent installations.)

$cd /setup/Disk1/

$./runInstaller -noconfig -ignoreSysPrereqs -silent -responseFile /oracle/em_using_existing_db_new.rsp use_prereq_checker=false -force

命令中的use_prereq_checker=false 設定了在OUI安裝時,不進行prereq check.

[@more@]

2. 安裝過程中,檢視安裝日誌檔案動態內容

安裝過程的日誌檔案存放在/oracle/oraInventory/logs目錄下.

$tail -f /oracle/oraInventory/logs/installActions.log

$cd /oracle/oraInventory/logs

$ls -lt

total 2200

-rw------- 1 oracle oinstall 12824 Aug 2 22:51 OPatch2010-08-02_10-51-24-PM.log

-rw------- 1 oracle oinstall 12799 Aug 2 22:51 OPatch2010-08-02_10-51-05-PM.log

-rw------- 1 oracle oinstall 391058 Aug 2 22:17 installActions2010-08-02_10-15-11-PM.log

主要要關注installActions$timestame.log 檔案.

$tail -f installActions2010-08-02_10-05-55PM.log

Using paramFile: /setup/Disk1/install/oraparam.ini

Checking installer requirements...

Checking operating system version: must be enterprise-4, enterprise-5, redhat-3, redhat-4, redhat

-5, redhat-5.1, SuSE-9, SuSE-10, UnitedLinux-1.0, asianux-1 or asianux-2

Passed

All installer requirements met.

The commandline for unzip:

/setup/Disk1/install/unzip -qqqo ../stage/Components/oracle.swd.jre/1.4.2.14.0/1/DataFiles/*.jar

-d /tmp/OraInstall2010-08-02_10-05-55PM

。。。。。。

The installation of Oracle Enterprise Manager Grid Console was successful.

INFO: Path To 'globalcontext.xml' = /oracle/OracleHomes/oms10g/install/chainedInstall/globalcontext

  1. 安裝程式執行到最後,使用root身份執行3個檔案:

#!/bin/sh

#Root script to run

/oracle/OracleHomes/oraInventory/orainstRoot.sh

/oracle/OracleHomes/oms10g/allroot.sh

/oracle/OracleHomes/agent10g/root.sh

To execute the configuration scripts:

1. Open a terminal window

2. Log in as "root"

3. Run the scripts

。。。。。。

[root@oms ~]# /oracle/OracleHomes/oraInventory/orainstRoot.sh

Changing permissions of /oracle/OracleHomes/oraInventory to 770.

Changing groupname of /oracle/OracleHomes/oraInventory to oinstall.

The execution of the script is complete

[root@oms ~]# /oracle/OracleHomes/oms10g/allroot.sh

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

。。。。。。

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

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

[root@oms ~]# /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

。。。。。。

  1. 安裝完成GC 10.2.0.3軟體後,檢查相關結果

[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

$ 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

$ opmnctl stopall

opmnctl: stopping opmn and all managed processes...

$ ps -ef|grep opmn

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

$cd $ORACLE_BASE

$pwd

/oracle/OracleHomes

$ du -sm *

449 agent10g

1491 oms10g

9 oraInventory

安裝GC 10.2.0.3_X86_64 後的目錄空間佔用情況,這個可以和後面升級結果做一個比較.

  1. 停止opmnctl,禁止os啟動時啟動omsagent

停止opmnctl,

[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

  1. 升級前對GC 10.2.0.3做一個軟體目錄全備份

安裝完10.2.0.3,最好在升級前進行一次目錄備份,這樣升級過程中如果出現問題,就可以使用這個備份進行恢復了(注意軟體目錄備份要包括oraInventory目錄)

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

#reboot

升級前,如果時間允許,建議重新啟動一次OS

. Patch OMS AND AGENT FROM 10.2.0.3 TO 10.2.0.5 (OMS Server上執行)

  1. 解壓縮patch安裝檔案

$cd /setup

$unzip gc_x86_64_10205_part2of2.zip

$unzip p3731593_10205_LINUX.zip

這裡需要說明一下,oracle10.2.0.5_x86_64patch是兩個檔案,在這裡只需要使用gc_x86_64_10205_part2of2.zip檔案,解壓縮後,得到P3731593補丁集,這個補丁集可以完成3個元件的升級任務,分別是:

- p3731593_10205_.zip is the ZIP file that contains 10.2.0.5 patch set software.

This zip can be used for:

- Upgrading Oracle Management Service Release 2 (10.2.0.3) or higher to Oracle Management Service Release 5 (10.2.0.5)

- Upgrading Oracle Management Repository (sysman schema)

- Upgrading Oracle Management Agent on the host where OMS is running.

$cd /setup/3731593/Disk1

/setup/3731593/Disk1是本次補丁包的安裝執行目錄.

  1. 編輯patch oms 需要使用的reponseFile

$cd /setup/3731593/Disk1/response

$cat patchset.rsp |grep -v ^#|grep -v ^$>/oracle/patchset_oms.rsp

$vi /oracle/patchset_oms.rsp

$more /oracle/patchset_oms.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="mypwd99"

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="mypwd99"

n_validate=1

oracle.iappserver.st_midtier:szl_InstanceInformation="mypwd99"

ACCEPT_LICENSE_AGREEMENT=true

b_emailSelected=false

b_metalinkSelected=false

b_proxySelected=false

b_upgrade=false

METALINK_USERNAME=

METALINK_PASSWORD=

PROXY_HOST=

PROXY_PORT=

PROXY_USER=

PROXY_PWD=

DECLINE_SECURITY_UPDATES=true

COLLECTOR_RESPONSE_FILE=

SECURITY_UPDATES_VIA_METALINK=

紅色標出的內容,需要根據實際情況進行編輯;其中ORACLE_HOME的設定決定了是patch oms還是patch agent,如果ORACLE_HOME設定為oms的安裝路徑(/oracle/OracleHomes/oms10g),則升級oms;如果ORACLE_HOME為設定為agent的安裝路徑(/oracle/OracleHomes/agent10g),則升級agent.

  1. 執行runInstaller命令,使用靜默方式patch oms 10.2.0.5

$cd /setup/3731593/Disk1/

$ ./runInstaller -ignoreSysPrereqs -silent -noconfig -responseFile /oracle/patchset_oms.rsp

注意不要再使用full版本安裝時使用到的引數: use_prereq_checker=false -force,否則就將導致配置oms時報"SUNWprivate_1.1 not defined in file libjvm.so"錯誤

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

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

$ cd /oracle/OracleHomes

$ ls

agent10g oms10g oraInventory

$ du -sm *

449 agent10g

1884 oms10g

9 oraInventory

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

  1. 編輯patch agent 需要使用的reponseFile

$cd /oracle

$cp patchset_oms.rsp patchset_agent.rsp

$vi patchset_agent.rsp

$more patchset_agent.rsp

RESPONSEFILE_VERSION=2.2.1.0.0

UNIX_GROUP_NAME=oinstall

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

ORACLE_HOME="/oracle/OracleHomes/agent10g"

。。。。。。

patchset_agent.rsp檔案的絕大部分內容與patchset_oms.rsp相同。就是ORACLE_HOME引數的值修改為"/oracle/OracleHomes/agent10g".

  1. 執行runInstaller命令,使用靜默方式patch agent 10.2.0.5

$cd /setup/3731593/Disk1/

$./runInstaller -ignoreSysPrereqs -silent -noconfig -responseFile /oracle/patchset_agent.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.

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

[root@ocmdb2 OracleHomes]# du -sm *

684 agent10g

1884 oms10g

14 oraInventory

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

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

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

  1. 停止opmnctl,禁止oms自動啟動

$opmnctl stopall

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

#touch /etc/rc.d/init.d/gcstartup.bak

禁止os啟動是啟動omsagent

#reboot

時間允許的話,重新啟動一下os.

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

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

$$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/sysman/install/ConfigureGC.pl /oracle/OracleHomes

檢視配置時的日誌檔案

$cd $ORACLE_HOME/sysman/log

$ pwd

/oracle/OracleHomes/oms10g/sysman/log

$ ls -lt

-rw-r--r-- 1 oracle oinstall 120083 Aug 13 09:43 emoms.log

-rw-r--r-- 1 oracle oinstall 120083 Aug 13 09:43 emoms.trc

-rw-r----- 1 oracle oinstall 33300 Aug 13 09:43 emctl.log

-rw-r--r-- 1 oracle oinstall 132863 Aug 13 09:43 emrepocminst.log.25888

-rw-r--r-- 1 oracle oinstall 87150 Aug 13 09:40 emrepmgr.log.10.2.0.5.0.transx

-rw-r--r-- 1 oracle oinstall 13891 Aug 13 09:27 emrepmgr.log.10.2.0.5.0

-rw-r--r-- 1 oracle oinstall 0 Aug 13 09:27 emrepmgr.log.10.2.0.5.0.errors

-rw-r--r-- 1 oracle oinstall 132863 Aug 13 09:17 emrepocminst.log.23224

-rw-r----- 1 oracle oinstall 11278 Aug 13 09:16 secure.log

drwxr----- 2 oracle oinstall 4096 Aug 13 09:15 pafLogs

-rw-r--r-- 1 oracle oinstall 1320757 Aug 13 09:14 emca_repos_create08_56_49.log

-rw-r----- 1 oracle oinstall 8624 Aug 13 08:55 emdctl.log

-rw-r----- 1 oracle oinstall 10946 Aug 13 08:55 emdctl.trc

$cd $ORACLE_HOME/cfgtoollogs/cfgfw

$pwd

/oracle/OracleHomes/oms10g/cfgtoollogs/cfgfw

$ls -lt

-rw------- 1 oracle oinstall 60399 Aug 6 18:07 CfmLogger_2010-08-06_05-46-28-PM.log

-rw-r--r-- 1 oracle oinstall 254 Aug 6 18:07 emcli_cmd_18_07_13.log2759_OUT.log

-rw------- 1 oracle oinstall 58670 Aug 6 18:07 oracle.sysman.top.oms_2010-08-06_05-46-28-PM.log

-rw-r--r-- 1 oracle oinstall 0 Aug 6 18:07 emcli_cmd_18_07_13.log2760_ERR.log

-rw-r--r-- 1 oracle oinstall 52 Aug 6 18:06 opmn_cmd_18_06_21.log2757_OUT.log

配置需要很長的時間(1個小時的時間); 配置完成後,oms,opmn都啟動起來了.

如果配置過程中,遇到"version SUNWprivate_1.1 not defined in file libjvm.so with link time reference"錯誤,請參看我的部落格文章http://djb1008.itpub.net/post/42280/503669

. 檢查opmn的執行狀態,登入GCem管理介面

  1. 檢查GC配置的結果:

OMS Server:

$opmnctl status

[oracle@ocmdb2 setup]$ opmnctl status

Processes in Instance: EnterpriseManager0.ocmdb2

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

ias-component | process-type | pid | status

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

HTTP_Server | HTTP_Server | 3932 | Alive

LogLoader | logloaderd | N/A | Down

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

OC4J | home | 3933 | Alive

OC4J | OC4J_EM | 3934 | Alive

OC4J | OC4J_EMPROV | 3936 | Alive

WebCache | WebCache | 3944 | Alive

WebCache | WebCacheAdmin | 3940 | Alive

DSA | DSA | N/A | Down

$emctl status oms

Oracle Enterprise Manager 10g Release 5 Grid Control

Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.

Oracle Management Server is Up

Repository DB:

SQL>select username,default_tablespace from dba_users;

USERNAME DEFAULT_TABLESPACE

OUTLN SYSTEM

SYS SYSTEM

SYSTEM SYSTEM

DBSNMP SYSAUX

MGMT_VIEW MGMT_TABLESPACE

SYSMAN MGMT_TABLESPACE

WMSYS SYSAUX

TSMSYS USERS

DIP USERS

ORACLE_OCM USERS

SQL> select name from v$tablespace;

NAME

--------------------------------------------------------------------------------

SYSTEM

UNDOTBS1

SYSAUX

TEMPTS1

USERS

MGMT_TABLESPACE

MGMT_ECM_DEPOT_TS

  1. 登入GC的管理介面

. 配置agent,遠端安裝agent

關於遠端安裝agent,在我的部落格文章中有詳細的說明,請參看

http://djb1008.itpub.net/post/42280/502337

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

相關文章