vmware 里的 rac install 的记录

    最近想学 rac,所以在虚拟机上装了下,前前后后总共花了 一星期的时间,由于对 rac 很不熟悉,所以很多内容也无从考证,但是总得记录的:

   

安装过程,都是参考 三思的文档和一个人的详细笔记

http://blog.chinaunix.net/u/6589/article_103247_1.html

 

 

1、常用命令

mount -o loop -t iso9660 /dev/cdrom /mnt/cdrom

dd if=/dev/null f=/dev/raw/raw1 bs=8192 count=1024

 

2、遇到问题

安装vmware tools

windowsvmware的窗口菜单中选vm->;install vmware tools

在虚拟机中:

su

 mount /dev/cdrom /mnt/cdrom

  cd /tmp

   tar zxf /mnt/vmware-linux-tools.tar.gz

   cd vmware-tools-distrib

   ./vmware-install.pl

 

装完 vmware tools 后,reboot 了一下 linux 结果导致 startx不能用,报什么 IO fatel 的错误,后来

1.      Edit the X config file

#nano /etc/X11/xorg.conf

2.      Add the lines

Section “Monitor”

        Identifier   “vmware”

EndSection

3.      Restart X

      #startx

 

做了如上操作了,可以 startx 了。

 

 

 

3、两台 机子时间的同步问题:

 

首先,一台虚拟机和你的local machine 同步。使用vmware tools 实现。

然后其他虚拟机使用rdate -s ....... ,排程实现同步时间。

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

一、用VMWARE TOOLS同步时间

注意:如果是用复制文件的方法创建虚拟系统,最好是在复制完文件之后分别安装VMWARE TOOLS

1 安装vmware tools

VMware 控制台上,以 root 用户身份登录。

   1. 单击 VM,然后选择 Install VMware Tools

   2. rac1 虚拟机:单击 Install

   3. 双击桌面上的 VMware Tools 图标。

   4. cdrom:双击 VMwareTools-1.0.1-29996.i386.rpm

   5. 完成系统准备:单击 Continue

   6. 打开一个终端并执行 vmware-config-tools.pl

          输入所需的显示大小:2 800*600

2 与主机同步时间

要确保成功安装 Oracle RAC,虚拟机上的时间必须与主机上的时间同步。执行下面的步骤,以 root 用户身份同步时间。

1.  执行“vmware-toolbox”以显示 VMware Tools Properties 窗口。在 Options 选项卡下,选择 Time synchronization between the virtual machine and the host operating system。您应该发现 tools.syncTime = "TRUE" 参数已经追加到虚拟机配置文件 G:\vm\rac\rac1\rac1.vmx 中。

2. 编辑 /boot/grub/grub.conf,并将选项“clock=pit nosmp noapic nolapic”添加到读取内核 /boot/ 的那一行。修改后的文件内容如下所示:

  [root@rac1 ~]# more /boot/grub/grub.conf

  default=0

  timeout=5

  splashimage=(hd0,0)/grub/splash.xpm.gz

  hiddenmenu

  title Red Hat Enterprise Linux AS (2.6.9-42.ELsmp)

          root (hd0,0)

          kernel /vmlinuz-2.6.9-42.ELsmp ro root=LABEL=/ rhgb quiet clock=pit nosmp noapic nolapic

          initrd /initrd-2.6.9-42.ELsmp.img

  title Red Hat Enterprise Linux AS-up (2.6.9-42.EL)

          root (hd0,0)

          kernel /vmlinuz-2.6.9-42.EL ro root=LABEL=/ rhgb quiet clock=pit nosmp noapic nolapic

          initrd /initrd-2.6.9-42.EL.img

 

 

二、修改配置文件的方式

如果这样做还不行,则修改文件:C:\Documents and Settings\All Users\Application Data\VMware\VMware Server\config.ini

添加如下三行:

host.cpukHz = "1700000"

host.noTSC = "TRUE"

ptsc.noTSC = "TRUE"

 

 

 

安装clusterware出错, 于是重装. 重装后遇到问题:

 

INFO: Exclude file list /tmp/OraInstall2008-08-21_05-30-54PM/installExcludeFile.lst does not exist or is empty. The file is ignored.

WARNING: Error while copying directory /u01/crs/oracle/product/10.2.0/crs with exclude file list 'null' to nodes 'node2'. [PRKC-1002 : All the submitted commands did not execute successfully]

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

node2:

/bin/tar: ./bin/sclsspawn: File shrank by 160817 bytes; padding with zeros

/bin/tar: Error exit delayed from previous errors

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

 

解决办法:

 

这个问题实际上是第二个节点安装出了问题.具体问题根据实践的经验是: 两个节点的互信有了问题. 重新给两个节点建立ssh互信即可.

 

 

 

完全卸载 clusterware的方法

网址:http://database.违规广告.com/art/200802/66240.htm

 

在安装clusterware时如果出现报错现象,需要重新安装时,必须先清除已经安装的cluserware,否则可能会影响到下次安装。一般情况下,只需要在各节点上依次运行目录$ORA_CRS_HOME/install/下的脚本rootdelete.sh rootdeinstall.sh即可。

 

我们也可以采用手工删除:

 

1、在所有节点停止nodeapps

 

srvctl stop nodeapps -n nodename

 

2、删除crs自动启动程序

 

Sun:

 

rm /etc/init.d/init.cssd

rm /etc/init.d/init.crs

rm /etc/init.d/init.crsd

rm /etc/init.d/init.evmd

rm /etc/rc3.d/K96init.crs

rm /etc/rc3.d/S96init.crs

rm -Rf /var/opt/oracle/scls_scr

rm -Rf /var/opt/oracle/oprocd

rm /etc/inittab.crs

cp /etc/inittab.orig /etc/inittab

 

Linux:

 

rm –rf /etc/oracle/*

rm -f /etc/init.d/init.cssd

rm -f /etc/init.d/init.crs

rm -f /etc/init.d/init.crsd

rm -f /etc/init.d/init.evmd

rm -f /etc/rc2.d/K96init.crs

rm -f /etc/rc2.d/S96init.crs

rm -f /etc/rc3.d/K96init.crs

rm -f /etc/rc3.d/S96init.crs

rm -f /etc/rc5.d/K96init.crs

rm -f /etc/rc5.d/S96init.crs

rm -Rf /etc/oracle/scls_scr

rm -f /etc/inittab.crs

cp /etc/inittab.orig /etc/inittab

 

HP-UX:

 

rm /sbin/init.d/init.cssd

rm /sbin/init.d/init.crs

rm /sbin/init.d/init.crsd

rm /sbin/init.d/init.evmd

rm /sbin/rc2.d/K960init.crs

rm /sbin/rc2.d/K001init.crs

rm /sbin/rc3.d/K960init.crs

rm /sbin/rc3.d/S960init.crs

rm -Rf /var/opt/oracle/scls_scr

rm -Rf /var/opt/oracle/oprocd

rm /etc/inittab.crs

cp /etc/inittab.orig /etc/inittab

 

HP Tru64:

 

rm /sbin/init.d/init.cssd

rm /sbin/init.d/init.crs

rm /sbin/init.d/init.crsd

rm /sbin/init.d/init.evmd

rm /sbin/rc3.d/K96init.crs

rm /sbin/rc3.d/S96init.crs

rm -Rf /var/opt/oracle/scls_scr

rm -Rf /var/opt/oracle/oprocd

rm /etc/inittab.crs

cp /etc/inittab.orig /etc/inittab

 

IBM AIX:

 

rm /etc/init.cssd

rm /etc/init.crs

rm /etc/init.crsd

rm /etc/init.evmd

rm /etc/rc.d/rc2.d/K96init.crs

rm /etc/rc.d/rc2.d/S96init.crs

rm -Rf /etc/oracle/scls_scr

rm -Rf /etc/oracle/oprocd

rm /etc/inittab.crs

cp /etc/inittab.orig /etc/inittab

3kill css/crs/evm进程,并reboot节点

ps -ef | grep css/crs/evm

kill -9 processid

4、删除/tmp/.oracle/var/tmp/.oracle

rm -rf /tmp/.oracle rm -f /var/tmp/.oracle

5、删除ocr.loc

rm -f /etc/oracle/orc.loc

6、用oracle universal installer卸载crs

7、删除crs安装目录

rm -Rf crs_install_dir

8、使用dd清除vote diskocr(裸设备)

dd if=/dev/zero f=/dev/raw/raw1 bs=8192 count=1024

dd if=/dev/zero f=/dev/raw/raw1 bs=8192 count=1024

rm -f /usr/local/bin/coraenv /usr/local/bin/dbhome /usr/local/bin/oraenv

 

 

linux 卸载 oracle 的方法(同 aix

 

1. 运行 $ORACLE_HOME/bin/localconfig delete

2. rm -rf $ORACLE_HOME/*

3. rm -f /etc/oraInst.loc /etc/oratab

4. rm -rf /etc/oracle

5. rm -f /etc/inittab.cssd

6. rm -f /usr/local/bin/coraenv /usr/local/bin/dbhome /usr/local/bin/oraenv

 

 

装完 clusterware 后必做的事

装完 clusterware 后,一般情况下 运行 ./crs_stat –t 时会报:

No resources is registered 的错误,这是因为 vip 还没配,所以要运行 crs_1/bin/vipca,而这时候会报下面的错误:

Error 0(Native: listNetInterfaces:[3])

[Error 0(Native: listNetInterfaces:[3])]

这是就需要做:

[root@node2 bin]# ./oifcfg setif -global eth0/192.168.100.0:public

[root@node2 bin]# ./oifcfg setif -global eth1/10.10.17.0:cluster_interconnect

做完这个再运行就应该可以了,然后 vipca 运行完,再通过下面的东西检查下,会不会报错就OK

参考网址:

http://www.itpub.net/viewthread.php?tid=1267338&highlight=vipca

http://www.itpub.net/viewthread.php?tid=1062147&highlight=crs%2B0202

[root@rac2 bin]crs_1/bin/./crsctl check crs 

CSS appears healthy

CRS appears healthy

EVM appears healthy

./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 

如果跑那两个东西能显示上面的话,说明 clusterware 安装成功了

 

装完 oracle 后,一个节点不断重启,没办法,分别重启两台机子后,还是总有一台机子不断重启

运行:

[root@rac2 bin]/oracle/crs/bin/crs_stat -t

CRS-0184: Cannot communicate with the CRS daemon.

后来,设置了如下后

/etc/init.d/init.crs disable

/etc/init.d/init.crs stop

就不重启了,问题是,关闭了 crs 进程,所以问题出在 crs 进程上,但是具体什么问题,说不上来,参考网址:

http://www.itpub.net/viewthread.php?tid=1216282&highlight=rac%2B%D6%D8%C6%F4

http://www.itpub.net/viewthread.php?tid=882644&extra=&highlight=rac%2B%D6%D8%C6%F4&page=1

http://www.itpub.net/viewthread.php?tid=1207903&highlight=CRS%2B0184

http://www.itpub.net/viewthread.php?tid=923329&highlight=Cannot%2Bcommunicate%2Bwith%2BCRS

http://www.itpub.net/viewthread.php?tid=1307220&pid=15844496&page=1&extra=#pid15844496

http://www.itpub.net/viewthread.php?tid=1297453&highlight=rac%2B%D6%D8%C6%F4

 

安装时别人的心得体会:

http://hi.baidu.com/lichangzai/blog/item/d5b9dd34869207bed1a2d37c.html

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/14730395/viewspace-663889/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/14730395/viewspace-663889/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值