Oracle 11gRAC Enterprises Manager (OEM)配置
记录一下简单的操作
1、先确保一下帐号没有被锁
select * from dba_users where username in ('SYS','SYSTEM','SYSMAN','DBSNMP','ASMSNMP');
如果没有asmsnmp帐号,则创建一个并授权
create user asmsnmp identified by oracle;
grant sysdba to asmsnmp;
2、如果有帐号锁定,则给解锁
alter user sysman account unlock;
3、确保每个节点的orapwSID文件正确。
db2>orapwd file=orapwd$SID force=y
4、确保节点间的ssh互信正常。
5、确保每节点的监听程序正常,监听程序路径为统一路径(后续会需要填写监听程序路径,如果不一致可能会有问题),比如有部分集群的监听,有些节点监听在grid帐号目录下启动,有些在oracle帐号主目录下启动。
6、然后在任意一节点oracle帐号下开始配置EM,
7、启动每个节点上的dbconsole
使用如下命令进行配置并输入相关密码等信息,以下是一次完整的配置过程记录
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
db2-> emca -config dbcontrol db -repos recreate -cluster
STARTED EMCA at Sep 26, 2021 11:04:43 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.
Enter the following information:
Database unique name: db
Service name: db
Listener ORACLE_HOME [ /u01/app/11.2.0/grid ]:
Password for SYS user: 此处输入sys帐号的密码
Database Control is already configured for the database db
You have chosen to configure Database Control for managing the database db
This will remove the existing configuration and the default settings and perform a fresh configuration
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Password for DBSNMP user: 此处输入dbsnmp帐号的密码
Password for SYSMAN user: 此处输入sysman帐号的密码
Cluster name: db-cluster
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
ASM ORACLE_HOME [ /u01/app/11.2.0/grid ]:
ASM port [ 1521 ]:
ASM username [ ASMSNMP ]:
ASM user password: 此处输入asmsnmp帐号的密码
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1
Database instance hostname ................ Listener ORACLE_HOME ................ /u01/app/11.2.0/grid
Listener port number ................ 1521
Cluster name ................ db-cluster
Database unique name ................ db
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
ASM ORACLE_HOME ................ /u01/app/11.2.0/grid
ASM port ................ 1521
ASM user role ................ SYSDBA
ASM username ................ ASMSNMP
-----------------------------------------------------------------
----------------------------------------------------------------------
WARNING : While repository is dropped the database will be put in quiesce mode.
----------------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Sep 26, 2021 11:06:49 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/db/emca_2021_09_26_11_04_43.log.
Sep 26, 2021 11:06:52 AM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5541 is already in use.
Sep 26, 2021 11:06:52 AM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5521 is already in use.
Sep 26, 2021 11:06:52 AM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 1158 is already in use.
Sep 26, 2021 11:06:52 AM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Sep 26, 2021 11:07:00 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Sep 26, 2021 11:07:03 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Sep 26, 2021 11:07:04 AM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Sep 26, 2021 11:15:35 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Sep 26, 2021 11:15:43 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Sep 26, 2021 11:16:50 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Sep 26, 2021 11:16:52 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_db1_db to remote nodes ...
Sep 26, 2021 11:16:53 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_db2_db to remote nodes ...
Sep 26, 2021 11:16:54 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_db3_db to remote nodes ...
Sep 26, 2021 11:16:55 AM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_db4_db to remote nodes ...
Sep 26, 2021 11:16:59 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/db1_db to remote nodes ...
Sep 26, 2021 11:17:05 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/db2_db to remote nodes ...
Sep 26, 2021 11:17:09 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/db3_db to remote nodes ...
Sep 26, 2021 11:17:12 AM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/db4_db to remote nodes ...
Sep 26, 2021 11:17:14 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Sep 26, 2021 11:18:13 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Sep 26, 2021 11:18:59 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Sep 26, 2021 11:18:59 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://db2:1158/em <<<<<<<<<<<
Sep 26, 2021 11:19:02 AM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO:
**************** Current Configuration ****************
INSTANCE NODE DBCONTROL_UPLOAD_HOST
---------- ---------- ---------------------
db db1 db2
db db2 db2
db db3 db2
db db4 db2
Sep 26, 2021 11:19:02 AM 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: /u01/app/oracle/product/11.2.0/db_1/db2_db/sysman/config/emkey.ora. 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 Sep 26, 2021 11:19:02 AM
然后在各个节点上使用oracle账户把dbconsole起起来即可
emctl start dbconsolel
最后在浏览器中输入https://节点ip:1158/em 然后输入sys帐号及密码即可登录。
报歉!评论已关闭!