Oracle EM 12c 安装图解
EM 12c系统由下列组件构成:
1.Oracle Management Agent(管理代理)
2.Oracle Management Service(管理服务)
3.Oracle Management Repository(管理资料档案库)
4.Plug-Ins(插件)
5.Enterprise Manager Cloud Control Console(EMCC控制台)
EM12c组件之间的 关系如下图
server 端的准备:
Oracle RDBMS 11.2.0.4
操作系统RedHat7 防火墙关闭
如果之前安装了EM,需要删除
$ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop
OMS安装
1检查CPU
cat /proc/cpuinfo |grep process
2检查内存
free
3检查硬盘空间
df -h
系统内核参数调整
在/etc/sysctl.conf中添如下内核参数:
kernel.shmmax = 4294967296
修改 /etc/redhat-release
Red Hat Enterprise Linux Server release 6.0 (Maipo)
yum -y install glibc-devel-2.17-55.el7.i686.rpm
安装路径信息
mkdir -p /home/oracle/app/oracle/mw #Middleware Home
mkdir -p /home/oracle/app/oracle/agent #Agent Base
mkdir -p /home/oracle/app/oracle/mw/gc_inst #OMS Instance Base
mkdir -p /home/oracle/app/oracle/mw/oms #OMS Home
修改数据库参数:
exec DBMS_AUTO_TASK_ADMIN.DISABLE(client_name => 'auto optimizer statscollection',operation => NULL,window_name => NULL);
alter system set processes= 500 scope=spfile;
alter system set session_cached_cursors=500 scope=spfile;
alter system set shared_pool_size=650M scope=spfile;
alter system set job_queue_processes=22 scope=spfile;
alter database add logfile size 320M;
alter system set open_cursors=350 scope=spfile;
alter system set sga_target=2g scope=spfile;
ALTER SYSTEM SET pga_aggregate_target=1G SCOPE=SPFILE;
alter system set parallel_max_servers = 1 scope=both;
server 端安装:
将下载好的三个ZIP文件解压到同一目录
[oracle@ydorcl ~]$ cd /home/app/em12c/
[oracle@ydorcl em12c]$ ls
bipruntime jdk oms release_notes.pdf runInstaller wls
install libskgxn plugins response stage WT.zip
[oracle@ydorcl em12c]$ ./runInstaller
遇到的报错:
1
解决方法:
ulimit -n 4096
2
禁用11G的自动收集job
SQL> select client_name,status from DBA_AUTOTASK_CLIENT; CLIENT_NAME STATUS ---------------------------------------------------------------- --------
auto optimizer stats collection ENABLED auto space advisor ENABLED sql tuning advisor ENABLED
begin DBMS_AUTO_TASK_ADMIN.DISABLE(client_name => 'auto optimizer stats collection', operation => NULL, window_name => NULL); end;
/ PL/SQL procedure successfully completed.
SQL> select client_name,status from DBA_AUTOTASK_CLIENT; CLIENT_NAME STATUS ---------------------------------------------------------------- --------
auto optimizer stats collection DISABLED auto space advisor ENABLED sql tuning advisor ENABLED
3
/home/oracle/app/oracle/mw/Oracle_WT/lib/sysliblist 添加:
-ldms2
安装完成后,可查看
/u01/app/oracle/Middleware/oms/install/具体的安装信息
如:setupinfo.txt可查看oem的地址,comsole的地址
portlist.ini 可查看具体端口
[oracle@ydorcl ~]$ cat .bash_profile
export PATH=$OMS_HOME/bin:$CRS_HOME/bin:$ORACLE_HOME/bin/:$PATH
export OMS_HOME=/home/oracle/app/oracle/mw/oms
命令行启/停OMS
[oracle@ydrac3 ~]$ export OMS_HOME=/home/u01/oms12c/oms
$OMS_HOME/bin/emctl stop oms #注意:只停止Managed Server
$OMS_HOME/bin/emctl stop oms -all #注意:会停止AdminServer
如果无法正常停止可以使用
$OMS_HOME/bin/emctl stop oms -force
启动OMS
export OMS_HOME=/home/u01/oms12c/oms
$OMS_HOME/bin/emctl start oms
查看OMS当前状态
$OMS_HOME/bin/emctl status oms
安装Agent:采用“推送”方法
1 确保OMS server 和target server 间的通信畅通
如果主机未配置在DNS中,在/etc/hosts 互相解析主机名使其能相互ping通对方的主机名
2 Agent端配置sudo
12c部署agent要求创建必要的credentail profile,该credential profile将包含能够从OMS server ssh到目标端target node的用户身份认证,且要求该用户能够在target node上以sudo执行用户的权限。
确保/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 --这里加一行
3 创建必要的目录
mkdir -p /home/oracle/app/oracle/agnet
4 部署agent
菜单位置:“位置”-->“添加目标”-->“手动添加目标”,如下图
添加数据库:
测试连接完成后方可下一步。第三步部署完成了。