啟動em
emctl start dbconsole[oracle@oracle ~]$ emctl start dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. https://oracle.example.com:1158/em/console/aboutApplication Starting Oracle Enterprise Manager 11g Database Control ..... started. ------------------------------------------------------------------ Logs are generated in directory /opt/oracle/product/11.2.0/dbhome_1/oracle.example.com_wcsdb/sysman/log
https://oracle.example.com:1158/em
使用system用戶登錄
停止em
emctl stop dbconsole[oracle@oracle ~]$ emctl stop dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0 Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved. https://oracle.example.com:1158/em/console/aboutApplication Stopping Oracle Enterprise Manager 11g Database Control ... ... Stopped.
如果不記得密碼請先重置密碼
alter user sys identified by chen account unlock; alter user sysman identified by chen account unlock; alter user dbsnmp identified by chen account unlock;
運行emca 重建EM
[oracle@orcl ~]$ emca -config dbcontrol db -repos recreate STARTED EMCA at Dec 2, 2015 8:48:06 AM EM Configuration Assistant, Version 11.2.0.0.2 Production Copyright (c) 2003, 2005, Oracle. All rights reserved. Enter the following information: Database SID: orcl Listener port number: 1521 Listener ORACLE_HOME [ /opt/oracle/product/11.2.0/dbhome_1 ]: Password for SYS user: Password for DBSNMP user: Password for SYSMAN user: Email address for notifications (optional): netkiller@msn.com Outgoing Mail (SMTP) server for notifications (optional): ----------------------------------------------------------------- You have specified the following settings Database ORACLE_HOME ................ /opt/oracle/product/11.2.0/dbhome_1 Local hostname ................ orcl.example.com Listener ORACLE_HOME ................ /opt/oracle/product/11.2.0/dbhome_1 Listener port number ................ 1521 Database SID ................ orcl Email address for notifications ............... netkiller@msn.com Outgoing Mail (SMTP) server for notifications ............... ----------------------------------------------------------------- Do you wish to continue? [yes(Y)/no(N)]: Y Dec 2, 2015 8:49:12 AM oracle.sysman.emcp.EMConfig perform INFO: This operation is being logged at /opt/oracle/cfgtoollogs/emca/orcl/emca_2015_12_02_08_48_06.log. Dec 2, 2015 8:49:12 AM oracle.sysman.emcp.EMReposConfig invoke INFO: Dropping the EM repository (this may take a while) ... Dec 2, 2015 8:50:15 AM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully dropped Dec 2, 2015 8:50:16 AM oracle.sysman.emcp.EMReposConfig createRepository INFO: Creating the EM repository (this may take a while) ... Dec 2, 2015 8:54:56 AM oracle.sysman.emcp.EMReposConfig invoke INFO: Repository successfully created Dec 2, 2015 8:54:58 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository INFO: Uploading configuration data to EM repository (this may take a while) ... Dec 2, 2015 8:55:35 AM oracle.sysman.emcp.EMReposConfig invoke INFO: Uploaded configuration data successfully Dec 2, 2015 8:55:37 AM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib INFO: Software library configured successfully. Dec 2, 2015 8:55:37 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary INFO: Deploying Provisioning archives ... Dec 2, 2015 8:55:55 AM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary INFO: Provisioning archives deployed successfully. Dec 2, 2015 8:55:55 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole INFO: Securing Database Control (this may take a while) ... Dec 2, 2015 8:56:39 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole INFO: Database Control secured successfully. Dec 2, 2015 8:56:39 AM oracle.sysman.emcp.util.DBControlUtil startOMS INFO: Starting Database Control (this may take a while) ... Dec 2, 2015 8:57:06 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: Database Control started successfully Dec 2, 2015 8:57:06 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration INFO: >>>>>>>>>>> The Database Control URL is https://orcl.example.com:1158/em <<<<<<<<<<< Dec 2, 2015 8:57:11 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: /opt/oracle/product/11.2.0/dbhome_1/orcl.example.com_orcl/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 Dec 2, 2015 8:57:11 AM
查看EM是否啟動
$ ss -lnt | grep 1158 0 0 *:1158 *:*
https://orcl.example.com:1158/em