配置RAC的OEM

简介: 001、首先,命令和单实例的配置命令有所区别,需要增加一个参数cluster: [oracle@enmoedu2 dbs]$ emca -config dbcontrol db -repos recreate -cluster 如果不加这个参数,配置出...
001、首先,命令和单实例的配置命令有所区别,需要增加一个参数cluster:
[ oracle@enmoedu2  dbs]$ emca -config dbcontrol db -repos recreate -cluster
如果不加这个参数,配置出来的OEM就会像下面这个样子:



002、配置OEM的过程中, 如果创建EM时提示ASMSNMP密码不对等等,有可能是ASM密码文件不存在或其它原因,可以先删除再创建或直接创建,步骤如下:
(1)将所有节点的ASM密码文件删除,ASM密码文件位于Grid用户的$ORACLE_HOME/dbs下,一般名称为orapw+ASM;在所有节点执行如下命令:
            rm $ORACLE_HOME/dbs/orapw+ASM

(2)手动建立ASM密码文件,执行该命令的用户应是Grid Infrastructure的所有者,同样在所有节点均建立密码文件:
[ grid@enmoedu1  dbs]$ orapwd file=orapw+ASM entries=5 password=grid

(3)在ASM实例中添加ASMSNMP,如果有先用drop user ASMSNMP cascade将其删除,同时赋予其sysdba角色
SQL> create user asmsnmp identified by grid;
User created.
SQL> grant sysdba to asmsnmp;
Grant succeeded.

(4)验证用户ASMSNMP被成功创建,如果用的Oracle用户创建,则无法在一个节点创建另一个节点同样可见:
节点1:
SYS@+ASM1 > select * from v$pwfile_users;

USERNAME                                                     SYSDBA      SYSOPER        SYSASM
------------------------------------------------------------ ----------         ----------               ----------
SYS                                                                  TRUE           TRUE                 FALSE
ASMSNMP                                                       TRUE            FALSE               FALSE

节点2:
SYS@+ASM2 > select * from v$pwfile_users;

USERNAME                                       SYSDBA      SYSOPER      SYSASM
------------------------------------------------------------   ----------      ----------    ----------
SYS                                            TRUE           TRUE            FALSE
ASMSNMP                                         TRUE         FALSE          FALSE

003、配置OEM
[ oracle@enmoedu2  dbs]$ 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  https://enmoedu2.us.oracle.com:1158/em  <<<<<<<<<<<     即是OEM的地址
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@enmoedu1  Oracle]# 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@enmoedu2  plugins]# pwd
/usr/lib64/mozilla/plugins
[ root@enmoedu2  Oracle]# cp flash-plugin-11.2.202.559-release.x86_64.rpm
/usr/lib64/mozilla/plugins
[ root@enmoedu2  Oracle]# chmod 775 /usr/lib64/mozilla/plugins  flash-plugin-11.2.202.559-release.x86_64.rpm 
[ root@enmoedu2  plugins]# rpm -ivh flash-plugin-11.2.202.559-release.x86_64.rpm 
Preparing...                ########################################### [100%]
   1:flash-plugin           ########################################### [100%]

安装好后,OEM的所有界面就都可以使用了:


相关文章
|
1月前
|
存储 Oracle 关系型数据库
RAC创建ASM磁盘组时配置多路径和UDEV
RAC创建ASM磁盘组时配置多路径和UDEV
82 5
|
Oracle 关系型数据库 Linux
Oracle RAC:多路径配置Centos操作系统
Centos操作系统多路径配置
464 0
|
Oracle 关系型数据库
Oracle RAC在RHEL7多路径配置,超实用
Oracle RAC在RHEL7多路径配置,超实用
457 0
Oracle RAC在RHEL7多路径配置,超实用
|
Oracle 网络协议 关系型数据库
|
Linux 安全 关系型数据库
|
网络协议 Oracle 关系型数据库