搜索
您的当前位置:首页正文

Oracle RAC安装总结

来源:筏尚旅游网


rac1:/opt/oracle/product/11.0.1/crs/bin # ./crsctl query css votedisk 0. 0 /opt/oracle/crs_data/vote.crs Located 1 voting disk(s).

rac1:/opt/oracle/product/11.0.1/crs/bin # ./ocrcheck

http://blog.itpub.net/post/41137/496129

http://www.itpub.net/thread-1361814-1-1.html

http://www.oracle.com/technology/global/cn/pub/articles/smiley_rac10g_install.html http://bbs3.chinaunix.net/thread-1539610-1-1.html

http://www.oracle.com/technology/global/cn/pub/articles/hunter_rac10gr2_iscsi_3.html <使用 VMware Server 在 Oracle Enterprise Linux 上安装 Oracle RAC 10g>

runInstaller –ignoreSysPreReqs

1、 创建虚拟机,为OCR VOTEDISK和ASM创建磁盘,注意SCSI号和OS磁盘的不同。创建两块网卡,公有

IP网卡类型为桥接,私有IP的网卡类型应该为Host only。Options里面设定共享目录。 2、 编辑SUSE Linux Enterprise Server.vmx文件,添加如下几行: scs1.sharedBus=\"virual\" disk.locking=\"false\"

diskLib.dataCacheMaxSize = \"0\"

diskLib.dataCacheMaxReadAheadSize=0 diskLib.dataCacheMinReadAheadSize=0 diskLib.dataCachePageSize=4096 diskLib.maxUnsyncedWrites = \"0\" 3、 安装操作系统。

1. 安装SLES10sp2:

语言选择:建议选择英文; 防火墙和ipv6建议不选; 2. 分区和软件包:

4、 配置网络,配置公共网络和私有网络。sudo vim /etc/udev/rules.d/30-persistent-net.rules 5、 配置操作系统环境 6、

./ocrcheck ./crs_stat –t ./crsctl check crs ./crsctl start crs

1、在每个节点上,修改$CRS_HOME/bin目录下的srvctl和vipca文件,在vipca文件ARGUMENTS=\"\"行之前和srvctl文的 export LD_ASSUME_KERNEL行之 后增加 unset LD_ASSUME_KERNEL 语句 (最后检查安装的时候应该修改VIPCA) 2、 使用$CRS_HOME/bin目录下的oifcfg工具配置pub ip和pri ip ./oifcfg setif -global eth1/192.168.1.0:public

./oifcfg setif -global eth0/192.168.2.0:cluster_interconnect ./oifcfg iflist

3、在任意一个节点上,用root用户,手动运行vipca,配置完正确的prvip和vip 信息之后,crs就可以安装完成,操作过程如下:

dd if=/dev/zero of=/dev/raw/raw1 bs=1024k

1. Check and make sure you have public and private node names defined and that these node names are pingable from each node of the cluster.

2. Verify that the OCR file and Voting file are readable and writable by the Oracle user and the root user. The permissions that CRS uses for these files are:

Pre Install:

OCR - root:oinstall - 640 Voting - oracle:oinstall - 660 Post Install:

OCR - root:oinstall - 640 Voting - oracle:oinstall - 644

In RHAS 4.0, permissions should be added to /etc/rc.d/rc.local. See Note 293819.1 for more information

/usr/sbin/groupadd oinstall /usr/sbin/groupadd dba

/usr/sbin/useradd -m -g oinstall -G dba oracle id oracle

/usr/sbin/groupadd -g 501 oinstall /usr/sbin/groupadd -g 502 dba

/usr/sbin/useradd -m -u 501 -g oinstall -G dba oracle

以 root 用户身份登录并在每个主机上配置 Linux 内核参数。 cat >> /etc/sysctl.conf >>EOF kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096

kernel.sem = 250 32000 100 128 fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default=262144 net.core.wmem_default=262144 net.core.rmem_max=262144 net.core.wmem_max=262144 EOF

/sbin/sysctl –p

Issue#2: At end of root.sh on the last node vipca will fail to run with the following error:

de lang=\"bash\">

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

Running vipca(silent) for configuring nodeapps

/home/oracle/crs/oracle/product/10/crs/jdk/jre//bin/java: error while loading

shared libraries: libpthread.so.0: cannot open shared object file:

No such file or directory

de>

Issue#3: After working around Issue#2 above, vipca will fail to run with the following error if the VIP IP’s are in a non-routable

range [10.x.x.x, 172.(16-31).x.x or 192.168.x.x]:

# vipca

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

原因是这样的:

These releases of the Linux kernel fix an old bug in the Linux threading that Oracle worked around using

LD_ASSUME_KERNEL settings in both vipca and srvctl, this workaround is no longer valid on OEL5 or RHEL5 or SLES10

hence the failures.

对于问题一,比较容易解决,只需要runInstaller的时候忽略检查即可。

问题二的解决方法是:

To workaround Issue#2 above, edit vipca (in the CRS bin directory on all nodes) to undo the setting of

LD_ASSUME_KERNEL. After the IF statement around line 120 add an unset command to ensure LD_ASSUME_KERNEL is

not set as follows: de lang=\"bash\">

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

then

LD_ASSUME_KERNEL=2.4.19 export LD_ASSUME_KERNEL

fi

unset LD_ASSUME_KERNEL <<<== Line to be added

de>

问题三的解决方法:

To workaround issue#3 (vipca failing on non-routable VIP IP ranges, manually or during root.sh), if you still have the OUI window open, click OK and it will create the “oifcfg” information, then cluvfy will fail due to vipca not completed successfully, skip below in this note and run vipca manually then return to the installer and cluvfy will succeed. Otherwise you may configure the interfaces for RAC manually using the oifcfg command as root, like in the following example (from any node):

/bin # ./oifcfg setif -global eth0/192.168.1.0:public /bin # ./oifcfg setif -global eth1/10.10.10.0:cluster_interconnect

/bin # ./oifcfg getif eth0 192.168.1.0 global public eth1 10.10.10.0 global cluster_interconnect 然后在手工运行vipca添加nodeapps resource即可。

ORA-00845: MEMORY_TARGET not supported on this system

在Oracle 11g里,通过MEMORY_TARGET参数自动管理SGA和PGA。 但是在Oracle 11gR2 里如果MEMORY_TARGET参数值设定的过大,可能就会出现这个错误。

解决方法:增加/dev/shm, /dev/shm通常用做共享内存。

/dev/shm是一个临时文件系统(tmpfs) 。 从/etc/fstab中mount支持标准的参数\"size\",可以用size来增加或者减少在/dev/shm上的tmpfs大小.如果没有设置size,它的大小是系统RAM的一半。

修改文件 /etc/fstab 将tmpfs 修改成以下值:

tmpfs /dev/shm tmpfs defaults,size=14G 0 0

umount /dev/shm mount /dev/shm

df -h 在查查修改后的/dev/shm的大小

文件系统 容量 已用 可用 已用% 挂载点 /dev/mapper/vg00-lv_root 20G 11G 7.7G 59% /

/dev/mapper/vg00-lv_home 97G 6.8G 86G 8% /home

/dev/sda1 97M 13M 80M 14% /boot

tmpfs 14G 0 14G 0% /dev/shm

因篇幅问题不能全部显示,请点此查看更多更全内容

Top