首页 » ORACLE, ORACLE [C]系列 » Installing Enterprise Manager Cloud Control 12c r2 Agent on Linux(安装em12c agent)

Installing Enterprise Manager Cloud Control 12c r2 Agent on Linux(安装em12c agent)

“Oracle Management Agent 12c communicates only with Oracle Management Service 12c and not with any earlier release of Enterprise Manager.
12.1.0.1.0 Management Agent is compatible with a 12.1.0.2.0 OMS. However, using the Add Host Targets Wizard of a 12.1.0.2.0 OMS, you can install only the latest available

Management Agent 12c software. For example, if the 12.1.0.2.0 Management Agent software is available in Oracle Software Library, you cannot use the Add Host Targets Wizard of a 12.1.0.2.0 OMS to install a 12.1.0.1.0 Management Agent.”

软件包需求

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

oracle 推荐用OEM来安装AGENT,安装变的更加傻瓜化,文件是从OMS端SCP 到AGENT端,执行一系列SHELL后并起动AGENT进程,OEM 的服务端在上篇笔记已记录 ,下面演示一下在另一台部署agent 监控os和instance ,

os:centos 5.6 x64

db version :10205 x64

[oracle@testdb ~]$ su – root
Password:
[root@testdb ~]# lsb_release -a
LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 5.6 (Final)
Release: 5.6
Codename: Final

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

[root@testdb ~]# ln -s /usr/bin/sudo /usr/local/bin/sudo
[root@testdb ~]# ls -l /etc/sudoers
-r--r----- 1 root root 3381 Mar  6  2011 /etc/sudoers
[root@testdb ~]# cp /etc/sudoers /etc/sudoers.bak
[root@testdb ~]# chmod u+w /etc/sudoers
[root@testdb ~]# vi /etc/sudoers

Defaults    requiretty
改为
Defaults:oracle    !requiretty

Defaults   !visiblepw
改为
Defaults   visiblepw

root    ALL=(ALL)       ALL
追加
oracle  ALL=(ALL)       ALL

##--save
[root@testdb ~]# chmod u-w /etc/sudoers

[root@testdb ~]# su - oracle

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

[oracle@testdb ~]$ sudo ls -l /root
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for oracle: *******
total 104
-rw------- 1 root root  1545 Dec 15  2011 anaconda-ks.cfg
-rw-r--r-- 1 root root  3227 Dec 14  2011 configure_oracle.sh
drwxr-xr-x 2 root root  4096 Dec 15  2011 Desktop
-rw-r--r-- 1 root root 59314 Dec 15  2011 install.log
-rw-r--r-- 1 root root  4971 Dec 15  2011 install.log.syslog
-rwxr-xr-x 1 root root   293 Dec 15  2011 rpc.rstatd
-rw-r----- 1 root root   674 Jul 11 14:53 sqlnet.log

创建agent安装路径

[root@testdb agent] mkdir -p oem12c/agent
[root@testdb agent]# pwd
/oracle/product/oem12c/agent

[root@testdb oem12c]# cd ..
[root@testdb product]# ls
10.2.0  oem12c
[root@testdb product]# ll
total 8
drwxr-xr-x 60 oracle oinstall 4096 Dec 15  2011 10.2.0
drwxr-xr-x  3 root   root     4096 Nov  7 14:09 oem12c
[root@testdb product]# chown -R oracle.oinstall oem12c
[root@testdb product]# ll
total 8
drwxr-xr-x 60 oracle oinstall 4096 Dec 15  2011 10.2.0
drwxr-xr-x  3 oracle oinstall 4096 Nov  7 14:09 oem12c

login OMS host as root user

如果没有DNS解析,oms和agent双方需要配置hosts文件

如oms端
[root@oem ~]# vi /etc/hosts
#append
192.168.192.8 testdb.anbob.com testdb
agent端
#append
192.168.192.8 oem.anbob.com oem

部署agent通过oem web

找开OEM12C ,推荐用IE浏览器,firfox多次尝试无法打开
https://192.168.168.191:7799/em
em12c anbob
用sysman 登录
点右上角的
设置—添加目标—手动添加目标

添加主机目标–会话名称默认
填写主机名
填写agent 目录 /oracle/product/oem12c/agent
命名的身份认证填写oracle 及密码下一步

部署代理

开始一个初始化,远程先决条件检查,代理部署,可以tail -f 下面的oms日志位置 ,是一个cp,sh 的过程

安装成功后在oem左上角的 目标—-主机(Target -> host) 可以看到对主机的监控,系统信息,cpu,memory,FS,network

接着填加目标机上的数据库实例

同样是右上角 设置—添加目标—手动添加目标

通过指定目标监视属性添加非主机目标—数据库实例–监听代理中选择刚才填加的主机代理,点手动填加

名称、数据库系统随便填
Oracle 主目录路径 填ORACLE_HOME路径
[oracle@testdb ~]$ env|grep ORACLE
ORACLE_SID=testdb
ORACLE_BASE=/oracle
ORACLE_HOME=/oracle/product/10.2.0

解锁dbsnmp用户
SQL> alter user dbsnmp identified by oracle;
SQL> alter user dbsnmp account unlock;

lsnrctl status查看端口号

首选连接字符串可为空

可以先测试连接,成功下一步

查看数据库,还是目标–数据库

功能很强大,等过上一段时间数据上传上来后自己研究吧

停止agent
到agent的安装目录下如
/oracle/product/oem12c/agent/core/12.1.0.2.0/bin/emctl stop agent

开机自动启动agent根源
/etc/init.d/gcstartup调用了shell

$AGENT_HOME/install/unix/scripts/agentstup

官方文档http://docs.oracle.com/cd/E24628_01/install.121/e22624/install_agent.htm

打赏

对不起,这篇文章暂时关闭评论。