Oracle Enterprise Manager Cloud Control 12c R4 安装配置

准备软件

em12.1.0.4_linux64_V45344-01.zip

em12.1.0.4_linux64_V45345-01.zip

em12.1.0.4_linux64_V45346-01.zip

 

安装操作系统(OEL6.5)

给 OS 空间 50G 以上装完OS和CC后需要占用 30G 空间建议6G 内存最少4G

 

 

[oracle@ newcc bin]$ cat /etc/hosts

127.0.0.1  localhostlocalhost.localdomain localhost4 localhost4.localdomain4

::1localhostlocalhost.localdomainlocalhost6 localhost6.localdomain6

 

10.1.32.229 OEL65

 

安装ccdb数据库

按照gcdb 11g的环境即可

[oracle@ newcc ~]$ uname -r

3.8.13-16.2.1.el6uek.x86_64

 

[root@OEL65 ~]# rpm -q --qf'%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' \binutils compat-libstdc++-33elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-commonglibc-devel glibc-headers ksh libaio libaio-devel libgomp- libgcc libstdc++libstdc++-devel make numactl-devel- sysstat unixODBC unixODBC-devel compat-libcap1

binutils-2.20.51.0.2-5.36.el6 (x86_64)

compat-libstdc++-33-3.2.3-69.el6 (x86_64)

compat-libstdc++-33-3.2.3-69.el6 (i686)

elfutils-libelf-0.152-1.el6 (x86_64)

elfutils-libelf-0.152-1.el6 (i686)

elfutils-libelf-devel-0.152-1.el6 (x86_64)

elfutils-libelf-devel-0.152-1.el6 (i686)

gcc-4.4.7-4.el6 (x86_64)

gcc-c++-4.4.7-4.el6 (x86_64)

glibc-2.12-1.132.el6 (x86_64)

glibc-2.12-1.132.el6 (i686)

glibc-common-2.12-1.132.el6 (x86_64)

glibc-devel-2.12-1.132.el6 (x86_64)

glibc-devel-2.12-1.132.el6 (i686)

glibc-headers-2.12-1.132.el6 (x86_64)

ksh-20120801-10.el6 (x86_64)

libaio-0.3.107-10.el6 (x86_64)

libaio-0.3.107-10.el6 (i686)

libaio-devel-0.3.107-10.el6 (x86_64)

libaio-devel-0.3.107-10.el6 (i686)

libgomp-4.4.7-4.el6 (x86_64)

libgcc-4.4.7-4.el6 (x86_64)

libgcc-4.4.7-4.el6 (i686)

libstdc++-4.4.7-4.el6 (x86_64)

libstdc++-4.4.7-4.el6 (i686)

libstdc++-devel-4.4.7-4.el6 (x86_64)

libstdc++-devel-4.4.7-4.el6 (i686)

make-3.81-20.el6 (x86_64)

numactl-devel-2.0.7-8.el6 (x86_64)

sysstat-9.0.4-22.el6 (x86_64)

unixODBC-2.2.14-12.el6_3 (x86_64)

unixODBC-2.2.14-12.el6_3 (i686)

unixODBC-devel-2.2.14-12.el6_3 (i686)

unixODBC-devel-2.2.14-12.el6_3 (x86_64)

compat-libcap1-1.10-1 (x86_64)

[root@OEL65 ~]#

 

#默认值

/etc/sysctl.conf

[root@newcc soft]#sysctl -p

kernel.msgmnb = 65536

kernel.msgmax = 65536

fs.file-max = 6815744

kernel.sem = 250 32000 100 128

kernel.shmmni = 4096

kernel.shmall = 1073741824

kernel.shmmax = 4398046511104

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

fs.aio-max-nr = 1048576

net.ipv4.ip_local_port_range = 9000 65500

 

#默认值

vi /etc/security/limits.conf

 

oracle           soft    nproc  2047

oracle           hard    nproc  16384

oracle           soft    nofile 1024

oracle           hard    nofile 65536

 

 

vi /etc/pam.d/login

session    required     pam_limits.so

 

#关闭SELINUX

vi /etc/selinux/config

SELINUX=disabled

 

#关闭防火墙

[root@newcc~]# service iptables stop

iptables:将链设置为政策 ACCEPT:filter                    [确定]

iptables:清除防火墙规则:                                 [确定]

iptables:正在卸载模块:                                   [确定]

[root@newcc~]# chkconfig iptables off

 

 

#创建组和用户

groupadd oinstall默认已经有

groupadd dba默认已经有

groupadd oper

groupadd asmadmin

userdel oracle  

cd /home rm -rf oracle

useradd -g oinstall -G dba,oper,asmadmin oracle

passwd oracle

 

#创建目录

mkdir -p /u01/app/ora11g

mkdir -p /u01/app/ora11g/product

mkdir -p /u01/app/ora11g/oradata

mkdir -p /u01/app/ora11g/product/11.2.0/db_1

chown -R oracle:oinstall /u01

chmod -R 775 /u01

 

#创建环境变量

su – oracle

vi .bash_profile

 

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_TERM=xterm

export ORACLE_BASE=/u01/app/ora11g

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

export ORACLE_GRID=$ORACLE_BASE/product/11.2.0/grid

export ORACLE_SID=ccdb

export PATH=/usr/sbin:$PATH

export PATH=$ORACLE_HOME/bin:$ORACLE_GRID/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/usr/X11R6/lib64

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export NLS_LANG="SIMPLIFIEDCHINESE_CHINA.ZHS16GBK"

exportALERT=$ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace

stty erase ^H

umask 022

if [ $USER = "oracle" ]; then

 if [$SHELL = "/bin/ksh" ]; then

      ulimit -p 16384

      ulimit -n 65536

   else

      ulimit -u 16384 -n 65536

           fi

          fi

 

#格式化分区

fdisk -l

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第1张图片

 

 

[root@newcc ~]#

fdisk /dev/sdb

n p 1 w

 

#创建ASM disk

--检查asm包安装

[root@newcc ~]# rpm -qa oracleasm*

oracleasm-support-2.1.8-1.el6.x86_64

 

rpm –vih asmlib

 

[root@newcc ~]# /etc/init.d/oracleasmconfigure

Configuring the Oracle ASM library driver.

 

This will configure the on-boot propertiesof the Oracle ASM library

driver. The following questions will determine whether the driver is

loaded on boot and what permissions it willhave.  The current values

will be shown in brackets ('[]').  Hitting <ENTER> without typing an

answer will keep that current value.  Ctrl-C will abort.

 

Default user to own the driver interface[]: oracle

Default group to own the driver interface[]: asmadmin

Start Oracle ASM library driver on boot(y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n)[y]: y

Writing Oracle ASM library driverconfiguration: done

Initializing the Oracle ASMLib driver:                     [  OK  ]

Scanning the system for Oracle ASMLibdisks:               [  OK  ]

[root@newcc ~]# /etc/init.d/oracleasmcreatedisk v1 /dev/sdb1

Marking disk "v1" as an ASMdisk:                          [  OK  ]

[root@newcc ~]# /etc/init.d/oracleasmcreatedisk v2 /dev/sdc1

Marking disk "v2" as an ASMdisk:                          [  OK  ]

[root@newcc ~]# /etc/init.d/oracleasmlistdisks

V1

V2

 

#配置host文件

[root@newcc~]# vi /etc/hosts

#cc

10.1.5.122      newcc.localdomain       newcc

 

#Public

10.1.32.91      ntrac1.localdomain      ntrac1

10.1.32.93      ntrac2.localdomain      ntrac2

10.1.32.95      ntrac3.localdomain      ntrac3

 

#Virtual

10.1.32.92      ntrac1-vip.localdomain  ntrac1-vip

10.1.32.94      ntrac2-vip.localdomain  ntrac2-vip

10.1.32.96      ntrac3-vip.localdomain  ntrac3-vip

 

#SCAN

10.1.32.99   rac-scan.localdomain  rac-scan

 

#Database和Grid安装

Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第2张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第3张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第4张图片


 

#创建ccdb数据库

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第5张图片

Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第6张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第7张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第8张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第9张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第10张图片

 

配置ccdb

redo log 修改大小100M 然后创建 4组 redo log

 

**  根据提示修改就OK

ALTER SYSTEM SETprocesses=500 SCOPE=SPFILE;

系统已更改。

ALTER SYSTEM SETsession_cached_cursors=500 SCOPE=SPFILE;

系统已更改

ALTER SYSTEM SETsga_target=2G SCOPE=SPFILE; 默认要比这个大就不动

ALTER SYSTEM SETpga_aggregate_target=2G SCOPE=SPFILE;

ALTER SYSTEM SETjob_queue_processes=20SCOPE=SPFILE; 默认1000 要缩小

ALTER SYSTEM SETopen_cursors=300 SCOPE=SPFILE;

 

**

 

 

--Restart the instance.

SHUTDOWNIMMEDIATE

STARTUP

 

 

 

安装Cloud Control

官方文档参考:

http://docs.oracle.com/cd/E24628_01/install.121/e22624/install_em_exist_db.htm#BGBHDBCH

 

创建CC安装目录

oracleuser

$ mkdir-p /u01/app/oracle/oms12cr4

$mkdir -p /u01/app/oracle/agent12cr4

 

添加环境变量

 

export LANG=zh_CN

export TMP=/tmp

export TMPDIR=$TMP

export ORACLE_TERM=xterm

exportORACLE_BASE=/u01/app/ora11g

exportORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

exportORACLE_GRID=$ORACLE_BASE/product/11.2.0/grid

export OMS_HOME=/u01/app/oracle/oms12cr4/oms

export AGENT_HOME=/u01/app/oracle/agent12cr4/core/12.1.0.4.0

export ORACLE_SID=ccdb

export PATH=/usr/sbin:$PATH

exportPATH=$ORACLE_HOME/bin:$ORACLE_GRID/bin:$PATH

exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/usr/X11R6/lib64

exportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export NLS_LANG="SIMPLIFIEDCHINESE_CHINA.ZHS16GBK"

export ALERT=$ORACLE_BASE/diag/rdbms/$ORACLE_SID/$ORACLE_SID/trace

stty erase ^H

umask 022

if [ $USER = "oracle"]; then

 if [ $SHELL = "/bin/ksh" ]; then

       ulimit -p 16384

       ulimit -n 65536

    else

       ulimit -u 16384 -n 65536

            fi

           fi

 

启动安装CC

 

--临时注释掉下面几个环境变量

unset ORACLE_HOME ORACLE_BASE ORACLE_SID

 

[oracle@newcccc]$ ls

install  jdk libskgxn  oms  plugins Release_Notes.pdf  response  runInstaller stage  wls  WT.zip

[oracle@newcccc]$ ./runInstaller

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第11张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第12张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第13张图片


因为主机名没有加domain

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第14张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第15张图片


如果选着高级是这样

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第16张图片


 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第17张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第18张图片


可以选择小中大型部署

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第19张图片

 

删除em之前的dbconsole是stop的

[root@OEL65 112db]# su - oracle

[oracle@OEL65 ~]$ export LANG=zh_EN

[oracle@OEL65 ~]$ emca -deconfig dbcontrol db-repos drop

 

EMCA 开始于 2013-12-9 21:06:52

EM Configuration Assistant, 11.2.0.3.0 正式版

版权所有 (c) 2003, 2011, Oracle。保留所有权利。

 

输入以下信息:

数据库 SID: ngcdb

监听程序端口号: 1521

SYS 用户的口令: 

SYSMAN 用户的口令: 

 

----------------------------------------------------------------------

警告: 当删除资料档案库时, 数据库将进入静默模式。

----------------------------------------------------------------------

是否继续? [是(Y)/否(N)]: y

2013-12-9 21:07:54oracle.sysman.emcp.EMConfig perform

信息: 正在将此操作记录到/u01/app/ora11g/cfgtoollogs/emca/ngcdb/emca_2013_12_09_21_06_51.log。

2013-12-9 21:07:55oracle.sysman.emcp.util.DBControlUtilstopOMS

信息: 正在停止 Database Control (此操作可能需要一段时间)...

2013-12-9 21:07:57oracle.sysman.emcp.EMReposConfig invoke

信息: 正在删除 EM 资料档案库 (此操作可能需要一段时间)...

2013-12-9 21:09:22oracle.sysman.emcp.EMReposConfig invoke

信息: 已成功删除资料档案库

已成功完成 Enterprise Manager 的配置

EMCA 结束于 2013-12-9 21:09:25

[oracle@OEL65 ~]$

 

Alert delete em

Mon Dec 09 21:08:01 2013

XDB installed.

XDB initialized.

Mon Dec 09 21:08:02 2013

Stopping background process CJQ0

Mon Dec 09 21:08:02 2013

ALTER SYSTEM SET job_queue_processes=0SCOPE=BOTH SID='*';

Warning: drop_queue_table: No evaluationfor the queue table: SYSMAN.MGMT_TASK_QTABLE

Warning: drop_queue_table: No evaluationfor the queue table: SYSMAN.MGMT_NOTIFY_INPUT_QTABLE

Warning: drop_queue_table: No evaluationfor the queue table: SYSMAN.MGMT_PAF_MSG_QTABLE_1

Warning: drop_queue_table: No evaluationfor the queue table: SYSMAN.MGMT_PAF_MSG_QTABLE_2

Mon Dec 09 21:08:28 2013

Thread 1 advanced to log sequence 9 (LGWRswitch)

 Current log# 3 seq# 9 mem# 0:+DATA/ngcdb/onlinelog/group_3.263.833729183

 Current log# 3 seq# 9 mem# 1: +FRA/ngcdb/onlinelog/group_3.259.833729183

Mon Dec 09 21:08:29 2013

Archived Log entry 4 added for thread 1sequence 8 ID 0x9c38e516 dest 1:

Mon Dec 09 21:08:48 2013

Thread 1 advanced to log sequence 10 (LGWRswitch)

ALTER SYSTEM SET job_queue_processes=20 SCOPE=BOTHSID='*';

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第20张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第21张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第22张图片

 

手动写+DATA

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第23张图片

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第24张图片

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第25张图片

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第26张图片

 

简单安装方法界面如下:

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第27张图片

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第28张图片

 

Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第29张图片

 

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第30张图片

 

[root@OEL65 ~]# export LANG=zh_CN

[root@OEL65 ~]#/u01/app/oracle/oms12cr3/oms/allroot.sh

 

Starting to execute allroot.sh .........

 

Starting to execute /u01/app/oracle/oms12cr3/oms/root.sh......

Running Oracle 11g root.sh script...

 

The following environment variables are setas:

   ORACLE_OWNER= oracle

   ORACLE_HOME= /u01/app/oracle/oms12cr3/oms

 

Enter the full pathname of the local bindirectory: [/usr/local/bin]:

The file "dbhome" already existsin /usr/local/bin.  Overwrite it? (y/n)

[n]: y

  Copying dbhome to /usr/local/bin ...

The file "oraenv" already existsin /usr/local/bin.  Overwrite it? (y/n)

[n]: y

  Copying oraenv to /usr/local/bin ...

The file "coraenv" already existsin /usr/local/bin.  Overwrite it? (y/n)

[n]: y

  Copying coraenv to /usr/local/bin ...

 

Entries will be added to the /etc/oratabfile as needed by

Database Configuration Assistant when adatabase is created

Finished running generic part of root.shscript.

Now product-specific root actions will beperformed.

/etc exist

 

Creating /etc/oragchomelist file...

/u01/app/oracle/oms12cr3/oms

Finished execution of  /u01/app/oracle/oms12cr3/oms/root.sh ......

 

 

Starting to execute /u01/app/oracle/agent12cr3/core/12.1.0.3.0/root.sh......

Finished product-specific root actions.

/etc exist

Finished execution of /u01/app/oracle/agent12cr3/core/12.1.0.3.0/root.sh ......

[root@OEL65 ~]#

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第31张图片

 

https://10.1.5.122:7802/em/

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第32张图片

 

Sysman

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第33张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第34张图片

 

安装后续操作

CC相关命令

#!/bin/bash

exportORACLE_HOME=/u01/app/oracle/product/11.2.0.3/db_1

exportOMS_HOME=/u01/app/oracle/oms12cr3/oms

exportAGENT_HOME=/u01/app/oracle/agent12cr3/core/12.1.0.3.0

 

# Start everything

$ORACLE_HOME/bin/dbstart$ORACLE_HOME

 

$OMS_HOME/bin/emctlstart oms

 

$AGENT_HOME/bin/emctlstart agent

 

#!/bin/bash

exportORACLE_HOME=/u01/app/oracle/product/11.2.0.3/db_1

exportOMS_HOME=/u01/app/oracle/oms12cr3/oms

exportAGENT_HOME=/u01/app/oracle/agent12cr3/core/12.1.0.3.0

 

# Stop everything

$OMS_HOME/bin/emctlstop oms -all

 

$AGENT_HOME/bin/emctlstop agent

 

$ORACLE_HOME/bin/dbshut$ORACLE_HOME

 

添加ccdb目标数据库

Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第35张图片

 

点搜索列表

Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第36张图片

 

先点添加提示数据库

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第37张图片

Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第38张图片


选折要添加数据库所在的主机

Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第39张图片

 

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第40张图片

 

先点测试

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第41张图片

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第42张图片


Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第43张图片

 

点数据库用sysman登陆

 Oracle Enterprise Manager Cloud Control 12c R4 安装配置_第44张图片

 

[oracle@newcc bin]$ pwd

/u01/app/oracle/oms12cr3/oms/bin

[oracle@newcc bin]$./emctl status oms

Oracle Enterprise Manager Cloud Control 12cRelease 3 

Copyright (c) 1996, 2013 OracleCorporation.  All rights reserved.

WebTier is Up

Oracle Management Server is Up

 

[oracle@newcc bin]$ ./emctl status oms -details

Oracle Enterprise Manager Cloud Control 12cRelease 3 

Copyright (c) 1996, 2013 Oracle Corporation.  All rights reserved.

Enter Enterprise Manager Root (SYSMAN)Password :

Console Server Host        : newcc

HTTP Console Port          : 7788

HTTPS Console Port         : 7802

HTTP Upload Port           : 4889

HTTPS Upload Port          : 4903

EM Instance Home           :/u01/app/oracle/gc_inst/em/EMGC_OMS1

OMS Log Directory Location :/u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/log

OMS is not configured with SLB or virtualhostname

Agent Upload is locked.

OMS Console is locked.

Active CA ID: 1

Console URL: https://newcc:7802/em

Upload URL: https://newcc:4903/empbs/upload

 

WLS Domain Information

Domain Name            : GCDomain

Admin Server Host      : newcc

Admin Server HTTPS Port: 7102

Admin Server is RUNNING

 

Managed Server Information

Managed Server Instance Name: EMGC_OMS1

Managed Server Instance Host: newcc

WebTier is Up

Oracle Management Server is Up

[oracle@newcc bin]$ pwd

/u01/app/oracle/oms12cr3/oms/bin

 

[oracle@newcc bin]$ pwd

/u01/app/oracle/agent12cr3/agent_inst/bin

[oracle@newcc bin]$ ./emctl  status agent

Oracle Enterprise Manager Cloud Control 12cRelease 3 

Copyright (c) 1996, 2013 OracleCorporation.  All rights reserved.

---------------------------------------------------------------

Agent Version     : 12.1.0.3.0

OMS Version       :12.1.0.3.0

Protocol Version  : 12.1.0.1.0

Agent Home        : /u01/app/oracle/agent12cr3/agent_inst

Agent Binaries    :/u01/app/oracle/agent12cr3/core/12.1.0.3.0

Agent Process ID  : 3676

Parent Process ID : 3607

Agent URL         : https://newcc:3872/emd/main/

Repository URL    : https://newcc:4903/empbs/upload

Started at        : 2014-02-17 09:24:59

Started by user   : oracle

Last Reload       : (none)

Last successful upload                       : 2014-02-17 10:06:31

Last attempted upload                        : 2014-02-17 10:06:31

Total Megabytes of XML files uploaded sofar : 0.27

Number of XML files pending upload           : 0

Size of XML files pending upload(MB)         : 0

Available disk space on uploadfilesystem    : 14.86%

Collection Status                            : Collectionsenabled

Heartbeat Status                             : Ok

Last attempted heartbeat to OMS              : 2014-02-17 10:07:15

Last successful heartbeat to OMS             : 2014-02-17 10:07:15

Next scheduled heartbeat to OMS              : 2014-02-17 10:08:15

 

---------------------------------------------------------------

Agent is Running and Ready

[oracle@newcc bin]$

 


你可能感兴趣的:(Oracle Enterprise Manager Cloud Control 12c R4 安装配置)