您的位置:首页 > 数据库 > Oracle

Oracle Study 之--Oracle 11g Grid control安装(OMS)

2016-09-23 11:35 375 查看
Oracle Study 之--Oracle 11g Grid control安装(OMS)

系统环境:
操作系统:          Oracle Linux 5.6(64)
 Oracle:              Oracle 11.2.0.3
 Weblogic:           Wls 10.3.2(32)
 Grid Control:   Grid Control 11.1.0.1 (64)
       由于此次安装,Weblogic没有下载到64位(10.3.2)的版本,以32位版本代替,安装成功。在使用10.3.6的版本安装时,多次在OMS configuration阶段会“failed”,所以采用10.3.2版本安装,问题解决。


一、GC系统架构

包括
Oracle Management Service(OMS), Oracle Management
Agent, 
Oracle Management Repository, GridControl Console四个组成部分.
系统架构如下:







二、安装准备工作

 1)、对于OMS安装,需要卸载系统原有的dbcontrol,以下为卸载步骤:

[oracle@ocm1 soft]$ emctl status dbconsole

Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0 

Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
https://ocm1:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is not running. 

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

Logs are generated in directory /u01/app/oracle/product/11.2.0/db_1/ocm1_enmoedu/sysman/log 
[oracle@ocm1 soft]$ emctl stop dbconsole

Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0 

Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
https://ocm1:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 11g Database Control ... 

 ...  Stopped. 
[oracle@ocm1 soft]$ emctl status dbconsole

Oracle Enterprise Manager 11g Database Control Release 11.2.0.3.0 

Copyright (c) 1996, 2011 Oracle Corporation.  All rights reserved.
https://ocm1:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is not running.
卸载dbcontrol:

[oracle@ocm1 soft]$ emca -deconfig dbcontrol db -repos drop


STARTED EMCA at Sep 20, 2016 2:33:47 PM

EM Configuration Assistant, Version 11.2.0.3.0 Production

Copyright (c) 2003, 2011, Oracle.  All rights reserved.

Enter the following information:

Database SID: enmoedu

Listener port number: 1521

Password for SYS user:  

Password for SYSMAN user:  

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

WARNING : While repository is dropped the database will be put in quiesce mode.

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

Do you wish to continue? [yes(Y)/no(N)]: Y

Sep 20, 2016 2:38:46 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u01/app/oracle/cfgtoollogs/emca/enmoedu/emca_2016_09_20_14_38_31.log.

Sep 20, 2016 2:38:47 PM oracle.sysman.emcp.util.DBControlUtil stopOMS

INFO: Stopping Database Control (this may take a while) ...

Sep 20, 2016 2:38:49 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Dropping the EM repository (this may take a while) ...

Sep 20, 2016 2:41:10 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully dropped

Enterprise Manager configuration completed successfully

FINISHED EMCA at Sep 20, 2016 2:41:14 PM

2)、配置数据库参数

14:42:46 SYS@ enmoedu>ALTER SYSTEM SET log_buffer=10485760 SCOPE=SPFILE;

System altered.

14:43:00 SYS@ enmoedu>ALTER SYSTEM SET processes=500 SCOPE=SPFILE;

System altered.

14:43:14 SYS@ enmoedu>ALTER SYSTEM SET session_cached_cursors=200 SCOPE=SPFILE;

System altered.

14:44:39 SYS@ enmoedu>alter database datafile 3 resize 200m;

Database altered.

调整redo logfile的size,每个日志组大小为200m。

3)、配置Oracle用户环境变量

[oracle@ocm1 ~]$ cat .bash_profile
export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=emrp

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

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export ORACLE_MIDDLEWARE_HOME_LOCATION=/u01/app/Oracle/Middleware

export OMS_HOME=/u01/app/Oracle/gc_inst

三、安装OMS

 1)、首先安装JDK要求版本在1.6以上(可以从OTN下载)

[root@ocm1 soft]# rpm -ivh jdk-8u101-linux-x64.rpm 

Preparing...                ########################################### [100%]

   1:jdk1.8.0_101         ########################################### [100%]

Unpacking JAR files...

        tools.jar...

        plugin.jar...

        javaws.jar...

        deploy.jar...

        rt.jar...

        jsse.jar...

        charsets.jar...

        localedata.jar...

2)安装Weblogic

   
由于OTN现在只提供10.3.6版本以上版本的下载,多次使用10.3.6(32或64位),在OMS configuration阶段总是“failed”;根据多方面建议,选择10.3.2版本,由于系统、数据库、GC都是64位版本,建议Weblogic也使用64位版本。本次安装没有能获得10.3.2的64位版本,故用32位代替。

[oracle@ocm1 soft]$ export DISPLAY=192.168.8.254:0.0

[oracle@ocm1 soft]$ chmod  +x    wls1032_linux32

[oracle@ocm1 soft]$ ./wls1032_linux32
Launcher log file is /tmp/OraInstall2016-09-20_02-15-34PM/launcher2016-09-20_02-15-34PM.log.
Extracting files..........
Starting Oracle Universal Installer













Weblogic安装完后,不选择“quick start”;不需要配置Weblogic的domain,在安装GC时会配置。

3)安装Grid Control (Version:11.1.0.1 ,64位)

对于Grid Control的安装,注意配置主机名,需要有域名支持

[root@ocm1 soft]# cat /etc/hosts

127.0.0.1    localhost

192.168.8.200   ocm1.enmoedu.com   ocm1

[root@ocm1 soft]# ls -l gc

total 4328832

-rwxr--r-- 1 oracle oinstall 1430649530 Sep 20 12:00 GridControl_11.1.0.1.0_Linux_x86-64_1of3.zip

-rwxr--r-- 1 oracle oinstall 1589671704 Sep 20 10:43 GridControl_11.1.0.1.0_Linux_x86-64_2of3.zip

-rwxr--r-- 1 oracle oinstall 1408054645 Sep 20 11:52 GridControl_11.1.0.1.0_Linux_x86-64_3of3.zip

[oracle@ocm1 soft]$ export DISPLAY=192.168.8.254:0.0

[oracle@ocm1 gc]$./runInstaller
















注意:GC的安装要求主机物理内存在3G以上






注意:图中Middleware Home Location:应该为 ‘/u01/app/Oracle/Middleware'











注意:图中SID根据数据实际情况应该为:emrp






注意:图中路径中的“enmoedu”按照实际安装路径应该是“emrp”



























注意:以“root”用户的身份运行脚本






注意:在weblogic使用10.3.6版本(32或64),在OMS configuration阶段总是“failed”;在使用10.3.2后,安装成功!

Failed 日志:

weblogic 10.3.6 安装gc 错误:
OMS configuration:
[oracle@ocm1 ~]$ tail -f /u01/app/Oracle/Middleware/oms11g/cfgtoollogs/omsca/omsca_20160921043159.log
Sep 21, 2016 4:38:54 AM oracle.sysman.omsca.adapter.wls.OMSWLSAdapter adapterDeleteOMS
FINE: Cleaning up instance home directory: /u01/app/Oracle/gc_inst/em
Sep 21, 2016 4:38:54 AM oracle.sysman.omsca.adapter.wls.OMSWLSAdapter adapterDeleteOMS
FINE: Succesfully deleted the oms
Sep 21, 2016 4:38:54 AM oracle.sysman.omsca.adapter.wls.OMSWLSAdapter adapterCleanup
FINE: The value of infra setup completion is :false
Sep 21, 2016 4:38:54 AM oracle.sysman.omsca.framework.OMSCAFreshInstall execute
SEVERE: ERROR:  Infrastructure setup  of EM failed.
Sep 21, 2016 4:38:54 AM oracle.sysman.omsca.framework.OMSConfigAssistantDriver main
FINE: Got resultfalse






Congratulations: Grid Control Install 终于Success !

三、安装后的验证

1)、查看OMS服务端口

[oracle@ocm1 gc]$ netstat -an |grep 7799

tcp        0      0 0.0.0.0:7799                0.0.0.0:*                   LISTEN      

[oracle@ocm1 gc]$ netstat -an |grep 7101

tcp        0      0 192.168.8.200:7101          0.0.0.0:*                   LISTEN      

tcp        0      0 192.168.8.200:7101          192.168.8.200:55547         ESTABLISHED 

tcp        0      0 192.168.8.200:7101          192.168.8.200:55566         ESTABLISHED 

tcp        0      0 192.168.8.200:55555         192.168.8.200:7101          ESTABLISHED 
2)、查看OMS Server状态

[oracle@ocm1 gc]$ cd /u01/app/Oracle/Middleware/oms11g/bin


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

Oracle Enterprise Manager 11g Release 1 Grid Control  

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

WebTier is Up

Oracle Management Server is Up
3)、查看OMS agent状态

[oracle@ocm1 bin]$ pwd
/u01/app/Oracle/Middleware/agent11g/bin

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


Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0 

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

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

Agent Version     : 11.1.0.1.0

OMS Version       : 11.1.0.1.0

Protocol Version  : 11.1.0.0.0

Agent Home        : /u01/app/Oracle/Middleware/agent11g

Agent binaries    : /u01/app/Oracle/Middleware/agent11g

Agent Process ID  : 31988

Parent Process ID : 31928
Agent URL            : https://ocm1.enmoedu.com:3872/emd/main/
Repository URL    : https://ocm1.enmoedu.com:4900/em/upload

Started at        : 2016-09-21 09:53:36

Started by user   : oracle

Last Reload       : 2016-09-21 09:54:29

Last successful upload                       : 2016-09-21 10:03:12

Total Megabytes of XML files uploaded so far :    26.37

Number of XML files pending upload           :        0

Size of XML files pending upload(MB)         :     0.00

Available disk space on upload filesystem    :    28.48%

Last successful heartbeat to OMS             : 2016-09-21 10:02:47

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

Agent is Running and Ready

[oracle@ocm1 bin]$ 

4)、通过console访问OMS
 对于OMS通过浏览器访问的https端口是7799,http访问是7202

[oracle@ocm1 bin]$ netstat -an |grep 7202


tcp        0      0 192.168.8.200:7202          0.0.0.0:*                   LISTEN      

tcp        0      0 192.168.8.200:27800         192.168.8.200:7202          ESTABLISHED 

tcp        0      0 192.168.8.200:7202          192.168.8.200:61800         TIME_WAIT   

tcp        0      0 192.168.8.200:7202          192.168.8.200:27792         ESTABLISHED 



通过http访问连接到OMS,访问成功!

总结:

      对于Oracle 11g Grid Control安装过程并不复杂,但是必须保证Weblogic版本和Grid Control版本匹配,才能保证安装顺利进行!

后续:Oracle 11g Grid Control Agent install
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  oracle