手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

一步一步在VirtualBox4.1.6中安装基于RHEL5.5x86_64的Oracle 10g R2双节点RAC

[日期:2012-02-02] 来源:Linux社区  作者:t0nsha [字体:大 中 小]

重新执行/u01/Oracle/crs/root.sh时,在rac2节点上又出问题了:
[root@rac1 crs]# ./root.sh
WARNING: directory '/u01/oracle' is not owned by root
WARNING: directory '/u01' is not owned by root
Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/u01/oracle' is not owned by root
WARNING: directory '/u01' is not owned by root
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node 1: rac1 rac1-priv rac1
node 2: rac2 rac2-priv rac2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Now formatting voting device: /dev/raw/raw3
Now formatting voting device: /dev/raw/raw4
Now formatting voting device: /dev/raw/raw5
Format of 3 voting devices complete.
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
        rac1
CSS is inactive on these nodes.
        rac2
Local node checking complete.
Run root.sh on remaining nodes to start CRS daemons.
[root@rac1 crs]# pwd
/u01/oracle/crs
[root@rac1 crs]# ssh rac2
root@rac2's password:
Last login: Wed Jan  4 21:34:06 2012 from rac1.localdomain
[root@rac2 ~]# source /home/oracle/.bash_profile
[root@rac2 ~]# cd $ORACLE_HOME
[root@rac2 crs]# ./root.sh
WARNING: directory '/u01/oracle' is not owned by root
WARNING: directory '/u01' is not owned by root
Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/u01/oracle' is not owned by root
WARNING: directory '/u01' is not owned by root
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node 1: rac1 rac1-priv rac1
node 2: rac2 rac2-priv rac2
clscfg: Arguments check out successfully.

NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
        rac1
        rac2
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
Error 0(Native: listNetInterfaces:[3])
  [Error 0(Native: listNetInterfaces:[3])]

直接运行vipca碰到:
[root@rac2 bin]# ./vipca
Error 0(Native: listNetInterfaces:[3])
  [Error 0(Native: listNetInterfaces:[3])]

解决方法:
[root@rac2 bin]# ./oifcfg iflist
eth0  192.168.2.0
eth1  192.168.0.0
[root@rac2 bin]# ./oifcfg setif -global eth0/192.168.2.0:public
[root@rac2 bin]# ./oifcfg setif -global eth1/192.168.0.0:cluster_interconnect
[root@rac2 bin]# ./oifcfg getif
eth0  192.168.2.0  global  public
eth1  192.168.0.0  global  cluster_interconnect
[root@rac2 bin]#
./vipca
(http://blog.chinaunix.net/space.php?uid=261392&do=blog&id=2138877)

clusterware安装好后,运行crs_stat -t即可查看集群服务的运行情况:
[root@rac2 bin]# ./crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.rac1.gsd   application    ONLINE    ONLINE    rac1       
ora.rac1.ons   application    ONLINE    ONLINE    rac1       
ora.rac1.vip   application    ONLINE    ONLINE    rac1       
ora.rac2.gsd   application    ONLINE    ONLINE    rac2       
ora.rac2.ons   application    ONLINE    ONLINE    rac2       
ora.rac2.vip   application    ONLINE    ONLINE    rac2  

15. 安装asm数据库
回到rac1,开始安装asm数据库:
[oracle@rac1 database]$ ./runInstaller

指定asm安装路径:
OraASM10g_home
/01/oracle/10gR2/asm

安装完成后,查看asm状态:
[oracle@rac1 database]$ srvctl status asm -n rac1
ASM instance +ASM1 is running on node rac1.
[oracle@rac1 database]$ srvctl status asm -n rac2
ASM instance +ASM2 is running on node rac2.
[oracle@rac1 database]$

[oracle@rac1 database]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora....SM1.asm application    ONLINE    ONLINE    rac1       
ora....C1.lsnr application    ONLINE    ONLINE    rac1       
ora.rac1.gsd   application    ONLINE    ONLINE    rac1       
ora.rac1.ons   application    ONLINE    ONLINE    rac1       
ora.rac1.vip   application    ONLINE    ONLINE    rac1       
ora....SM2.asm application    ONLINE    ONLINE    rac2       
ora....C2.lsnr application    ONLINE    ONLINE    rac2       
ora.rac2.gsd   application    ONLINE    ONLINE    rac2       
ora.rac2.ons   application    ONLINE    ONLINE    rac2       
ora.rac2.vip   application    ONLINE    ONLINE    rac2       
[oracle@rac1 database]$

16. 安装主数据库
回到rac1,开始安装主数据库:
[oracle@rac1 database]$ ./runInstaller

指定主库安装路径:
OraDb10g_home
/01/oracle/10gR2/db_1


17. 更新.bash_profile:
vi .bash_profile
export ORACLE_SID=RAC
export ORACLE_BASE=/opt/oracle/10gR2
export ORACLE_HOME=/opt/oracle/10gR2/db_1
export PATH=$PATH:$ORACLE_HOME/bin


18. 配置管理rac1的环境变量脚本
crs.env
export ORACLE_BASE=/u01/oracle/10gR2
export ORACLE_HOME=/u01/oracle/crs
export PATH=$ORACLE_HOME/bin:$PATH

asm.env
export ORACLE_SID=+ASM1
export ORACLE_BASE=/u01/oracle/10gR2
export ORACLE_HOME=/u01/oracle/10gR2/asm
export PATH=$ORACLE_HOME/bin:$PATH

db.env
export ORACLE_SID=RAC1
export ORACLE_BASE=/u01/oracle/10gR2
export ORACLE_HOME=/u01/oracle/10gR2/db_1
export PATH=$ORACLE_HOME/bin:$PATH

 

REF:
Oracle Database 11g Release 2 RAC On Linux Using VirtualBox
http://www.oracle-base.com/articles/11g/OracleDB11gR2RACInstallationOnOEL5UsingVirtualBox.php linux
相关资讯       VirtualBox  Oracle基础教程 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款