1.计划:
.用DBCA在dbserver1机上创建用于存储OMS需要的Repository信息的库:gcomsdb
.在dbserver2机上创建grid control
.在dbserver1上安装agent
2.在dbserver1上安装Repository库
dbca建库
Dispatchersset to null
aq_tm_processes> 0
session_cache_cursors> 200
dbms_shared_poolbuilt-in package must be previously installed ,
sysmanschema does not already exist (preferred)
SGA_TARGET= 300M
关于AQ_TM_PROCESSES:
AQ_TM_PROCESSESenables time monitoring of queue messages. The times can be used in messagesthat specify delay and expiration properties. Values from 1 to 10 specify thenumber of queue monitor processes created to monitor the messages. IfAQ_TM_PROCESSES is not specified or is set to 0, then the queue monitor is notcreated.
操作:
dbca
alter system set aq_tm_processes=5scope=spfile;
alter system set session_cached_cursors=200scope=spfile;
alter system set sga_target=300mscope=spfile;
alter system set dispatchers='' scope=both;
$ORACLE_HOME/rdbms/admin/dbmspool.sql
3.在dbserver2机上安装GC
准备安装介质:gc_102011_linux.zip
安装:
1)
2)
3)
4)
里面的错误和警告:
Checking for libstdc++-devel-3.4.3-22.1;found Not found. Failed<<<<
Checking for the Hostname...
Check complete. The overall result of thischeck is: Failed <<<<
Problem: The host name in /etc/hosts is notproper.
Recommendation: Please verify the hostnamein /etc/hosts. The /etc/hosts might either contain short host name or ipaddress instead of full host name.
解决过程:
[root@dbserver2 RPMS]# rpm -ivh libstdc++-devel-3.4.6-11.i386.rpm
warning: libstdc++-devel-3.4.6-11.i386.rpm:V3 DSA signature: NOKEY, key ID 443e1821
Preparing... ########################################### [100%]
1:libstdc++-devel ########################################### [100%]
[root@dbserver2 RPMS]#
将hosts中的内容由
10.xx.xx.184 dbserver2 dbserver2
修改为:
10.xx.xx.184 dbserver2.domain dbserver2
重新检测后发现hostname问题仍未解决,没弄清楚问题原因,想不到解决办法,暂时忽略:
第二次安装时正常,如下:(机器重启过)
[root@dbserver2 ~]# more /etc/hosts
# Do not remove the following line, orvarious programs
# that require network functionality willfail.
127.0.0.1 localhost.localdomain localhost
10.xx.xx.183 dbserver1.domain dbserver1
10.xx.xx.184 dbserver2.domain dbserver2
[root@dbserver2 ~]# hostname
dbserver2
5)
经检查是监听有问题,解决后如下:
过一会重试后正常,如下:
specify a raw device,if needs to be usedfor tablespace locations
出现上面的警告信息,忽略。
因为之前用DBCA创建的gcomsdb,创建时按默认勾选了data control选项,需要手卸载。
应该在DBCA时去掉data control选项。
[oracle@dbserver1 admin]$ exportORACLE_SID=gcomsdb
[oracle@dbserver1 admin]$ emca -deconfigdbcontrol db -repos drop
STARTED EMCA at Apr 13, 2012 1:23:12 PM
EM Configuration Assistant, Version10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: gcomsdb
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]:yes
Apr 13, 2012 1:23:20 PMoracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at/apps/oracle/product/10.2.0/db_1/cfgtoollogs/emca/gcomsdb/emca_2012-04-13_01-23-12-PM.log.
Apr 13, 2012 1:23:21 PMoracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this maytake a while) ...
Apr 13, 2012 1:23:35 PMoracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this maytake a while) ...
Apr 13, 2012 1:25:07 PMoracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completedsuccessfully
FINISHED EMCA at Apr 13, 2012 1:25:08 PM
[oracle@dbserver1 admin]$
6)
7)
8)
9)
[root@dbserver2 ~]#/apps/oracle/oraInventory/orainstRoot.sh
Changing permissions of/apps/oracle/oraInventory to 770.
Changing groupname of/apps/oracle/oraInventory to oinstall.
The execution of the script is complete
[root@dbserver2 ~]#/apps/oracle/OracleHomes/oms10g/allroot.sh
Starting to execute allroot.sh .........
Starting to execute/apps/oracle/OracleHomes/oms10g/root.sh ......
Running Oracle10 root.sh script...
\nThe following environment variables areset as:
ORACLE_OWNER= oracle
ORACLE_HOME= /apps/oracle/OracleHomes/oms10g
Enter the full pathname of the local bindirectory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
\nCreating /etc/oratab file...
Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratabfile as needed by
Database Configuration Assistant when adatabase is created
Finished running generic part of root.shscript.
Now product-specific root actions will beperformed.
Finished execution of /apps/oracle/OracleHomes/oms10g/root.sh......
Starting to execute /apps/oracle/OracleHomes/agent10g/root.sh......
Running Oracle10 root.sh script...
The following environment variables are setas:
ORACLE_OWNER= oracle
ORACLE_HOME= /apps/oracle/OracleHomes/agent10g
Enter the full pathname of the local bindirectory: [/usr/local/bin]:
The file "dbhome" already existsin /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "oraenv" already existsin /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "coraenv" already existsin /usr/local/bin. Overwrite it? (y/n)
[n]:
Entries will be added to the /etc/oratabfile as needed by
Database Configuration Assistant when adatabase is created
Finished running generic part of root.shscript.
Now product-specific root actions will beperformed.
Finished product-specific root actions.
Finished execution of /apps/oracle/OracleHomes/agent10g/root.sh......
[root@dbserver2 ~]#
10)
连接测试:
4.在dbserver1上安装agent
拷贝agentDownload.linux
[oracle@dbserver1 oracle]$
wgethttp://dbserver2:4889/agent_download/10.2.0.1.0/linux/agentDownload.linux
--17:43:58-- http://dbserver2:4889/agent_download/10.2.0.1.0/linux/agentDownload.linux
=> `agentDownload.linux'
Resolving dbserver2... 10.27.76.184
Connecting to dbserver2|10.27.76.184|:4889...connected.
HTTP request sent, awaiting response... 200OK
Length: 22,783 (22K) [text/plain]
100%[====================================>]22,783 --.--K/s
17:43:58 (3.06 MB/s) -`agentDownload.linux' saved [22783/22783]
修改权限:
[oracle@dbserver1 agent10]$ chmod +xagentDownload.linux
设置JAVA环境:
[oracle@dbserver1 jdk]$ exportJAVA_HOME=$ORACLE_HOME/jdk
[oracle@dbserver1 jdk]$ exportPATH=$PATH:$JAVA_HOME/bin
安装
[oracle@dbserver1 agent10]$./agentDownload.linux -b /apps/oracle/OracleHomes
[root@dbserver1 ~]#/apps/oracle/agent10g/root.sh
启动agent
安装认证:
[oracle@dbserver1 bin]$ ./emctl secure agent