在操作之前,通过dbca新建数据库,建库后,修改下列参数,可以避免在gc安装过程中的报错。
alter system set dispatchers='' scope=both;
alter system set session_cached_cursors=300 scope=spfile;
alter system set aq_tm_processes=5 scope=both;
@?/rdbms/admin/dbmspool.sql
警告提示为系统包未找到,该错误忽略。
一定要点击 按钮,重新定位表空间的位置。
在dbca建库的时候,没有选择em,仍然提示这个信息。 手工进行卸载操作。
在db主机执行,注意需要删除每个数据库上面的dbcontrol信息。删除完成后,点击OK,继续安装。
[oracle@db bin]$ ./emca -deconfig dbcontrol db -repos drop
STARTED EMCA at Jul 10, 2013 3:04:33 PM
EM Configuration Assistant, Version 10.2.0.1.0 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: emrep
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: Y
Jul 10, 2013 3:04:46 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /oracle/product/10.2.0/db_1/cfgtoollogs/emca/emrep/emca_2013-07-10_03-04-33-PM.log.
Jul 10, 2013 3:04:46 PM oracle.sysman.emcp.EMDBPreConfig performDeconfiguration
WARNING: EM is not configured for this database. No EM-specific actions can be performed.
Jul 10, 2013 3:04:46 PM oracle.sysman.emcp.EMReposConfig dropRepository
INFO: Dropping the EM repository (this may take a while) ...
Jul 10, 2013 3:05:33 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Jul 10, 2013 3:05:33 PM
SQL> show parameter dispatcher;
NAME TYPE VALUE
-------------------- ----------- ------------------------------
dispatchers string (PROTOCOL=TCP)(SERVICE=emdbXD B)
SQL> alter system set dispatchers='' scope=both;
System altered.
SQL> show parameter session_cache;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
session_cached_cursors integer 20
SQL> alter system set session_cached_cursors=300 scope=spfile;
SQL> show parameter aq;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
SQL> alter system set aq_tm_processes=5 scope=both;
System altered.
SQL> @?/rdbms/admin/dbmspool.sql
Package created.
Grant succeeded.
View created.
Package body created.
alter system set dispatchers='' scope=both;
alter system set session_cached_cursors=300 scope=spfile;
alter system set aq_tm_processes=5 scope=both;
@?/rdbms/admin/dbmspool.sql
修改完成后,需要重启数据库,因此建议在建库时就修改好所需参数。
此处的口令,必须为数字和密码的组合方式,不满足条件会报错,因此建议设置为:oracle1。
安装进度在96%左右时,会出现opmn启动错误。
查看日志:/oracle/OracleHomes/oms10g/opmn/logs
[oracle@grid logs]$ ls -lrt
total 12
drwx------ 2 oracle oinstall 4096 Jul 10 15:16 states
-rw-rw---- 1 oracle oinstall 0 Jul 10 15:16 opmn.log
-rw-rw---- 1 oracle oinstall 43 Jul 10 15:16 ons.log
-rw-rw---- 1 oracle oinstall 266 Jul 10 15:16 ipm.log
[oracle@grid logs]$ vi ipm.log
13/07/08 15:42:51 [4] Create pm state directory: /oracle/OracleHomes/oms10g/opmn/logs/states
13/07/08 15:42:51 [4] PM state file does not exist: /oracle/OracleHomes/oms10g/opmn/logs/states/.opmndat
13/07/08 15:42:51 [4] OPMN server ready. Request handling enabled.
手工创建 .opmndat 文件
[oracle@grid states]$ cd /oracle/OracleHomes/oms10g/opmn/logs/states
[oracle@grid states]$ touch .opmndat
[oracle@grid states]$ ls -la
total 8
drwx------ 2 oracle oinstall 4096 Jul 8 16:22 .
drwxr-xr-x 3 oracle oinstall 4096 Jul 8 16:13 ..
-rw-r--r-- 1 oracle oinstall 0 Jul 8 16:22 .opmndat
[oracle@grid opmn]$ cd bin
[oracle@grid bin]$ ./opmnctl status
Processes in Instance: EnterpriseManager0.grid.oracle.com
-------------------+--------------------+---------+---------
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@grid bin]$ ./opmnctl startall
opmnctl: starting opmn and all managed processes...
================================================================================
opmn id=grid.oracle.com:6200
3 of 4 processes started.
ias-instance id=EnterpriseManager0.grid.oracle.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
ias-component/process-type/process-set:
HTTP_Server/HTTP_Server/HTTP_Server
Error
--> Process (pid=29638)
failed to start a managed process after the maximum retry limit
Log:
/oracle/OracleHomes/oms10g/opmn/logs/HTTP_Server~1
查看错误日志:
[oracle@grid bin]$ vi /oracle/OracleHomes/oms10g/opmn/logs/HTTP_Server~1
--------
13/07/10 15:19:20 Start process
--------
/oracle/OracleHomes/oms10g/Apache/Apache/bin/apachectl start: execing httpd
/oracle/OracleHomes/oms10g/Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory
--------
13/07/10 15:19:20 Start process
--------
/oracle/OracleHomes/oms10g/Apache/Apache/bin/apachectl start: execing httpd
/oracle/OracleHomes/oms10g/Apache/Apache/bin/httpd: error while loading shared libraries: libdb.so.2: cannot open shared object file: No such file or directory
使用root用户创建连接:
ln -s /usr/lib/libgdbm.so.2.0.0 /usr/lib/libdb.so.2
再次执行startall操作:
[oracle@grid bin]$ ./opmnctl startall
opmnctl: starting opmn and all managed processes...
查看进程的启动状态:
[oracle@grid bin]$ ./opmnctl status
Processes in Instance: EnterpriseManager0.grid.oracle.com
-------------------+--------------------+---------+---------
ias-component | process-type | pid | status
-------------------+--------------------+---------+---------
DSA | DSA | N/A | Down
HTTP_Server | HTTP_Server | 29701 | Alive
LogLoader | logloaderd | N/A | Down
dcm-daemon | dcm-daemon | N/A | Down
OC4J | home | 29631 | Alive
WebCache | WebCache | 29643 | Alive
WebCache | WebCacheAdmin | 29637 | Alive
点击继续按钮,而不是retry按钮。进行安装的完成。
配置过程较长,注意观察日志,防止出现异常。
[oracle@grid ~]$ tail -f /oracle/oraInventory/logs/installActions2013-072-28-PM.log
OPatch succeeded.
Applying of patch /oracle/OracleHomes/oms10g/install/oneoffs/p8430622_102010_GENERIC.zip completed successfully
INFO: Configuration assistant "EM Technology Stack Upgrade" succeeded
INFO: Command = oracle.sysman.emcp.oms.OmsPlugIn -configureOms
Operation Stopping OPMN Processes is in progress.
Operation EM Deploying is in progress. --漫长的过程
Operation Creating OMS Respository is in progress.
注意这几个安装后的提示信息。
[oracle@grid ~]$ more /oracle/OracleHomes/agent10g/sysman/setupinfo.txt
See below for information pertaining to your Enterprise Manager Installation:
1. Use the following URL to access the Enterprise Manager Grid Control:
http://grid.oracle.com:4889/em
2. The Enterprise Manager installation includes an Oracle Application Server instance, which is administered using a special "ias_admin" user account. The following in
formation was defaulted for the embedded Application Server instance:
Instance Name: EnterpriseManager0.grid.oracle.com
ias_admin password: This password is the same the SYSMAN account. (oms安装时,指定的口令为oracle1)
3. The connection details for the Enterprise Manager Repository are:
Host: db.oracle.com
Port: 1521
SID: emrep
[oracle@grid install]$ more /oracle/OracleHomes/oms10g/install/portlist.ini
[oracle@grid ~]$ more /oracle/OracleHomes/oms10g/install/portlist.ini
;OracleAS Components reserve the following ports at install time.
;As a post-installation step, you can reconfigure a component to use a different port.
;Those changes will not be visible in this file.
[System]
Host Name = grid.oracle.com
[Ports]
Oracle HTTP Server port = 7777
Oracle HTTP Server Listen port = 7778
Oracle HTTP Server SSL port = 8250
Oracle HTTP Server Listen (SSL) port = 4444
Oracle Notification Server Request port = 6003
Oracle Notification Server Local port = 6101
Oracle Notification Server Remote port = 6200
ASG port = 7890
Oracle HTTP Server Diagnostic port = 7200
Application Server Control RMI port = 1850
Log Loader port = 44000
Java Object Cache port = 7000
DCM Discovery port = 7100
Oracle Management Agent Port = 1157
Application Server Control port = 1156
Web Cache HTTP Listen port = 7777
Web Cache HTTP Listen (SSL) port = 8250
Web Cache Administration port = 9400
Web Cache Invalidation port = 9401
Web Cache Statistics port = 9402
Enterprise Manager Central Console Port = 4889
Enterprise Manager Central Console Secure Port = 1159
[oracle@db agent10g]$ /oracle/product/10.2.0/agent/agent10g/bin/emctl upload
Oracle Enterprise Manager 10g Release 10.2.0.1.0.
Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully
$ORACLE_HOME/bin/lsnrctl start
$ORACLE_HOME/bin/sqlplus "/ as sysdba"
SQL> startup
$OMS_HOME/opmn/bin/opmnctl startall
$OMS_HOME/bin/emctl start iasconsole
$AGENT_HOME/bin/emctl start agent
$AGENT_HOME/bin/emctl start agent
$AGENT_HOME/bin/emctl stop
$AGENT_HOME/bin/emctl stop
$OMS_HOME/opmn/bin/opmnctl stopall
$ORACLE_HOME/bin/sqlplus "/ as sysdba"
SQL> shutdown immediate
$ORACLE_HOME/bin/lsnrctl stop
$AGENT_HOME/bin/emctl stop agent
$OMS_HOME/bin/emctl stop oms -all
l Oracle用户目录
[oracle@grid /]$ rm -rf /oracle/*
[oracle@grid ~]$ rm -rf /tmp/*
l Root用户文件
[root@grid ~]# rm -rf /etc/oratab
[root@grid ~]# rm -rf /usr/local/bin/*