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

djb1008發表於2010-08-03
使用靜默方式(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的執行狀態,登入GCem管理介面。

[@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 SERVERoracle使用者的引數檔案

$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使用者,如果仍然存在,可以執行下面的命令,進行手工的清楚.(oracle10gemca ..-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的下載地址:

檔名稱為: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) 的路徑.

配置檔案有關emailmetalink的配置,這裡不設定,所以將這些內容都遮蔽了.

. 進行靜默安裝,選擇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狀態,登入GCem管理介面

$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中開啟

登入介面裡輸入sysman/pwdofsysman,登入到GC的管理介面

安裝到最後階段

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

相關文章