1.将sysman以及dbsnmp两个用户解锁。
SQL> alter user sysman account unlock identified by sys;
User altered.
SQL> alter user dbsnmp account unlock identified by sys;
User altered.
2.根据文档说如果oem已安装的话需要删除,不过我没有删除当前的oem
[oracle@qht131 admin]$ emca -repos create
STARTED EMCA at Jul 13, 2018 7:09:42 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user:
Do you wish to continue? [yes(Y)/no(N)]: y
Jul 13, 2018 7:09:59 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2018_07_13_19_09_42.log.
Jul 13, 2018 7:10:00 PM oracle.sysman.emcp.DatabaseChecks performReposChecks
SEVERE: Dbcontrol Repository already exists. Fix the error(s) and run EM Configuration Assistant again in standalone mode.
建立oem的时候报错,数据仓库已存在。
3.配置OEM
[oracle@qht131 admin]$ emca -config dbcontrol db
STARTED EMCA at Jul 13, 2018 7:10:30 PM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11203 ]:
Password for SYS user:
Password for DBSNMP user:
Jul 13, 2018 7:10:45 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
WARNING: ORA-28000: the account is locked
Password for SYSMAN user:
Jul 13, 2018 7:11:03 PM oracle.sysman.emcp.util.GeneralUtil initSQLEngineLoacly
WARNING: ORA-28000: the account is locked
Email address for notifications (optional):
Outgoing Mail (SMTP) server for notifications (optional):
-----------------------------------------------------------------
You have specified the following settings
Database ORACLE_HOME ................ /u01/app/oracle/product/11203
Local hostname ................ qht131
Listener ORACLE_HOME ................ /u01/app/oracle/product/11203
Listener port number ................ 1521
Database SID ................ orcl
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ...............
-----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Jul 13, 2018 7:11:17 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/orcl/emca_2018_07_13_19_10_30.log.
Jul 13, 2018 7:11:31 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Jul 13, 2018 7:12:19 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Jul 13, 2018 7:12:26 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Jul 13, 2018 7:12:41 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Jul 13, 2018 7:12:41 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Jul 13, 2018 7:14:29 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Jul 13, 2018 7:14:30 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://qht131:1158/em <<<<<<<<<<<
Jul 13, 2018 7:14:36 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: /u01/app/oracle/product/11203/qht131_orcl/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 Jul 13, 2018 7:14:36 PM
4.当前OEM的状态,oem已自动启动了,关闭和启动用emctl start/stop dbconsole命令
[oracle@qht131 admin]$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0
Copyright (c) 1996, 2011 Oracle Corporation. All rights reserved.
https://qht131:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11203/qht131_orcl/sysman/log
5.登入oem, 地址为:https://172.17.61.131:1158/em,根据要求输入帐号和密码
参考:http://blog.sina.com.cn/s/blog_7071ca800102v55w.html