01,用户解锁添加密码
[oracle@oracle01 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Tue Mar 26 13:35:50 2019 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> alter user sysman account unlock identified by sys; User altered. SQL> alter user dbsnmp account unlock identified by sys; User altered. SQL> alter user sysman identified by 123456; User altered. SQL> alter user dbsnmp identified by 123456; User altered.
02,查看OEM是否存在,
[oracle@oracle01 ~]$ emca -repos create STARTED EMCA at Mar 26, 2019 1:43:46 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved. Enter the following information:
Database SID: oracle01
Listener port number: 1521
Password for SYS user:
Password for SYSMAN user: Do you wish to continue? [yes(Y)/no(N)]: y
Mar 26, 2019 1:44:57 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/oracle01/emca_2019_03_26_01_43_46.log.
Mar 26, 2019 1:44:57 AM oracle.sysman.emcp.DatabaseChecks performReposChecks
SEVERE: Dbcontrol Repository already exists. Fix the error(s) and run EM Configuration Assistant again in standalone mode.
建立oem的时候报错,数据仓库已存在。
03,配置OEM
[oracle@oracle01 ~]$ emca -config dbcontrol db STARTED EMCA at Mar 26, 2019 1:50:01 AM
EM Configuration Assistant, Version 11.2.0.3.0 Production
Copyright (c) 2003, 2011, Oracle. All rights reserved. Enter the following information:
Database SID: oracle01
Listener port number: 1521
Listener ORACLE_HOME [ /u01/app/oracle/product/11.2.0/db_1 ]:
Password for SYS user:
Password for DBSNMP user:
Password for SYSMAN user:
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/11.2.0/db_1 Local hostname ................ oracle01
Listener ORACLE_HOME ................ /u01/app/oracle/product/11.2.0/db_1
Listener port number ................ 1521
Database SID ................ oracle01
Email address for notifications ...............
Outgoing Mail (SMTP) server for notifications ............... -----------------------------------------------------------------
Do you wish to continue? [yes(Y)/no(N)]: y
Mar 26, 2019 1:50:46 AM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/oracle01/emca_2019_03_26_01_50_01.log.
Mar 26, 2019 1:50:50 AM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Mar 26, 2019 1:51:29 AM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Mar 26, 2019 1:51:30 AM oracle.sysman.emcp.ParamsManager getLocalListener
WARNING: Error retrieving listener for oracle01
Mar 26, 2019 1:51:31 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Mar 26, 2019 1:51:37 AM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Database Control secured successfully.
Mar 26, 2019 1:51:37 AM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Mar 26, 2019 1:55:35 AM oracle.sysman.emcp.util.PlatformInterface executeCommand
WARNING: Error executing /u01/app/oracle/product/11.2.0/db_1/bin/emctl start dbconsole
Mar 26, 2019 1:55:35 AM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is https://oracle01:1158/em <<<<<<<<<<<
Mar 26, 2019 1:55:37 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/oracle01_oracle01/sysman/config/emkey.ora. Ensure this file is backed up as the encrypted data will become unusable if this file is lost. ***********************************************************
Mar 26, 2019 1:55:37 AM oracle.sysman.emcp.EMDBPostConfig invoke
WARNING: Error starting Database Control.Execute the following command(s). 1) Set the environment variable ORACLE_UNQNAME to Database unique name
2) /u01/app/oracle/product/11.2.0/db_1/bin/emctl start dbconsole Error starting Database Control.Execute the following command(s). 1) Set the environment variable ORACLE_UNQNAME to Database unique name
2) /u01/app/oracle/product/11.2.0/db_1/bin/emctl start dbconsole
[oracle@oracle01 ~]$
似乎有报错..