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

基于Linux (RHEL 5.5) 安装Oracle 10g RAC

[日期:2012-08-27] 来源:Linux社区  作者:robinson_0612 [字体:大 中 小]

四、  安装Oracle Clusterware 及Oracle Database

1. 执行安装前校验

[oracle@node1 cluvfy]$ /u01/Clusterware/clusterware/cluvfy/runcluvfy.sh stage -pre crsinst -n node1,node2 -verbose

     详细参考:使用 runcluvfy 校验Oracle RAC安装环境

2. 安装Oracle Clusterware

[root@node1 ~]# xhost +

access control disabled, clients can connect from any host

 

 [oracle@node1 clusterware]$ /u01/Clusterware_soft/clusterware/runInstaller  -ignoreSysPrereqs

在出现的操作界面中根据提示一路next,对于检测安装环境选择忽略,下面列出重点截图

需要将节点2(node2)添加进去,点击add 来添加node2的信息,添加后如下图:

下面设定哪个网卡用作public network,哪个用作private network

将 192.168.0.0改为public 类型

下面是设定ocr及votingdisk的冗余度及存放位置,仅做测试使用,因此选择使用External Redundancy模式。在OCR Location处输入存放位置:/ocfs/clusterware/ocr。对于接下的Votingdisk冗余模式同样选择External Redundancy,

存放位置:/ocfs/clusterware/votingdisk

 

最后给出的是即将安装clusterware的摘要信息。点击Install则开始复制文件。

文件复制完毕后有两个重要的脚步需要执行一个是orainstRoot.sh,一个是root.sh,分别在两个节点按顺序一一执行。下面是给出执行顺序:

在 node1上执行 /u01/app/oracle/oraInventory/orainstRoot.sh

在 node2 上执行 /u01/app/oracle/oraInventory/orainstRoot.sh

在 node1 上执行 /u01/app/oracle/product/10.2.0/crs_1/root.sh

在 node2 上执行 /u01/app/oracle/product/10.2.0/crs_1/root.sh

 

[root@node1 ~]# /u01/app/oracle/oraInventory/orainstRoot.sh

Changing permissions of /u01/app/oracle/oraInventory to 770.

Changing groupname of /u01/app/oracle/oraInventory to oinstall.

The execution of the script is complete

 

[root@node2 ~]# /u01/app/oracle//oraInventory/orainstRoot.sh

Changing permissions of /u01/app/oracle/oraInventory to 770.

Changing groupname of /u01/app/oracle/oraInventory to oinstall.

The execution of the script is complete

 

[root@node1 ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh

WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root

WARNING: directory '/u01/app/oracle/product' is not owned by root

WARNING: directory '/u01/app/oracle' is not owned by root

WARNING: directory '/u01/app' is not owned by root

WARNING: directory '/u01' is not owned by root

Checking to see if Oracle CRS stack is already configured

/etc/oracle does not exist. Creating it now.

 

Setting the permissions on OCR backup directory

Setting up NS directories

Oracle Cluster Registry configuration upgraded successfully

WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root

WARNING: directory '/u01/app/oracle/product' is not owned by root

WARNING: directory '/u01/app/oracle' is not owned by root

WARNING: directory '/u01/app' is not owned by root

WARNING: directory '/u01' is not owned by root

assigning default hostname node1 for node 1.

assigning default hostname node2 for node 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: node1 node1-priv node1

node 2: node2 node2-priv node2

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

Now formatting voting device: /ocfs/clusterware/votingdisk

Format of 1 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.

        node1

CSS is inactive on these nodes.

        node2

Local node checking complete.

Run root.sh on remaining nodes to start CRS daemons.

 

 [root@node2 ~]# /u01/app/oracle/product/10.2.0/db_1/root.sh

WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root

WARNING: directory '/u01/app/oracle/product' is not owned by root

WARNING: directory '/u01/app/oracle' is not owned by root

WARNING: directory '/u01/app' 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/app/oracle/product/10.2.0' is not owned by root

WARNING: directory '/u01/app/oracle/product' is not owned by root

WARNING: directory '/u01/app/oracle' is not owned by root

WARNING: directory '/u01/app' 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.

assigning default hostname node1 for node 1.

assigning default hostname node2 for node 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: node1 node1-priv node1

node 2: node2 node2-priv node2

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.

        node1

        node2

CSS is active on all nodes.

Waiting for the Oracle CRSD and EVMD to start

Oracle CRS stack installed and running under init(1M)

Running vipca(silent) for configuring nodeapps

/u01/app/oracle/product/10.2.0/db_1/jdk/jre//bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

[root@node2 ~]#

 

通常情况下,我们会碰到上述错误,即:

/u01/app/oracle/product/10.2.0/db_1/jdk/jre//bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

对于这个错误,我们可以修改vipca文件来解决,修改方法如下:

[root@node2 ~]# vi  /u01/app/oracle/product/10.2.0/crs_1/bin/vipca

找到如下内容:

Remove this workaround when the bug 3937317 is fixed

arch=`uname -m`

 

if [ "$arch" = "i686" -o "$arch" = "ia64" ]

then

LD_ASSUME_KERNEL=2.4.19

export LD_ASSUME_KERNEL

fi

#End workaround

在fi 后新添加一行:

unset LD_ASSUME_KERNEL

以及srvctl 文件

[root@node2 ~]# vi  /u01/app/oracle/product/10.2.0/crs_1/bin/srvctl

找到如下内容:

LD_ASSUME_KERNEL=2.4.19

export LD_ASSUME_KERNEL

同样在其后新增加一行:

unset LD_ASSUME_KERNEL

保存退出,然后在node2 重新执行root.sh

实际上这个问题是由于Oracle bug所产生的,将Clusterware 升级到10.2.0.4可以解决该问题。

 

安装完毕之后,使用crs_stat来验证Clusterware的状况

[oracle@node1 ~]$ crs_stat -t

Name           Type           Target    State     Host       

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

ora.node1.gsd  application    ONLINE    ONLINE    node1      

ora.node1.ons  application    ONLINE    ONLINE    node1      

ora.node1.vip  application    ONLINE    ONLINE    node1      

ora.node2.gsd  application    ONLINE    ONLINE    node2      

ora.node2.ons  application    ONLINE    ONLINE    node2      

ora.node2.vip  application    ONLINE    ONLINE    node2      

 

实际上,在此可以先安装Oracle 10g Clusterware的patch,在此,我们先安装database软件,后续再安装patch。

linux
相关资讯       ORACLE 10G 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

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