NOTE: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.”
1.准备工作:
12c部署agent要求创建必要的credentail profile,该credential profile将包含能够从OMS server ssh到目标端target node的用户身份认证,且要求该用户能够在target node上以sudo执行用户的权限。
这里我们以oracle用户为例,我们将以目标节点上的oracle用户身份创建credential profile,首先我们要确保oracle用户能够以sudo执行root用户的权限,这需要用到/etc/sudoers配置文件:
确保/usr/local/bin/sudo这个符号链接存在
[root@orc2 ~]# ln -s /usr/bin/sudo /usr/local/bin/sudo
[root@orc2 ~]# ls -l /etc/sudoers
-r--r----- 1 root root 3381 Nov 12
2010 /etc/sudoers
[root@orc2 ~]# 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@orc2 ~]# su – oracle
[oracle@orc2 ~]$ 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 60
-rw------- 1 root root 1296
May 16 2014 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096
May 16 2014 Desktop
-rw-r--r-- 1 root root 38879 May 16
2014 install.log
-rw-r--r-- 1 root root 0
May 16 2014 install.log.syslog
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10271187/viewspace-1421579/
,如需转载,请注明出处,否则将追究法律责任。