OEM的安装

来源:互联网 发布:光纤量子通信网络 编辑:程序博客网 时间:2024/05/20 23:31

第一种安装方式

在安装数据库软件的时候,选择 create and configure a database,在创建数据库时会自动安装OEM软件

第二种安装方式

使用DBCA的 configure database options选项配置OEM,如果这种方式不能使用可以用EMCA来创建。

第三种安装方式

先看指令:

emca -reops create 创建新的Repository存储区

emca -repos drop 删除Repository存储区

emca -repos recreate 重新创建Reposiory存储区

emca -config dbcontrol db 创建OEM Database Control

emca -deconfig dbcontrol db 删除OEM Database Control

 

重建OEM

$ emca -config dbcontrol db -repos recreate;

STARTED EMCA at Nov 3, 2014 7:44:10 PM
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 [ /oracle/product/11.2.0/db_1 ]:
Password for SYS user: 
Password for DBSNMP user: 

 

遇到错误:

Listener is not up or database service is not registered with it

查看

/oracle/cfgtoollogs/emca/orcl/emca_2014_11_03_19_33_12.log

CONFIG: ORA-12541: TNS:no listener

解决问题:

本机有监听lsnrct start启动成功,服务器地址为:localhost.localdomain

查看本机名

hostname为 secondhost(视本机情况而定)

查看hosts文件内容为:

$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1  localhost.localdomain localhost
::1  localhost6.localdomain6 localhost6
192.168.17.129   secondhost

更改监听服务器地址为secondhost

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = secondhost)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /oracle

完成上面步骤后重新执行:

$ emca -config dbcontrol db -repos recreate;

.........................

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /oracle/product/11.2.0/db_1/secondhost_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

 

 

 

 

0 0