Oracle 11gr2 Grid Infrastucture

Oracle 11gr2单实例环境的GI组件安装完成后
(1),可以使用crs_stat或srvctl进行资源管理;
(2),另外在创建ASM实例也需要GI的支持.
GI组件安装及脚本执行
安装包为p10404530_112030_LINUX_3of7.zip,安装完成后执行下面2个脚本.建议使用grid用户进行安装,当然也可以使用oracle账户,这里我就选择oracle.安装到最后会出现需要依次执行2个脚本.
[root@ora11gr2 grid]# /u01/app/grid/product/11.2.0.3.0/root.sh

Performing root user operation for Oracle 11g 

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/grid/product/11.2.0.3.0

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

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 script.
Now product-specific root actions will be performed.

To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:
/u01/app/grid/product/11.2.0.3.0/perl/bin/perl -I/u01/app/grid/product/11.2.0.3.0/perl/lib -I/u01/app/grid/product/11.2.0.3.0/crs/install /u01/app/grid/product/11.2.0.3.0/crs/install/roothas.pl


To configure Grid Infrastructure for a Cluster execute the following command:
/u01/app/grid/product/11.2.0.3.0/crs/config/config.sh
This command launches the Grid Infrastructure Configuration Wizard. The wizard also supports silent operation, and the parameters can be passed through the response file that is available in the installation media.
[root@ora11gr2 ~]#/u01/app/grid/product/11.2.0.3.0/perl/bin/perl -I/u01/app/grid/product/11.2.0.3.0/perl/lib -I/u01/app/grid/product/11.2.0.3.0/crs/install /u01/app/grid/product/11.2.0.3.0/crs/install/roothas.pl
Using configuration parameter file: /u01/app/grid/product/11.2.0.3.0/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
LOCAL ADD MODE 
Creating OCR keys for user 'oracle', privgrp 'dba'..
Operation successful.
LOCAL ONLY MODE 
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node ora11gr2 successfully pinned.
Adding Clusterware entries to inittab

ora11gr2     2012/08/21 11:50:02     /u01/app/grid/product/11.2.0.3.0/cdata/ora11gr2/backup_20120821_115002.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
[oracle@ora11gr2 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------  
ora.cssd       ora.cssd.type  OFFLINE   OFFLINE               
ora.diskmon    ora....on.type OFFLINE   OFFLINE               
ora.evmd       ora.evm.type   ONLINE    ONLINE    ora11gr2    
ora.ons        ora.ons.type   OFFLINE   OFFLINE               


GI安装后ASM的安装

http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html#oracleasm_rhel5_x86
Linux5.6 x86 ASMLib
oracleasm-2.6.18-238.el5-2.0.5-1.el5.i686.rpm
oracleasmlib-2.0.4-1.el5.i386.rpm
oracleasm-support-2.1.7-1.el5.i386.rpm

安装ASM之前,需要先装ASMLib对ASM磁盘进行卷处理,使得Oracle可以识别.
asmca安装ASM之后可以看到创建了ASM服务.
[oracle@ora11gr2 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------  
ora.DATA.dg    ora....up.type ONLINE    ONLINE    ora11gr2    
ora....VERY.dg ora....up.type ONLINE    ONLINE    ora11gr2    
ora.asm        ora.asm.type   ONLINE    ONLINE    ora11gr2    
ora.cssd       ora.cssd.type  ONLINE    ONLINE    ora11gr2    
ora.diskmon    ora....on.type OFFLINE   OFFLINE               
ora.evmd       ora.evm.type   ONLINE    ONLINE    ora11gr2    
ora.ons        ora.ons.type   OFFLINE   OFFLINE               
这里有一点需要注意:在登录sqlplus登录ASM之前需要将PATH环境变量切换到grid对应的$ORACLE_HOME/bin路径下,这里的ORACLE_HOME是/u01/app/grid/product/11.2.0.3.0,否则无法登陆;同时,当登录RDBMS数据库时,PATH也需要切换回来,为$ORACLE_HOME/bin,这里的ORACLE_HOME是/u01/app/oracle/product/11.2.0.3.0/db_1.

注册crs服务
srvctl add database -d ORA11G -o /u01/app/oracle/product/11.2.0.3.0/db_1
srvctl add database -d hdb11g -o /u01/app/oracle/product/11.2.0.3.0/db_1
srvctl add listener -l LISTENER -o /u01/app/oracle/product/11.2.0.3.0/db_1

[oracle@ora11gr2 ~]$ crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------  
ora.DATA.dg    ora....up.type ONLINE    ONLINE    ora11gr2    
ora....ER.lsnr ora....er.type ONLINE    ONLINE    ora11gr2    
ora....VERY.dg ora....up.type ONLINE    ONLINE    ora11gr2    
ora.asm        ora.asm.type   ONLINE    ONLINE    ora11gr2    
ora.cssd       ora.cssd.type  ONLINE    ONLINE    ora11gr2    
ora.diskmon    ora....on.type OFFLINE   OFFLINE               
ora.evmd       ora.evm.type   ONLINE    ONLINE    ora11gr2    
ora.hdb11g.db  ora....se.type ONLINE    ONLINE    ora11gr2    
ora.ons        ora.ons.type   OFFLINE   OFFLINE               
ora.ora11g.db  ora....se.type ONLINE    ONLINE    ora11gr2    
关闭CRS资源的顺序
关闭RDBMS实例
关闭listener
关闭diskgroup
关闭ASM

关闭其他支持的服务


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值