科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网服务器频道虚拟化/云计算通过VMWARE虚拟机搭建Oracle 10g R2 R

通过VMWARE虚拟机搭建Oracle 10g R2 R

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

本文讲解了通过VMWARE虚拟机搭建Oracle 10g R2 R的过程。

来源:IT认证考试 2010年9月24日

关键字:

  • 评论
  • 分享微博
  • 分享邮件

在本页阅读全文(共9页)

  Test ssh in every node:

  ssh rac01 date

  ssh rac01-priv date

  Install Oracle 10g Clusterware

  run the following as root:

  [root@rac01 ~]$ xhost +

  Note: If you meet any xhost error, you should execute this command as root.

  [root@rac01 ~]$ su – oracle

  Pre-verification:

  [oracle@rac01 ~]$ /media/cdrom/cluvfy/runcluvfy.sh stage -pre crsinst -n rac01 -verbose

  Error “Could not find a suitable set of interfaces for VIPs.” can be ignored.

  Install the Clusterware:

  [oracle@rac01 ~]$ /media/cdrom/runInstaller

  Destination:

  Name: crs

  Path: oracle/crs_home

  Languages: Add Japanese

  Specify network interface usage:

  eth0: public IP 192.168.10.101 rac01

  eth1: private IP 10.10.10.101 rac01-priv

  Specify OCR location:

  OCR: /dev/raw/raw1

  Mirror: /dev/raw/raw2

  Specify Voting disk:

  Voting disk Location: /dev/raw/raw3

  Voting disk 1 Location: /dev/raw/raw4

  Voting disk 2 Location: /dev/raw/raw5

  In the end of installation, OUI requires you to run the below scripts as root:

  [root@rac01 ~]$ /oracle/oraInventory/orainstRoot.sh

  [root@rac01 ~]$ /oracle/crs_home/root.sh

  Run vipca as root:

  [root@rac01 ~]$ /oracle/crs_home/bin /vipca

  Enter the vip “rac01-vip”, then 192.168.10.10 will be inputted automatically. Click finish.

  Click OK in OUI of Clusterware Installation. Clusterware’s installation is finished.

  When you find vip issues, edit this file $CRS_HOME/bin/racgvip

  # set it to 0 for checkIf() to return success if default gateway is not found,

  # otherwise set it to 1

  FAIL_WHEN_DEFAULTGW_NOT_FOUND=0

  Because crs PING the default gateway several minutes automatically, so the vip will become OFFLINE if it cannot reach the gateway which doesn’t exists actually (we set 192.168.10.2)。

  这里引用三思文章的一部分:

  在使用SSH方式配置RAC时,可能会在检查用户等价时失败。

  配置了SSH之后,发现在验证用户等价时失败:

  $ 。/runcluvfy.sh comp nodecon -n ahrac1,ahrac2 -verbose

  Verifying node connectivity

  ERROR: User equivalence unavailable on all the nodes. Verification cannot proceed.

  Verification of node connectivity was unsuccessful on all the nodes.

  查询metalink发现是Oracle cluvfy工具的问题。Oracle在文章:Note:369598.1:User Equivalence Check Failed for User Oracle Using Ssh/scp中进行了详细的描述。

  简单的说,Oracle在寻找ssh命令时,去/usr/local/bin目录下寻找,而ssh命令在/usr/bin目录下。

  相应的解决方法也很简单,在/usr/local/bin目录下建立一个指向/usr/bin/ssh的链接就可以了。

  root@ahrac1 # mkdir -p /usr/local/bin root@ahrac1 # ln -s -f /usr/bin/ssh /usr/local/bin/ssh root@ahrac1 # ln -s -f /usr/bin/scp /usr/local/bin/scp

  不过再次尝试,仍然报错:

  $ 。/runcluvfy.sh comp nodecon -n ahrac1,ahrac2 -verbose

  Verifying node connectivity

  ERROR: User equivalence unavailable on all the nodes. Verification cannot proceed.

  Verification of node connectivity was unsuccessful on all the nodes.

  后来才发现,原来Oracle用户的ssh验证步骤必须先执行:

  $ exec /usr/bin/ssh-agent $SHELL $ /usr/bin/ssh-add Enter passphrase for /export/home/oracle/.ssh/id_rsa: Identity added: /export/home/oracle/.ssh/id_rsa (/export/home/oracle/.ssh/id_rsa) Enter passphrase for /export/home/oracle/.ssh/id_dsa: Identity added: /export/home/oracle/.ssh/id_dsa (/export/home/oracle/.ssh/id_dsa) $ 。/runcluvfy.sh comp nodecon -n ahrac1,ahrac2 -verbose

  在 node1 上执行:/opt/ora10g/oraInventory/orainstRoot.sh; 在 node2 上执行:/opt/ora10g/oraInventory/orainstRoot.sh; 在 node1 上执行:/opt/ora10g/product/10.2.0/crs_1/root.sh;

  建议最好在node2执行root.sh之前,首先修改vipca。手工重新配置rac1-vip和rac2-vip /oracle/crs_home/bin /vipca 在 node2 上执行:/opt/ora10g/product/10.2.0/crs_1/root.sh;

  注:在两个节点上执行orainstRoot.sh 之后,验证”/etc/oraInst.loc”文件的权限为644 (-rw-r–r–) 且所有者为root。如果oracle 用户帐户不具备该文件的读权限,在Oracle 安装期间可能会出现问题-”the location of the oraInventory directory cannot be determined”。例如,在Oracle 集群件安装后(运行Oracle 集群验证实用程序时),将出现以下错误:”CRS is not installed on any of the nodes。”如果/etc/oraInst.loc 的权限设置不当,则运行root.sh 之前,您无法在两个节点上运行orainstRoot.sh。此外,umask 设置可能为off – 应该为0022。如果/etc/oraInst.loc 的权限设置不当,在Oracle RAC 集群中的两个节点上运行以下命令以解决此问题:

  # chmod 644 /etc/oraInst.loc

  # ls -l /etc/oraInst.loc

  -rw-r–r– 1 root root 56 Oct 12 21:52 /etc/oraInst.loc

  When you find vip issues, edit this file $CRS_HOME/bin/racgvip

  # set it to 0 for checkIf() to return success if default gateway is not found,

  # otherwise set it to 1

  FAIL_WHEN_DEFAULTGW_NOT_FOUND=0

  

    • 评论
    • 分享微博
    • 分享邮件
    邮件订阅

    如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。

    重磅专题
    往期文章
    最新文章