今天打算启用一下oracle database 11g的database control,发现初始并未安装:[oracle@test126 ~]$ emctl startem configuration
今天打算启用一下oracle database 11g的database control,发现初始并未安装:
[oracle@test126 ~]$ emctl start
em configuration issue. /opt/oracle/product/11.1.0/test126.hurray.com.cn_dodd not found.
遇到这类问题,可以通过重新配置,来创建em的配置文件:
[oracle@test126 11.1.0]$ emca -config dbcontrol db -repos recreate
started emca at aug 28, 2007 11:54:40 am
em configuration assistant, version 11.1.0.5.0 production
copyright (c) 2003, 2005, oracle. all rights reserved.
enter the following information:
database sid: dodd
listener port number: 1521
password for sys user:
password for dbsnmp user:
password for sysman user:
password for sysman user: email address for notifications (optional): eygle@eygle.com
outgoing mail (smtp) server for notifications (optional):
-----------------------------------------------------------------
you have specified the following settings
database oracle_home ................ /opt/oracle/product/11.1.0
local hostname ................ test126.hurray.com.cn
listener port number ................ 1521
database sid ................ dodd
email address for notifications ............... eygle@eygle.com
outgoing mail (smtp) server for notifications ...............
-----------------------------------------------------------------
do you wish to continue? [yes(y)/no(n)]: y
aug 28, 2007 11:56:58 am oracle.sysman.emcp.emconfig perform
info: this operation is being logged at /opt/oracle/cfgtoollogs/emca/dodd/emca_2007_08_28_11_54_40.log.
aug 28, 2007 11:57:01 am oracle.sysman.emcp.emreposconfig invoke
info: dropping the em repository (this may take a while) ...
aug 28, 2007 11:57:16 am oracle.sysman.emcp.emreposconfig invoke
info: repository successfully dropped
aug 28, 2007 11:57:16 am oracle.sysman.emcp.emreposconfig createrepository
info: creating the em repository (this may take a while) ...
aug 28, 2007 12:08:35 pm oracle.sysman.emcp.emreposconfig invoke
info: repository successfully created
aug 28, 2007 12:08:47 pm oracle.sysman.emcp.emreposconfig uploadconfigdatatorepository
info: uploading configuration data to em repository (this may take a while) ...
aug 28, 2007 12:11:45 pm oracle.sysman.emcp.emreposconfig invoke
info: uploaded configuration data successfully
aug 28, 2007 12:11:51 pm oracle.sysman.emcp.util.dbcontrolutil configuresoftwarelib
info: software library configured successfully.
aug 28, 2007 12:11:51 pm oracle.sysman.emcp.emdbpostconfig configuresoftwarelibrary
info: deploying provisioning archives ...
aug 28, 2007 12:12:13 pm oracle.sysman.emcp.emdbpostconfig configuresoftwarelibrary
info: provisioning archives deployed successfully.
aug 28, 2007 12:12:13 pm oracle.sysman.emcp.util.dbcontrolutil securedbconsole
info: securing database control (this may take a while) ...
aug 28, 2007 12:12:39 pm oracle.sysman.emcp.util.dbcontrolutil securedbconsole
info: database control secured successfully.
aug 28, 2007 12:12:39 pm oracle.sysman.emcp.util.dbcontrolutil startoms
info: starting database control (this may take a while) ...
aug 28, 2007 12:14:04 pm oracle.sysman.emcp.emdbpostconfig performconfiguration
info: database control started successfully
aug 28, 2007 12:14:04 pm oracle.sysman.emcp.emdbpostconfig performconfiguration
info: >>>>>>>>>>> the database control url is https://test126.hurray.com.cn:1158/em aug 28, 2007 12:14:16 pm oracle.sysman.emcp.emdbpostconfig invoke
warning:
************************ warning ************************
management repository has been placed in secure mode wherein enterprise manager data will be encrypted. the encryption key has been placed in the file: /opt/oracle/product/11.1.0/test126.hurray.com.cn_dodd/sysman/config/emkey.ora. please ensure this file is backed up as the encrypted data will become unusable if this file is lost.
***********************************************************
enterprise manager configuration completed successfully
finished emca at aug 28, 2007 12:14:16 pm
oracle 10g中,配置方法与此相同。
配置完成之后就可以启动em了:
[oracle@test126 11.1.0]$ emctl start dbconsole
oracle enterprise manager 11g database control release 11.1.0.6.0
copyright (c) 1996, 2007 oracle corporation. all rights reserved.
https://test126.hurray.com.cn:1158/em/console/aboutapplication
starting oracle enterprise manager 11g database control ........ started.
------------------------------------------------------------------
logs are generated in directory /opt/oracle/product/11.1.0/test126.hurray.com.cn_dodd/sysman/log
如果是linux环境,你可能还需要在iptables中开放1158端口,增加如下一行:
-a rh-firewall-1-input -m state --state new -m tcp -p tcp --dport 1158 -j accept
重新启动防火墙之后就可以通过ie在远端连接em的database control了:
[root@test126 sysconfig]# service iptables restart
flushing firewall rules: [ ok ]
setting chains to policy accept: filter [ ok ]
unloading iptables modules: [ ok ]
applying iptables firewall rules: [ ok ]
loading additional iptables modules: ip_conntrack_netbios_ns [ ok ]
,