OMS,OMR安装在一台服务器
OS: Oracle Linux 5.9 x86_64
RAM: 6GB
OEM: 12.1.0.3
REPDB: 11.2.0.4
HOSTNAME: omsdb.localdomain
OMS12cR3认证平台
--安装软件包
[[email protected] ~]# yum -y install oracle-validated
--创建目录
[[email protected] ~]# mkdir -p /u01/app/oracle
[[email protected] ~]# chown -R oracle:oinstall /u01/app
[[email protected] ~]# chmod -R 775 /u01/app
配置环境变量
export ORACLE_HOSTNAME=omsdb.localdomain
export ORACLE_SID=REPDB
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export WLS_HOME=/u01/app/oracle/product/Middleware/wlsserver_10.3
export OMS_HOME=/u01/app/oracle/product/Middleware/oms
export AGENT_HOME=/u01/app/oracle/product/agent/core/12.1.0.3.0
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
--如果REPDB配置了DB Control必须删除,使用oracle用户执行以下语句
emca -deconfig dbcontrol db -repos drop -SYS_PWD <sys pasword> -SYSMAN_PWD <sysman password> -SID <databse sid> -PORT <port number>
--REPDB中不能有SYSMAN用户,如果有必须删除
[[email protected] ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Feb 19 12:11:05 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name from v$database;
NAME
---------
REPDB
SQL> select * from dba_users where username like 'SYSMAN%';
no rows selected
--默认情况下确保以下端口可用
Admin Server HTTP SSL Port = 7101 - 7200
Enterprise Manager Upload HTTP Port = 4889 - 4898
Enterprise Manager Upload HTTP SSL Port = 1159, 4899 - 4908
Enterprise Manager Central Console HTTP Port = 7788 - 7798
Enterprise Manager Central Console HTTP SSL Port = 7799 -7809
Oracle Management Agent Port = 3872, 1830 - 1849
--调整REPDB参数
ALTER SYSTEM SET processes=300 SCOPE=SPFILE;
ALTER SYSTEM SET session_cached_cursors=200 SCOPE=SPFILE;
ALTER SYSTEM SET sga_target=2G SCOPE=SPFILE;
ALTER SYSTEM SET shared_pool_size=600M SCOPE=SPFILE;
ALTER SYSTEM SET pga_aggregate_target=1G SCOPE=SPFILE;
ALTER SYSTEM SET job_queue_processes=20 SCOPE=SPFILE;
ALTER SYSTEM SET log_buffer=10485760 SCOPE=SPFILE;
ALTER SYSTEM SET open_cursors=300 SCOPE=SPFILE;
SHUTDOWN IMMEDIATE
STARTUP
--解压em12cr3
[[email protected] ~]$ mkdir em12cr3
[[email protected] ~]$ unzip -d em12cr3 em12103_linux64_disk1.zip
[[email protected] ~]$ unzip -d em12cr3 em12103_linux64_disk2.zip
[[email protected] ~]$ unzip -d em12cr3 em12103_linux64_disk3.zip
--因为OMS和OMR安装在一台服务器,所以安装钱取消相关环境变量
[[email protected] em12cr3]$ unset ORACLE_HOME ORACLE_BASE ORACLE_SID
[[email protected] em12cr3]$ env|grep ORACLE
ORACLE_HOSTNAME=omsdb
--安装OMS
[[email protected] em12cr3]$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 400 MB. Actual 87841 MB Passed
Checking swap space: must be greater than 150 MB. Actual 7967 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-02-19_12-36-17PM. Please wait ...[[email protected] em12cr3]$
--不填写MOS信息
--不更新,选择Skip
--Next
--选择Advanced
--输入安装路径
--选择Plug-ins
--设置weblogic和nodemanager密码
--输入REPDB信息
--输入SYSMAN和agent注册密码
--选择默认OMS安装端口
--安装概要
--执行allroot.sh
[[email protected] ~]# /u01/app/oracle/product/Middleware/oms/allroot.sh
Starting to execute allroot.sh .........
Starting to execute /u01/app/oracle/product/Middleware/oms/root.sh ......
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/Middleware/oms
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
[n]:
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
/etc exist
Creating /etc/oragchomelist file...
/u01/app/oracle/product/Middleware/oms
Finished execution of /u01/app/oracle/product/Middleware/oms/root.sh ......
Starting to execute /u01/app/oracle/product/agent/core/12.1.0.3.0/root.sh ......
Finished product-specific root actions.
/etc exist
Finished execution of /u01/app/oracle/product/agent/core/12.1.0.3.0/root.sh ......
--安装完成
--SYSMAN账户登录EM
https://192.168.1.200:7799/em
--关闭oms步骤
export ORACLE_SID=REPDB
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export OMS_HOME=/u01/app/oracle/product/Middleware/oms
export AGENT_HOME=/u01/app/oracle/product/agent/core/12.1.0.3.0
#stop Target Agent
#$AGENT_HOME/bin/emctl stop agent
$AGENT_HOME/bin/emctl stop agent
$OMS_HOME/bin/emctl stop oms -all
lsnrctl stop
sqlplus / as sysdba
shutdown immediate
[[email protected] ~]$ export OMS_HOME=/u01/app/oracle/product/Middleware/oms
[[email protected] ~]$ export AGENT_HOME=/u01/app/oracle/product/agent/core/12.1.0.3.0
[[email protected] ~]$ $AGENT_HOME/bin/emctl stop agent
Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
Stopping agent ..... stopped.
[[email protected] ~]$ $OMS_HOME/bin/emctl stop oms -all
Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
AdminServer Successfully Stopped
Oracle Management Server is Down
--启动oms步骤
export ORACLE_SID=REPDB
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
export OMS_HOME=/u01/app/oracle/product/Middleware/oms
export AGENT_HOME=/u01/app/oracle/product/agent/core/12.1.0.3.0
lsnrctl start
sqlplus / as sysdba
startup
$OMS_HOME/bin/emctl start oms
$AGENT_HOME/bin/emctl start agent
#startup Target Agent
#$AGENT_HOME/bin/emctl start agent
[[email protected] ~]$ $OMS_HOME/bin/emctl start oms
Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
Starting Oracle Management Server...
Starting WebTier...
WebTier Successfully Started
Oracle Management Server Successfully Started
Oracle Management Server is Up
[[email protected] ~]$ $AGENT_HOME/bin/emctl start agent
Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
Starting agent ............................... started.
[[email protected] ~]$
[[email protected] ~]$
--查看OMS状态
[[email protected] ~]$ $OMS_HOME/bin/emctl status oms
Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
WebTier is Up
Oracle Management Server is Up
[[email protected] ~]$
[[email protected] ~]$ $OMS_HOME/bin/emctl status oms -details
Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host : omsdb.localdomain
HTTP Console Port : 7788
HTTPS Console Port : 7799
HTTP Upload Port : 4889
HTTPS Upload Port : 4900
EM Instance Home : /u01/app/oracle/product/gc_inst/em/EMGC_OMS1
OMS Log Directory Location : /u01/app/oracle/product/gc_inst/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL: https://omsdb.localdomain:7799/em
Upload URL: https://omsdb.localdomain:4900/empbs/upload
WLS Domain Information
Domain Name : GCDomain
Admin Server Host : omsdb.localdomain
Admin Server HTTPS Port: 7101
Admin Server is RUNNING
Managed Server Information
Managed Server Instance Name: EMGC_OMS1
Managed Server Instance Host: omsdb.localdomain
WebTier is Up
Oracle Management Server is Up
[[email protected] ~]$
[[email protected] ~]$ $AGENT_HOME/bin/emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation. 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/product/agent/agent_inst
Agent Binaries : /u01/app/oracle/product/agent/core/12.1.0.3.0
Agent Process ID : 28563
Parent Process ID : 28514
Agent URL : https://omsdb.localdomain:3872/emd/main/
Repository URL : https://omsdb.localdomain:4900/empbs/upload
Started at : 2014-02-19 16:17:13
Started by user : oracle
Last Reload : (none)
Last successful upload : 2014-02-19 16:19:15
Last attempted upload : 2014-02-19 16:19:15
Total Megabytes of XML files uploaded so far : 0.02
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0
Available disk space on upload filesystem : 71.27%
Collection Status : Collections enabled
Heartbeat Status : Ok
Last attempted heartbeat to OMS : 2014-02-19 16:19:32
Last successful heartbeat to OMS : 2014-02-19 16:19:32
Next scheduled heartbeat to OMS : 2014-02-19 16:20:32
---------------------------------------------------------------
Agent is Running and Ready