SYS@+ASM2> select * from v$pwfile_users;
USERNAME SYSDBA SYSOPER SYSASM
------------------------------------------------------------ ---------- ---------- ----------
SYS TRUE TRUE FALSE
ASMSNMP TRUE FALSE FALSE
003、配置OEM
[oracle@enmoedu2dbs]$ emca -config dbcontrol db -repos recreate -cluster
STARTED EMCA at Apr 21, 2016 9:13:33 PM
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: PROD
Service name: PROD
Listener ORACLE_HOME [ /u01/app/11.2.0/grid ]:
Password for SYS user:
Password for SYS user:
Database Control is already configured for the database PROD
You have chosen to configure Database Control for managing the database PROD
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:
Password for SYSMAN user:
Cluster name: enmoedu-cluster 可以执行命令来获得集群名:[grid@enmoedu1~]$ cemutlo -n记得要在.bash_profile中加入grid的bin的path到$PATH中
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:
-----------------------------------------------------------------
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 ................ enmoedu-cluster
Database unique name ................ PROD
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
Apr 21, 2016 9:14:28 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/PROD/emca_2016_04_21_21_13_33.log.
Apr 21, 2016 9:14:33 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5540 is already in use.
Apr 21, 2016 9:14:33 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 5520 is already in use.
Apr 21, 2016 9:14:33 PM oracle.sysman.emcp.util.PortManager isPortInUse
WARNING: Specified port 1158 is already in use.
Apr 21, 2016 9:14:33 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Apr 21, 2016 9:14:51 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Apr 21, 2016 9:25:40 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Apr 21, 2016 9:25:41 PM oracle.sysman.emcp.EMReposConfig createRepository
INFO: Creating the EM repository (this may take a while) ...
Apr 21, 2016 9:43:24 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully created
Apr 21, 2016 9:44:36 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository
INFO: Uploading configuration data to EM repository (this may take a while) ...
Apr 21, 2016 9:47:08 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Uploaded configuration data successfully
Apr 21, 2016 9:47:10 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_enmoedu1_PROD to remote nodes ...
Apr 21, 2016 9:47:13 PM oracle.sysman.emcp.EMDBCConfig instantiateOC4JConfigFiles
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/oc4j/j2ee/OC4J_DBConsole_enmoedu2_PROD to remote nodes ...
Apr 21, 2016 9:47:20 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/enmoedu1_PROD to remote nodes ...
Apr 21, 2016 9:47:33 PM oracle.sysman.emcp.EMAgentConfig deployStateDirs
INFO: Propagating /u01/app/oracle/product/11.2.0/db_1/enmoedu2_PROD to remote nodes ...
Apr 21, 2016 9:47:37 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole
INFO: Securing Database Control (this may take a while) ...
Apr 21, 2016 9:48:13 PM oracle.sysman.emcp.util.DBControlUtil startOMS
INFO: Starting Database Control (this may take a while) ...
Apr 21, 2016 9:54:27 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: Database Control started successfully
Apr 21, 2016 9:54:27 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration
INFO: >>>>>>>>>>> The Database Control URL is<<<<<<<<<<
Apr 21, 2016 9:54:41 PM oracle.sysman.emcp.EMDBPostConfig showClusterDBCAgentMessage
INFO:
**************** Current Configuration ****************
INSTANCE NODE DBCONTROL_UPLOAD_HOST
---------- ---------- ---------------------
PROD enmoedu1 enmoedu2.us.oracle.com
PROD enmoedu2 enmoedu2.us.oracle.com
Apr 21, 2016 9:54:41 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/11.2.0/db_1/enmoedu2_PROD/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 Apr 21, 2016 9:54:41 PM
安装好后就可以使用火狐浏览器来进入OEM界面了,进入之后会发现performance这一栏没有图形,提示说缺少flash插件,可以去flash官网下载,本人下载的是一个rpm包,如下:
[root@enmoedu1Oracle]# ll flash-plugin-11.2.202.559-release.x86_64.rpm
-rwxrwx--- 1 root vboxsf 7255681 Jan 10 13:07 flash-plugin-11.2.202.559-release.x86_64.rpm
将其复制到火狐的插件目录下,并修改权限,进行安装
[root@enmoedu2plugins]# pwd
/usr/lib64/mozilla/plugins
[root@enmoedu2Oracle]# cp flash-plugin-11.2.202.559-release.x86_64.rpm
/usr/lib64/mozilla/plugins
[root@enmoedu2Oracle]# chmod 775 /usr/lib64/mozilla/pluginsflash-plugin-11.2.202.559-release.x86_64.rpm
[root@enmoedu2plugins]# rpm -ivh flash-plugin-11.2.202.559-release.x86_64.rpm
Preparing... ########################################### [100%]
1:flash-plugin ########################################### [100%]
安装好后,OEM的所有界面就都可以使用了: