ITPub博客

首页 > 数据库 > Oracle > Using Silent Mode to Install Oracle Enterprise Manager Grid Control 10.2.0.1.1 Using an Existing Da

Using Silent Mode to Install Oracle Enterprise Manager Grid Control 10.2.0.1.1 Using an Existing Da

原创 Oracle 作者:djb1008 时间:2010-08-03 11:44:46 0 删除 编辑
使用静默方式(silent)安装grid control,可以不用使用X-Windows,或者其它的图形软件,不用设置DISPLAY等,适合于很多端口限制很严和安全性要求很高的环境.

静默方式(silent)安装的基本步骤为:

一. OMS SERVER环境准备,REPOSITORY DB环境准备.

二. 下载安装程序,解压缩到安装目录

三. 编辑静默安装的responeFile,设置OMS的路径,repos db的参数,SecurePWD.

四. 运行runInstaller -silent -noconfig -responentFile…进行静默安装,使用noconfig参数,只安装软件,不进行配置操作,在升级安装中noconfig常常被用到,一般安装10.2.0.1,升级到10.2.0.3,升级到10.2.0.5等新版本后,才执行后面的config操作,这样就省去升级repository db对象的操作。

五. 运行runConfig.sh进行软件安装后的配置,包括OMS的配置,repository db对象的创建。

六. 检查opmn的运行状态,登录GC的em管理界面。

[@more@]

GC 的基本配置:

1.OMS Server 1台(虚拟机)

2.RepositoryDB Server 1台(笔记本)

3.OS: RHEL5.4_X86

4.Repository Database: 10.2.0.1

5. OMS:10.2.0.1 X86

6.AGENT:10.2.0.1.1

一. OMS SERVER环境准备,REPOSITORY DB环境准备

1. 配置OMS SERVER 的ORACLE 用户环境

groupadd oinstall

groupadd dba

useradd -m -g oinstall -G dba oracle

2.配置OMS SERVER的oracle用户的参数文件

$more /home/oracle/.bash_profile

export TMP=/tmp

export TMPDIR=$TMP

eExport ORACLE_BASE=/oracle/OracleHomes

export ORACLE_HOME=$ORACLE_BASE/oms10g

export OMS_HOME=$ORACLE_BASE/oms10g

export ORACLE_SID=AIDU

export ORACLE_TERM=xterm

export AGENT_HOME=$ORACLE_BASE/agent10g

export LD_LIBRARY_PATH=$OMS_HOME/perl/lib/5.6.1:$OMS_HOME/opmn/lib:$OMS_HOME/lib:/lib64:/usr/lib64:/usr/local/lib64:$AGENT_HOME/lib:

/lib:/usr/lib:/usr/local/lib:$OMS_HOME/Apache/Apache/bin

export PERL5LIB=$OMS_HOME/perl/lib/5.6.1

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$OMS_HOME/Apache/Apache/bin

export PATH=$OMS_HOME/bin:$OMS_HOME/opmn/bin:$AGENT_HOME/bin:$OMS_HOME/bin:$OMS_HOME/Apache/Apache/bin:$PATH:.

export NLS_DATE_FORMAT='YYYY-MM-DD HH24:MI:SS'

if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

3. 配置OMS SERVER系统环境

#more /etc/security/limits.conf

。。。。。。

* soft nproc 2047

* hard nproc 16384

* soft nofile 1024

* hard nofile 65536

#more /etc/sysctl.conf

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

# semaphores: semmsl, semmns, semopm, semmni

kernel.sem = 250 32000 100 128

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default=262144

net.core.rmem_max=262144

net.core.wmem_default=262144

net.core.wmem_max=262144

#/sbin/sysctl -p

运行下面命令使设置生效/sbin/sysctl -p

#vi /etc/pam.d/login

session required /lib/security/pam_limits.so

增加上面一行内容.

另外需要注意的是:

/tmp 目录保持1.3G空间;$OMS_HOME 保持2.5G 的剩余空间.

4.REPOSTORY DB SERVER的配置

Table 8-9 Fixed Initialization Parameter Values

Parameter

Value

job_queue_processes

10

db_block_size

8192

timed_statistics

TRUE

open_cursors

300

session_cached_cursors

200

aq_tm_processes

1

compatible

(default)

undo_management

AUTO

undo_retention

10800

undo_tablespace

processes

150

log_buffer

1048576

statistics_level

TYPICAL (Note that this value is specific only to Enterprise Manager 10g Repository Database release and later.)

TEMP space (Tablespace)Foot 1

50 MB (extending to 100 MB)

_b_tree_bitmap_plans

false (hidden parameter)

Repostory db:

alter system set job_queue_processes=10 scope=spfile;

Alter system set timed_statistics=TRUE scope=spfile;

Alter system set open_cursors=300 scope=spfile;

Alter system set session_cached_cursors=200 scope=spfile;

Alter system set aq_tm_processes=1 scope=spfile;

Alter system set undo_management=auto scope=spfile;

Alter system set undo_retention=10800 scope=spfile;

Alter system set processes=150 scope=spfile;

Alter system set log_buffer=1048576 scope=spfile;

Alter system set statistics_level=TYPICAL scope=spfile;

重新启动repostory db,使上面的参数生效.

在安装之前,需要删除REPOSITORY DB资料的信息,具体操作如下:

ON REPOSTITORY DB:

To install Enterprise Manager Grid Control using an existing database, follow these steps:

  1. If your existing database is configured with Database Control, then ensure that you deconfigure it before you begin the installation of Grid Control.
    To deconfigure Database Control for a single instance database, run the following command:
    /bin/emca -deconfig dbcontrol db -repos drop


    To deconfigure Database Control for a Real Application Clusters (RAC) database, run the following command:
    /bin/emca -deconfig dbcontrol db -repos drop - cluster

    After deconfiguring the Database Control, connect to the database as SYS user and run the following SQL files from the Oracle home of the database:
    /rdbms/admin/dbmspool.sql

Dbmspool.sql 脚本建立了gc需要的对象,不运行则运行安装时会出错.

rdbms/admin/prvtpool.plbNote:The command drops all the public synonyms starting with the following names created by any user for any schema:

  • 'MGMT$%'
  • 'MGMT_%'
  • 'SMP_EMD%'
  • 'SMP_MGMT%'
  • 'SETEMVIEWUSERCONTEXT'
  • 'DBMS_SHARED_POOL'
  • 'EMD_MNTR'
  • 'ECM_UTIL'

最后最好在repostory db上检查,是否还存在sysman用户,如果仍然存在,可以运行下面的命令,进行手工的清楚.(oracle10g的emca ..-repos drop的命令可以完成删除的任务,可以信赖)

drop user sysman cascade;

drop role MGMT_USER;

drop user MGMT_VIEW cascade;

drop public synonym MGMT_TARGET_BLACKOUTS;

drop public synonym SETEMVIEWUSERCONTEXT;

5. 在OMS SERVER上创建一个文件连接,安装部分程序包

#ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2

#chmod 755 /usr/lib/libgdbm.so.2.0.0

#chmod 755 /usr/lib/libdb.so.2

#rpm -Uvh libXp-1.0.0.-8.1.el5.i386.rpm

安装libXP包,用于启动X_Windows,如果使用slient安装,则不需要安装这个包

#rpm -Uvh compat-db-4.1.25-9

#rpm -Uvh openmotif-2.3.1-2.el5.i386.rpm

#rpm -Uvh pdksh-5.2.14-36.el5.i386.rpm

安装GC时系统检查提示需要安装的包.

二. 下载安装程序,解压缩到安装目录

oracle grid control 10g for linux x86 的full版本是10.2.0.1.1,而不像gc 10g for linux x86_64的高full版本是10.2.0.3.

oracle grid control 10g for linux x86_10.2.0.1.1的下载地址:

http://www.oracle.com/technetwork/oem/grid-control/downloads/linuxsoft-099441.html

文件名称为:gc_102011_linux.zip

$cd /setup

$ls

gc_102011_linux.zip

$unzip gc_102011_linux.zip

$ls

gc_102011_linux.zip

Disk1

三. 编辑静默安装的参数文件.

$cp /setup/Disk1/responent/em_using_existing_db.rsp /oracle

$cd /oracle

$cat em_using_existing_db.rsp|grep -v ^#|grep -v ^$>em_using_existing_db_new.rsp

如果你不想看太多的参数说明文档,对文件的配置项已经非常熟悉,可以通过上面的命令,去除参数说明内容,使得文件内容更加简洁和易于编辑.

[oracle@ocmdb2 oracle]$ more em_using_existing_db_new.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="pwd00pwd"

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

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

b_emailSelected=false

b_metalinkSelected=false

s_securePassword="pwd01pwd"

s_securePasswordConfirm="pwd01pwd"

b_lockedSelected=false

s_reposPwd="pwdofsysman"

s_reposPwdConfirm="pwdofsysman"

n_firstInstanceValidation=2

n_firstReposValidation=1

n_firstReposPwdValidation=2

n_firstSecureValidation=2

n_firstVldnEmailSer=2

b_upgrade=false

b_showOptConfigPage=TRUE

s_installType="NOSEED"

红色显示的内容,是需要根据实际情况进行设置的,这里需要提起注意的是两个数据库文件的设置,文件的路径是repository db服务器上的路径,而不是本机(oms server) 的路径.

配置文件有关email和metalink的配置,这里不设置,所以将这些内容都屏蔽了.

四. 进行静默安装,选择noconfig的方式.

noconfig 选择项一定与slient选择项一起使用的(the noconfig option must be executed only during silent installations.)

$cd /setup/Disk1/

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

命令中的use_prereq_checker=false 设置了在OUI安装时,不进行prereq check.

安装过程的日志文件存放在/oracle/oraInventory/logs目录下.

$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

-rw------- 1 oracle oinstall 5983 Aug 2 22:17 oraInstall2010-08-02_10-15-11-PM.out

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

-rw------- 1 oracle oinstall 13578 Aug 2 22:15 oraInstall2010-08-02_10-05-55PM.out

-rw------- 1 oracle oinstall 0 Aug 2 22:15 oraInstall2010-08-02_10-15-11-PM.err

-rw------- 1 oracle oinstall 1696833 Aug 2 22:15 installActions2010-08-02_10-05-55PM.log

-rw------- 1 oracle oinstall 340 Aug 2 22:15 silentInstall2010-08-02_10-05-55PM.log

-rw------- 1 oracle oinstall 50 Aug 2 22:13 oraInstall2010-08-02_10-05-55PM.err

主要要关注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

。。。。。。

INFO: cf session retrieved for key: oms10g oracle.sysman.top.oms

INFO: Created a new file /oracle/OracleHomes/oms10g/cfgtoollogs/configToolAllCommands

INFO: Since the option is to overwrite the existing /oracle/OracleHomes/oms10g/cfgtoollogs/configToolAllCommands file, backing it up

INFO: The backed up file name is /oracle/OracleHomes/oms10g/cfgtoollogs/configToolAllCommands.bak

INFO: ca page to be shown: false

INFO: exitonly tools to be excuted passed: 0

*** End of Installation Page***

The installation of Oracle Enterprise Manager Grid Console was successful.

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

五. OMS 初始化配置

运行runConfig.sh进行软件安装后的配置,包括OMS的配置,repository db对象的创建。

$cd $ORACLE_HOME/oui/bin/

[oracle@ocmdb2 bin]$ pwd

/oracle/OracleHomes/oms10g/oui/bin

[oracle@ocmdb2 bin]$ ls

addLangs.sh attachHome.sh lsnodes ouica.sh runConfig.sh runInstaller.sh

addNode.sh detachHome.sh ouica.bat resource runInstaller

[oracle@ocmdb2 bin]$ ./runConfig.sh ORACLE_HOME=/oracle/OracleHomes/oms10g ACTION=configure MODE=perform COMPONENT_XML={encap_oms.1_0_0_0_0.xml}

perform - mode is starting for action: configure

安装配置过程中,我们可以在查看两个目录下的日志,随时检测配置的情况.

/oracle/oraInventory/logs

$ORACLE_HOME/sysman/log

六. 检查OMS,OPMN状态,登录GC的em管理界面

$cd $ORACLE_HOME/bin

$./emctl status oms

Oracle Enterprise Manager 10g Release 10.2.0.1.0

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

在IE中打开https://ocmdb2:1159/em

登录界面里输入sysman/pwdofsysman,登录到GC的管理界面

安装到最后阶段

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/32980/viewspace-1035929/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-07-27

  • 博文量
    175
  • 访问量
    778870