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

在Red Hat Linux 5.4 (虚拟机) 上安装 Oracle 11g R2 RAC (ASM)

[日期:2012-02-21] 来源:Linux社区  作者:风影子 [字体:大 中 小]
18             准备安装 Oracle Grid Infrastructure   

切换到 grid 用户,准备安装 grid  Infrastructure  .  首先需要确认所有节点 grid 用户的环境变

量.bash_profile .  

 

安装用于  Linux  的  cvuqdisk  程序包  

 

在两个  Oracle RAC  节点上安装操作系统程序包  cvuqdisk。如果没有  cvuqdisk,集群验证实

用程序就无法发现共享磁盘,当运行(手动运行或在  Oracle Grid  Infrastructure  安装结束时

自动运行) 集群验证实用程序时, 您会收到这样的错误消息: “Package cvuqdisk not installed” 。

注意使用适用于你的硬件体系结构(例如,x86_64  或  i386)的  cvuqdisk RPM。  

 

cvuqdisk  RPM  包含在  Oracle  Grid  Infrastructure  安装介质上的  rpm  目录中。

 

解压 linux_11gR2_grid.zip

[root@racdb01 asmlib]# cd /orasoft

[root@racdb01 orasoft]# ls -l

total 958784

-rw-r----- 1 root root 980831749 Dec  1 14:36 linux_11gR2_grid.zip

[root@racdb01 orasoft]# unzip linux_11gR2_grid.zip 

 

[root@racdb01 rpm]# cd /orasoft/grid/rpm

[root@racdb01 rpm]# ls -l

total 8

-rw-rw-r-- 1 root root 7831 Jun  3  2009 cvuqdisk-1.0.7-1.rpm

[root@racdb01 rpm]# ls

cvuqdisk-1.0.7-1.rpm

[root@racdb01 rpm]#

 

要安装  cvuqdisk RPM,执行以下步骤:  

以  grid  用户帐户将  cvuqdisk  程序包从节点 1 复制到节点 2  : 

 

以  root  用户身份分别登录到两节点:  

设置环境变量  CVUQDISK_GRP, 使其指向作为  cvuqdisk  的所有者所在的组 (本文为  oinstall) :   

 

[root@racdb01 rpm]# export   CVUQDISK_GRP=oinstall

[root@racdb01 rpm]# rpm -ihv cvuqdisk-1.0.7-1.rpm

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

   1:cvuqdisk               ########################################### [100%]

 

在节点2执行

 

[root@racdb02 home]# export  CVUQDISK_GRP=oinstall 

[root@racdb02 home]# rpm -ivh cvuqdisk-1.0.7-1.rpm

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

   1:cvuqdisk               ########################################### [100%]

 

 

使用  CVU  验证是否满足  Oracle  集群件要求(可选),下面文字只是说明。 

在运行  Oracle  安装程序之前不一定要运行集群验证实用程序。从 Oracle Clusterware 11g  第 

2  版开始, Oracle Universal Installer (OUI)  会检测到不满足最低安装要求的情况, 并创建  shell 

脚本(称为修复脚本)以完成尚未完成的系统配置步骤。如果  OUI  发现未完成的任务,它

会生成修复脚本  (runfixup.sh)。 在  Oracle Grid Infrastructure  安装过程中, 单击  Fix and Check 

Again Button  之后,可以运行修复脚本。  

 

您也可以让  CVU  在安装之前生成修复脚本。  

如果您决定亲自运行  CVU,请记住要作为  grid  用户在将要执行  Oracle  安装的节点  (racdb01) 

上运行。此外,必须为  grid  用户配置通过用户等效性实现的  SSH  连通性。如果您打算使

用  OUI  配置  SSH  连接,则  CVU  实用程序会失败,它没有机会执行其任何的关键检查并生

成修复脚本:  

 

 

这里我们以传统方式先建立各节点间的 SSH连通性( grid用户 )。 

在节点 1 上:  

[root@racdb01 rpm]# su - grid

[grid@racdb01 ~]$

[grid@racdb01 ~]$ cd /home/grid/

[grid@racdb01 ~]$ mkdir  .ssh

 [grid@racdb01 ~]$ chmod 700  .ssh/

[grid@racdb01 ~]$

 

 

同样在节点 2 上执行:  

[root@racdb02 home]# su - grid 

[grid@racdb02 ~]$ cd   /home/grid/

[grid@racdb02 ~]$ mkdir .ssh

[grid@racdb02 ~]$ chmod 700 .ssh

[grid@racdb02 ~]$

 

 

在节点 1 上:  

[root@racdb01 rpm]# su - grid

[grid@racdb01 ~]$

[grid@racdb01 ~]$ cd /home/grid/

[grid@racdb01 ~]$ mkdir  .ssh

 [grid@racdb01 ~]$ chmod 700  .ssh/

[grid@racdb01 ~]$ ssh-keygen -t  rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/home/grid/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /home/grid/.ssh/id_rsa.

Your public key has been saved in /home/grid/.ssh/id_rsa.pub.

The key fingerprint is:

57:eb:a8:61:e2:5f:a0:ed:0e:7d:4a:3d:41:df:fb:b1 grid@racdb01

[grid@racdb01 ~]$ ssh-keygen -t  dsa

Generating public/private dsa key pair.

Enter file in which to save the key (/home/grid/.ssh/id_dsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /home/grid/.ssh/id_dsa.

Your public key has been saved in /home/grid/.ssh/id_dsa.pub.

The key fingerprint is:

08:7a:8c:74:4b:cd:34:fd:4a:eb:88:b4:fa:58:7d:0f grid@racdb01

[grid@racdb01 ~]$

 

 

 

同样在节点 2 上执行:   

[grid@racdb02 ~]$ ssh-keygen  -t  rsa

Generating public/private rsa key pair.

Enter file in which to save the key (/home/grid/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /home/grid/.ssh/id_rsa.

Your public key has been saved in /home/grid/.ssh/id_rsa.pub.

The key fingerprint is:

d0:d2:58:0f:b5:93:f2:76:f0:9d:b5:d6:45:cc:72:f5 grid@racdb02

[grid@racdb02 ~]$

[grid@racdb02 ~]$ ssh-keygen  -t  dsa

Generating public/private dsa key pair.

Enter file in which to save the key (/home/grid/.ssh/id_dsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /home/grid/.ssh/id_dsa.

Your public key has been saved in /home/grid/.ssh/id_dsa.pub.

The key fingerprint is:

6b:4b:12:50:c9:00:35:24:ab:ce:6c:ba:98:49:7f:2b grid@racdb02

 

 

在节点 1 上执行:  

[grid@racdb01 ~]$ cd /home/grid/.ssh/

[grid@racdb01 .ssh]$ ssh racdb01 cat  /home/grid/.ssh/id_rsa.pub >>authorized_keys

The authenticity of host 'racdb01 (10.161.32.161)' can't be established.

RSA key fingerprint is bf:17:7b:22:7a:fe:31:67:5e:7d:b2:a2:15:66:cf:4e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'racdb01,10.161.32.161' (RSA) to the list of known hosts.

grid@racdb01's password:

[grid@racdb01 .ssh]$ ssh racdb01 cat  /home/grid/.ssh/id_dsa.pub >>authorized_keys

[grid@racdb01 .ssh]$ ssh racdb02 cat  /home/grid/.ssh/id_rsa.pub >>authorized_keys

The authenticity of host 'racdb02 (10.161.32.162)' can't be established.

RSA key fingerprint is bf:17:7b:22:7a:fe:31:67:5e:7d:b2:a2:15:66:cf:4e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'racdb02' (RSA) to the list of known hosts.

grid@racdb02's password:

[grid@racdb01 .ssh]$ ssh racdb02 cat  /home/grid/.ssh/id_dsa.pub >>authorized_keys

grid@racdb02's password:

[grid@racdb01 .ssh]$

 

 

在节点 1 上将生成的 authorized_keys  拷贝到节点 2 上。  

[grid@racdb01 .ssh]$ cd /home/grid/.ssh/

[grid@racdb01 .ssh]$ scp authorized_keys  racdb02:/home/grid/.ssh/

grid@racdb02's password:

authorized_keys                                                          100% 1988     1.9KB/s   00:00   

[grid@racdb01 .ssh]$

 

 

在节点 1 及节点 2 上 chmod   authorized_keys   。   

[grid@racdb01 .ssh]$ cd   /home/grid/.ssh/ 

[grid@racdb01 .ssh]$ chmod   600   authorized_keys 

 

[grid@racdb02 .ssh]$ cd /home/grid/.ssh/ 

[grid@racdb02 .ssh]$ chmod 600 authorized_keys 

 

 

 

测试节点 1,2 的 SSH 连通性。 

在节点 1 上:  

[root@racdb01 ~]# su - grid

[grid@racdb01 ~]$ ssh  racdb01 date

Thu Nov 10 16:47:25 CST 2011

[grid@racdb01 ~]$ ssh racdb02 date

Thu Nov 10 16:47:28 CST 2011

[grid@racdb01 ~]$ ssh racdb01-priv date

The authenticity of host 'racdb01-priv (10.1.1.11)' can't be established.

RSA key fingerprint is bf:17:7b:22:7a:fe:31:67:5e:7d:b2:a2:15:66:cf:4e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'racdb01-priv,10.1.1.11' (RSA) to the list of known hosts.

Thu Nov 10 16:47:37 CST 2011

[grid@racdb01 ~]$ ssh racdb02-priv date

The authenticity of host 'racdb02-priv (10.1.1.12)' can't be established.

RSA key fingerprint is bf:17:7b:22:7a:fe:31:67:5e:7d:b2:a2:15:66:cf:4e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'racdb02-priv,10.1.1.12' (RSA) to the list of known hosts.

Thu Nov 10 16:47:43 CST 2011

[grid@racdb01 ~]$

 

 

 

在节点 2 上:  

[root@racdb02 ~]# su - grid

[grid@racdb02 ~]$ ssh racdb01 date

The authenticity of host 'racdb01 (10.161.32.161)' can't be established.

RSA key fingerprint is bf:17:7b:22:7a:fe:31:67:5e:7d:b2:a2:15:66:cf:4e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'racdb01,10.161.32.161' (RSA) to the list of known hosts.

Thu Nov 10 16:48:40 CST 2011

[grid@racdb02 ~]$ ssh racdb02 date

The authenticity of host 'racdb02 (10.161.32.162)' can't be established.

RSA key fingerprint is bf:17:7b:22:7a:fe:31:67:5e:7d:b2:a2:15:66:cf:4e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'racdb02,10.161.32.162' (RSA) to the list of known hosts.

Thu Nov 10 16:48:45 CST 2011

[grid@racdb02 ~]$ ssh racdb01-priv date 

The authenticity of host 'racdb01-priv (10.1.1.11)' can't be established.

RSA key fingerprint is bf:17:7b:22:7a:fe:31:67:5e:7d:b2:a2:15:66:cf:4e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'racdb01-priv,10.1.1.11' (RSA) to the list of known hosts.

Thu Nov 10 16:48:54 CST 2011

[grid@racdb02 ~]$ ssh racdb02-priv date 

The authenticity of host 'racdb02-priv (10.1.1.12)' can't be established.

RSA key fingerprint is bf:17:7b:22:7a:fe:31:67:5e:7d:b2:a2:15:66:cf:4e.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'racdb02-priv,10.1.1.12' (RSA) to the list of known hosts.

Thu Nov 10 16:49:01 CST 2011

 

 

 

 

手动运行 CVU 使用程序验证 Oracle  集群件要求(一个节点执行):

 

到 grid 软件解压的目录下执行 runcluvfy.sh  命令:  

 

[root@racdb01 ~]# su - grid

[grid@racdb01 ~]$ cd /orasoft/grid/ 

[grid@racdb01 grid]$ ./runcluvfy.sh stage -pre crsinst -n racdb01,racdb02 -fixup -verbose

 

查看  CVU  报告。  在本文所述配置情况下,应该只发现如下的唯一一个错误:  

 

Check: Membership of user "grid" in group "dba"  

   Node Name          User Exists    Group Exists   User in Group   Comment          

    ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐    ‐‐‐‐‐‐‐‐‐‐‐‐    ‐‐‐‐‐‐‐‐‐‐‐‐    ‐‐‐‐‐‐‐‐‐‐‐‐    ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐ 

   rac02              yes            yes            no             failed           

   racdb01              yes            yes            no             failed           

 

.......

 

上面一个检查失败的原因是,通过任务角色划分  配置创建了以角色分配的组和用户,而  CVU  不能正确识

别这种配置。如何创建任务角色划分配置。CVU  不能识别此类配置,因而假定  grid  用户始终是  dba  组的

成员。可以放心地忽略这个失败的检查。CVU  执行的所有其他检查的结果报告应该为“passed” ,之后才能

继续进行  Oracle Grid Infrastructure  的安装。  

 

同通过执行结果我们可以看到基本都是 passed,  如果 NTP 时间同步部分有 fail,  我们可以到

/etc/ntp.conf 下面将此文件改名,比如 ntp.conf.bak  (安装完成之后再改回来)  .  只要时间同步

就 OK .  

 

 

然后在节点 1 上使用 CVU 验证硬件和操作系统设置。 

同样,在  racdb01  节点上以具有用户等效性配置的  grid  用户帐户运行以下命令:  

[root@racdb01 ~]# su - grid 

[grid@racdb01 grid]$ cd /orasoft/grid/ 

[grid@racdb01 grid]$ ./runcluvfy.sh  stage -post hwos -n racdb01,racdb02 -verbose 

 

查看  CVU  报告。CVU  执行的所有其他检查的结果报告应该为“passed” ,之后才能继续进

行  Oracle Grid Infrastructure  的安装。 

linux
相关资讯       RedHat安装  oracle数据库教程 
本文评论   查看全部评论 (1)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款
第 1 楼
* 匿名 发表于 2013/4/18 20:41:52
楼主,按你那样就是创建一个数据库这里,居然跑几个小时都没创建完。