快速部署Enterprise Manager Cloud Control 12c(12.1) Agent

<OEL 5上快速部署Enterprise Manager Cloud Control 12c(12.1)>中我介绍了如何安装配置Oracle Enterprise Manager Cloud Control 12c(12.1) Server ,我们知道光有EM Server而不部署Agent是无法发挥其管理特性的。

接下来我们会再次通过实践了解Em 12c(12.1)中部署Agent代理程序的过程,整个过程和10g/11g Grid Control中的Deploy Agent有较大的区别。

 

这里我们要注意一点,OMS 12c(12.1) 只能和12.1 的Agent 代理程序配合工作,而不能使用之前任何版本的Agent。“Enterprise Manager Cloud Control can communicate only with Oracle Management Agent 12c and not with any other earlier release of the Management Agent. You can not configure your exising Agents to communicate with Enterprise Manager 12c OMS.”

 

系统和软件包要求

 

推荐在Oracle Enterprise Linux 5.7或6.1上安装EM 12c的agent , 可以从edelivery.oracle.com 下载到这2款操作系统的安装介质。

以下演示中的主机均采用Oracle Enterprise Linux 5.7 操作系统。

以下表格列出了在Oracle Linux 6或5.x上 安装EM 12c agent ,所要求预装的操作系统软件包,这些软件包可以直接从OS安装DVD介质中找到:

 

Platform 32-Bit Packages for 32-Bit Platform 64-Bit Packages for 64-Bit Platform
Oracle Linux 6
  • make-3.81
  • binutils-2.17.50.0.6
  • gcc-4.1.1
  • libstdc++ 4.1.1
  • make-3.81
  • binutils-2.17.50.0.6
  • gcc -4.1.1
  • libstdc++ -4.1.1
Oracle Linux 5.xRed Hat Enterprise Linux 5.x
  • make-3.81
  • binutils-2.17.50.0.6
  • gcc-4.1.1
  • libstdc++-4.1.1
Oracle Linux 5.6Red Hat Enterprise Linux 5.6

  • make-3.81
  • binutils-2.17.50.0.6
  • gcc -4.1.1
  • libaio-0.3.106
  • glibc-common-2.3.4
  • libstdc++ -4.1.1
  • setarch-1.6
  • sysstat-5.0.5
  • rng-utils-2

Oracle Linux 5.3 and 5.4

Red Hat Enterprise Linux 5.3 and 5.4

  • make-3.81
  • binutils-2.17.50.0.6
  • gcc -4.1.1
  • libstdc++ -4.1.1

 

更多关于OS软件要求的信息,可以直接访问EM 安装手册 <Meeting Package, Kernel Parameter, and Library Requirements>章节

 

准备工作

 

1. 12c 部署agent 要求在创建必要的credential profile,该credential profile将包含能够从OMS server ssh到目标节点target node的用户身份认证,且要求该用户能够在target node上以sudo执行root用户的权限。

这里我们以oracle用户为例,我们将以目标节点上的oracle用户身份创建credential profile,首先我们要确保oracle用户能够以sudo 执行root用户的权限,这需要用到/etc/sudoers配置文件:

 

!确保/usr/local/bin/sudo 这个符号链接存在

[root@vrh2 ~]# ln -s /usr/bin/sudo /usr/local/bin/sudo

[root@vrh2 m01]# ls -l /etc/sudoers
-r--r----- 1 root root 3407 Oct 18 19:30 /etc/sudoers

[root@vrh2 m01]# cp /etc/sudoers /etc/sudoers.bak 

打开/etc/sudoers 将以下三处修改

修改前:
Defaults   requiretty

修改后:
Defaults:oracle !requiretty

修改前:
Defaults   !visiblepw

修改后:
Defaults   visiblepw

修改前:
##
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL

修改后

##
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
oracle  ALL=(ALL)       ALL                        --这里加一行

以上三处修改完成后,save 文件 

测试oracle 能否正常sudo 

[root@vrh2 m01]# su  - oracle

[oracle@vrh2 ~]$ ls -l /root
ls: /root: Permission denied

[oracle@vrh2 ~]$ sudo ls -l /root

[sudo] password for oracle:
total 88
-rw------- 1 root root  1832 Aug 11 05:26 anaconda-ks.cfg
drwxr-xr-x 2 root root  4096 Aug 10 21:31 Desktop
-rw-r--r-- 1 root root 56307 Aug 11 05:26 install.log
-rw-r--r-- 1 root root  4136 Aug 11 05:26 install.log.syslog

 

2. 在目标节点上创建必要的目录 :

 

[root@vrh2 m01]# mkdir /m01

[root@vrh2 m01]# chown oracle:oinstall /m01

 

3.  确保OMS server 和target server 间的通信畅通,如没有使用dns 服务 ,那么不要忘记将host/ip 信息写入到/etc/hosts文件中,如果漏掉这部将报target node can not be  reached 错误

 

正式安装

 

首先再次以sysman身份登录EM https console,如https://192.168.1.169:7799/em。

点击右上角的setup-> Add Target -> Add Targets Manually

 

 

进入Add Targets Manually页面,选择” Add Host Target” ,并点击Add Host …按钮:

 

 

在”add Target – Host and Platform “页面使用默认的”session name”即可,点选”+Add”按钮填入主机名和平台信息:

注意这里推荐填入规范的hostname,如”vrh2.oracle.com”, 注意主机名不能带下划线 “_”, 若Platform下拉列表中没有你要的平台那么说明在该平台上还没有12.1 的agent可用。

 

 

输入完成后点击Next进入”Add Target –  Installation Details ” 页面,点中deployment details 出现下来菜单选择Fresh Agent install ,并填入installation base directory 等目录信息。

 

接着在Named confidential 点击蓝色的”+” 图形按钮,会跳出 create new Named confidential 的窗口,填入之前配好的oracle用户的信息:

 

 

完成后点击Ok,回到原”Add Target –  Installation Details “界面,确认并点击Next:

 

 

进入Review页面,确认信息正确并点击Deploy Agent:

 

 

完成后会进入Agent Deployment summary 页面 ,这里存在三个阶段:

  1. Initialization    — 拷贝agent介质到目标服务器
  2. Remote Prerequisite Check   — 检测目标服务器的安装先决条件
  3. Agent Deployment             –具体的Installation Agent 、Secure Agent 和 执行root.sh

 

若一开始没有正确配置用户的sudo ,则可能在Remote Prerequisite Check阶段出现检测警告,例如下图:

 

 

如果一切顺利,以上三个阶段完成后Agent即在运作了:

 

 

Agent Deployment 的日志存放在 $OMS_HOME/sysman/prov/agentpush/$date目录下,也可以从EM的网页界面上找到这些日志的具体位置。

 

之后点击Target -> host可以看到新加入的主机:

 

 

之后点击Target -> Database  -> add 添加数据库配置信息:

 

在host栏填入新增加的目标服务器,并点击continue:

 

 

EM 会自动找出目标服务器上已有的数据库, 点击Configure 填入dbsnmp用户的密码后保存并Continue:

 

 

之后点击Target -> database 就可以看到新增的数据库了:

 

 

点击数据库名 -> 点击Performance -> Performance Home后可以看到新的12c   的性能总览图:

 


Posted

in

by

Tags:

Comments

4 responses to “快速部署Enterprise Manager Cloud Control 12c(12.1) Agent”

  1. Colin Avatar

    hi,
    Any cloud Control Data Guard implementation guide ?

    I got a problem, when using Cloud Control to create a phy. standy db using data guard.

    thanks.

  2. matthew Avatar
    matthew

    你好
    你是否在12c上部署过exadata的plug-in? 若部署过,exadata的db、cell和infiniband交换机是否需要重启?谢谢

  3. out-man Avatar
    out-man

    目标配置结果orcl:oracle.sysman.emSDK.core.target.DuplicateEntityException: ORA-20500: orcl:oracle_database:192.168.100.12:https://192.168.100.12:3872/emd/main/:3:0 ORA-06512: 在 “SYSMAN.EM_TARGET”, line 3347 ORA-06512: 在 line 1  – ORA-20500: orcl:oracle_database:192.168.100.12:https://192.168.100.12:3872/emd/main/:3:0 ORA-06512: 在 “SYSMAN.EM_TARGET”, line 3347 ORA-06512: 在 line 1

  4. 彭仲颐 Avatar
    彭仲颐

    刘sir,能不能写个windows平台的agent部署方法流程?感谢

Leave a Reply

Your email address will not be published. Required fields are marked *