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

本文主要描述在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上执行)

编辑 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"

红色标出的内容,是需要根据实际情况,进行手工编辑的.

进行静默的安装

$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

安装完成 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

升级前对 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上执行)

解压缩 patch 安装文件

$cd /setup

$unzip p3731593_10205_LINUX.zip

编辑 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

红色标出的内容,需要根据实际情况进行编辑.

运行命令 , 使用静默方式升级 OMS 10.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

静默方式升级 OMS 10.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上执行)

编辑 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的安装目录

运行 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.

静默方式升级 agent 10.2.0.5 后的一些结果

[root@ocmdb2 OracleHomes]# du -sm *

568 agent10g

1853 oms10g

可以看到agent10g 子目录由原来的406M 增加到568M;oms10g没有任何变化.

再进行配置前 , 备份一下 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的配置操作

一次运行 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/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/32980/viewspace-1036523/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值