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

Oracle 10g RAC安装全面解读

[日期:2013-07-06] 来源:Linux社区  作者:王路平 [字体:大 中 小]

3.安装具体步骤

3.1安装clusterware

仔细做好准备工作,一定给后面的工作带来事倍功倍的效果。

将软件包10gr2_cluster_sol.cpio.gz解开,使用runInstaller命令来安装clusterware,本示例安装是不基于任何的第三方cluster软件的,如果有第三方的HA软件,必须参考相关文档,比如说如果基于SUN Cluster软件,那么就必须安装UDLM软件,该软件如果是10G的话,需要单独下载,该软件包含在例如10.2.4的patchset里面,如果是11G的话,就需要下载那个包含了cluster,udlm等软件集成的软件包。

图3.1显示的oraInventory就按缺省的,指定的组也按缺省的dba,这个好处是,以后如果需要uninstall的话,可以使用runInstaller –deinstall方式直接卸载,比较能够干净的清除文件。

图3.2显示的需要修改crs的home目录,确认home目录的权限一定是root:oinstall。接下来runInstaller会检查相关条件是否符合,比如kernel参数的设置,系统的补丁级别等等,确认没有任何error和warnning。

图3.3增加另一个节点网卡相关name,如果有第三方cluster的话,这些信息能够自动列出来,根据/etc/hosts文件将对应IP地址的主机名写上去即可。此处cluster的名字缺省为crs,可以修改成客户自己的名字,比如ORA-CRS等。

图3.4 指定OCR所使用的设备,如果使用Normal冗余的话,需要两块设备来做镜像,如果设备本身具有的冗余保护,那么就指定使用External冗余。

图3.5 选择voting disk跟OCR设备是一样的要求,务必注意这些设备的宿主和权限,runInstaller程序会提醒安装权限,如果没有正确设置的话,该安装程序会有警告。

接下来就是点击install按钮即可进行安装clusterware了!

图3.6 软件安装将自动在两个节点上安装所需要的crs系统文件,图示的两个脚本必须使用root用户来执行,以下为root.sh在两个节点执行的摘录:

a.orac1主机执行root.sh

如果脚本出现任何的错误,都需要查找log,具体log目录为

CRS_HOME/log/hostname(hostname为节点名字)

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

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: orac1 orac1-priv orac1

node 2: orac2 orac2-priv orac2

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

Operation successful.

Now formatting voting device: /dev/rdsk/c0d1s3

Format of 1 voting devices complete.

Startup will be queued to init within 30 seconds.

Adding daemons to inittab

Expecting the CRS daemons to be up within 600 seconds.

CSS is active on these nodes.

orac1

CSS is inactive on these nodes.

orac2

Local node checking complete.

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

b.orac2节点上运行root.sh

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

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: orac1 orac1-priv orac1

node 2: orac2 orac2-priv orac2

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 30 seconds.

Adding daemons to inittab

Expecting the CRS daemons to be up within 600 seconds.

CSS is active on these nodes.

orac1

orac2

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

The given interface(s), "vnet0" is not public. Public interfaces should be used to configure virtual IPs.

以上提示说明VIP没有能够运行正常,这是一个bug,需要用root用户登录系统然后运行vipca程序来正确设置相关VIP的内容,结果如下:

图3.7 vipca里面只需要输入IP Alias Name,使用table键后,vipca能够在/etc/hosts里面查找相关内容,并自动填入,有时程序会出错,最好再检查一遍,如有错,手工填入即可,然后按next,再finish后,vipca程序就创建相关内容并启动相关进程,如下所示:

Vipca设置结束后,回到runInstaller上按下ok,将继续配置工作直到结束推出。

3.2安装总结

个人认为ORACLE的runInstaller程序写得不怎么样,上文提到注意的地方,比如磁盘设备文件的权限啊这些,runInstaller程序只会报错,不具体指出哪些地方有问题,因此,安装前的准备工作一定要按照官方文档一步一步进行准备货落实相关规定,这对安装非常有好处。安装并配置完成后,可以使用以下命令来确认crs是否能够正常工作,/opt/crs/oracle/product/10/app/bin/crs_stat –t:

NameTypeTargetState Host

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

ora.orac1.gsdapplicationONLINEONLINEorac1

ora.orac1.onsapplicationONLINEONLINEorac1

ora.orac1.vipapplicationONLINEONLINEorac1

ora.orac2.gsdapplicationONLINEONLINEorac2

ora.orac2.onsapplicationONLINEONLINEorac2

ora.orac2.vipapplicationONLINEONLINEorac2

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

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