安裝Grid Control

pxbibm發表於2014-07-22

GC的安裝大致分成3步驟:

1、在奇數機建立repository database

2、在偶數機安裝gc

3、在奇數機安裝agent

根據考試題目的要求,GC的建立是使用一個已經存在的資料庫(using a exsit database)作為資料庫(repository database)的。因此,題目會要求建立一個新的database(EMREP),這個database沒有要求是用OUI建立還是命令列建立,可以根據個人習慣。我個人比較喜歡命令列,覺得簡單直接而且速度快。下面我們先來建立這個database。
注意建庫時的字符集。
 
一、repository database的建立。

之前我們就已經手工建立過一個database,因此在建立repository database(EMREP)的時候,很多可以參考。

1、export ORACLE_SID=EMREP
 
2、建立EMREP的密碼檔案

3、拷貝原來的initPROD.ora為initEMREP.ora

4、修改initEMREP.ora中的db_name,各個xxx_dump_dest的路徑,修改control_files的路徑。
 
5、建立xxx_dump_dest的路徑。

6、用這個pfile啟動資料庫到nomount,然後參考用之前用的create database語句建立資料庫。
CREATE DATABASE EMREP
USER SYS IDENTIFIED BY oracle
USER SYSTEM IDENTIFIED BY oracle
LOGFILE GROUP 1 ('/u01/oracle/oradata/EMREP/redo01.log') SIZE 100M,
GROUP 2 ('/u01/oracle/oradata/EMREP/redo02.log') SIZE 100M,
GROUP 3 ('/u01/oracle/oradata/EMREP/redo03.log') SIZE 100M,
GROUP 4 ('/u01/oracle/oradata/EMREP/redo04.log') SIZE 100M,
GROUP 5 ('/u01/oracle/oradata/EMREP/redo05.log') SIZE 100M --建立多組日誌,
分佈在不同磁碟上
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
MAXINSTANCES 1
CHARACTER SET US7ASCII
NATIONAL CHARACTER SET AL16UTF16
DATAFILE '/u01/oracle/oradata/EMREP/system01.dbf' SIZE 200M REUSE AUTOEXTEND
ON --修改表空間預設大小新增自動擴充套件屬性
EXTENT MANAGEMENT LOCAL --本地管理表空間
SYSAUX DATAFILE '/u01/oracle/oradata/EMREP/sysaux01.dbf' SIZE 100M REUSE --新增自
動擴充套件屬性
DEFAULT TABLESPACE tbs_1 刪除該內容
DEFAULT TEMPORARY TABLESPACE tempts1
TEMPFILE '/u01/oracle/oradata/EMREP/temp01.dbf'
SIZE 20M REUSE AUTOEXTEND ON
UNDO TABLESPACE undotbs --注意undo 表空間的名稱
DATAFILE '/u01/oracle/oradata/EMREP/undotbs01.dbf'
SIZE 200M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

7、@?/rdbms/admin/catalog

8、@?/rdbms/admin/catproc

9、@?/rdbms/admin/dbmspool
10、alter system register;註冊偵聽。
 

二、建立gc

1、檢查/etc/hosts是否正確。建議可以如下:

# Do not remove the
following line, or various programs

# that require network functionality will fail.

127.0.0.1       localhost.localdomain   localhost



192.168.0.101ldomain      oc

2、root許可權下執行xhost +

3、進gc的安裝程式,./runInstaller

4、安裝截圖:
 
4.1
 安裝Grid Control

4.2
 
安裝Grid Control
4.3


安裝Grid Control

 

4.4

安裝Grid Control
 
注意這裡可能會有個報錯:openmotif21-2.1.30-11.RHEL4.4; found Not
found.這個可以不管,因為這個包是個gc的一個demo有關,我們不安裝demo。

4.5

安裝Grid Control 
在這裡,我們要注意修改路徑為奇數機的repository database資料檔案的路徑。不然後面在configure gc的時候,在經過漫長的等待,會報錯。

而且在報錯資訊中很難找到錯誤的原因:INFO: The
"/oracle/app/oracle/OracleHomes/agent10g/cfgtoollogs/configToolFailedCommands"
script contains all commands that failed, were skipped or were cancelled. This
file may be used to run these configuration assistants outside of OUI. Note
that you may have to update this script with passwords (if any) before
executing the same.
 
安裝Grid Control
這個時候,你去看/oracle/app/oracle/OracleHomes/agent10g/cfgtoollogs/configToolFailedCommands,只能發現。這個資訊不是有用的資訊:

[root@ocmdb2 logs]# cat
/oracle/app/oracle/OracleHomes/oms10g/cfgtoollogs/configToolFailedCommands

# Copyright (c) 1999, 2009, Oracle. All rights reserved.

oracle.sysman.emcp.oms.OmsPlugIn -configureOms

其實,你應該去找/oracle/app/oracle/OracleHomes/oms10g/cfgtoollogs/emca_repos_createxx_xx_xx.log

如果你的資料檔案的路徑沒有配正確,你會在這個log中發現:

ERROR at line 1:

ORA-01119: error in creating database file

'/oracle/app/oracle/OracleHomes/oms10g/oradata/mgmt.dbf'

ORA-27040: file create error, unable to create file

Linux Error: 2: No such file or directory

ORA-06512: at line 44

要是之前沒配對,在這個時候再去改,就來不及了。


4.6

安裝Grid Control 
 
修改一下pfile中的一些引數
通過修改spfile檔案的方法調整該三個引數
SQL> alter system set session_cached_cursors = 201 scope=spfile;

System altered.

SQL> alter system set job_queue_processes = 11 scope=spfile;

System altered.

SQL> alter system set open_cursors = 301 scope=spfile;

System altered.

4.7

安裝Grid Control
 
4.8

安裝Grid Control 

4.9




安裝Grid Control


4.10
 
安裝Grid Control 

4.11
 
 
安裝Grid Control 
執行allroot.sh
 

4.12
 
 安裝Grid Control

4.13
 
安裝Grid Control 
 
大功告成!


三、安裝agent

我們用agentDownload指令碼來跑。

agentDownload的指令碼在剛剛安裝完gc的偶數機的$OMS_HOME下的sysman/agent_download/version/os/agentDownload.os,形如:/oracle/app/oracle/OracleHomes/oms10g/sysman/agent_download/10.2.0.1.0/linux/agentDownload.linux

把這個指令碼cp到奇數機下。開始安裝:

1、chmod +x agentDownload.linux

2、測試prerequisite是否滿足:

2.1測試jar能否執行,不然執行的話,find / -name jar把找到的路徑發到PATH中。

2.2測試wget能否執行。這個一般不是問題,如果不能,方法同上,加到PATH中。

2.3不需要sshUserSetup.sh,這個是圖形化的agent deploy才需要的。agentDownload不需要。

3、執行./agentDownload.linux -b你希望安裝agent的目錄,形如./agentDownload.linux -b /oracle/app/oracle/agent

4、在一系列下載、解包、靜默安裝之後,agent安裝完畢。記得執行root.sh,不然後面會死的很慘。

/oracle/app/oracle/agent/agent10g/root.sh

如果,沒有執行,那麼,在gc的target-database-configure時就會:

安裝Grid Control


這個問題,我一直沒發現,也找了好多資料嘗試去繞過這個問題,如修改/oracle/app/oracle/OracleHomes/oms10g/sysman/config/emoms.properties中的oracle.sysman.emSDK.svlt.PublicServletEnabled引數。

後來刪除agent10g下的所有檔案,嘗試重灌agent,發現無法重灌,總是報錯:Completed with Status=255,而且不會再次生成agent10g的資料夾。

最後是通過刪除oraInventory目錄,再次執行agentDownload才搞定。

5、檢查agent狀態,在agent10g/bin下,注意一定要到這個目錄下,哪怕你配置了PATH,在這個目錄下執行:

[oracle@ocmdb1 bin]$ ./emctl status agent

Oracle Enterprise Manager 10g Release 10.2.0.1.0.

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

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

Agent Version : 10.2.0.1.0

OMS Version : 10.2.0.1.0

Protocol Version : 10.2.0.0.0

Agent Home : /oracle/app/oracle/agent/agent10g

Agent binaries : /oracle/app/oracle/agent/agent10g

Agent Process ID : 9385

Parent Process ID : 9361

Agent URL : https://localhost.localdomain:3872/emd/main/

Repository URL : https://ocmdb2.localdomain:1159/em/upload

Started at : 2014-07-22 11:25:01

Started by user : oracle

07-22

Last successful upload : 2014-07-22 11:30:30
 
Total Megabytes of XML files uploaded so far : 5.76

Number of XML files pending upload : 0

Size of XML files pending upload(MB) : 0.00

Available disk space on upload filesystem : 26.93%

Last successful heartbeat to OMS : 2014-07-22 11:50:30
 
---------------------------------------------------------------

Agent is Running and Ready
 

說明正常。

四、配置target database:

1、在偶數機上開啟firefox,http://machinename:4889/em

2、看圖說話:

2.1
 
安裝Grid Control
 2.2
 
 
安裝Grid Control
 

2.3

安裝Grid Control
 




pxboracle@live.com
2014.07.22 12:10
share you knowledge with the world. 
 
 
 


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

相關文章