VMware2.0.1+oracle linux5.3+oracle10.2.0.4 install oracle RAC
Plan:
LINUX:
192.168.1.101 dbrac01
192.168.1.102 dbrac02
192.168.1.201 dbrac01-vip
192.168.1.202 dbrac02-vip
172.18.1.101 dbrac01-priv
172.18.1.102 dbrac02-priv
VMware
scsi:0:1 20G
scsi:1:1 120M
scsi:1:2 80M
scsi:1:3 6G
scsi:1:4 6G
memory 1100M
swap 2000M
network: eth0 bridge public
eth0 bridge private
for sharedisk we should create sharedisk folder
for instance:
mkdir sharedisk in vmware dirctory and store scsi:1:1---1:4
ORACLE:
oracle crs software
10.2.0 db software
path for 10.2.0
rpm oracleasmlib-2.0.4-1.el5.i386.rpm
Install
1,linux install and setup
1.1 oracleasm rpm package install-select from list when linux installing
1.2 rpm -ivh oracleasmlib-2.0.4-1.el5.i386.rpm when linux finished
1.3 vim /etc/hosts
1.4 stop some service : sendmail, iptables,ip6tables
chkconfig --list
chkconfig --level 2345 sendmail off
1.5 check oracle user:id oracle
check system requeired for oracle from oracle document
1.6 fdisk /dev/sdb
/sdc /sdd /sde
1.7 mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle
1.8 vim /etc/rc.local
modprobe hangcheck-timer hangcheck-tick=30 hangcheck_margin=180
1.9 vim /etc/udev/rules.d/60-raw.rules
ACTION=="add", KERNEL=="/dev/sdb1",RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="17",RUN+="/bin/raw /dev/raw/raw1 %M %m"
ACTION=="add", KERNEL=="/dev/sdc1",RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="33",RUN+="/bin/raw /dev/raw/raw2 %M %m"
ACTION=="add", KERNEL=="/dev/sdd1",RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="49",RUN+="/bin/raw /dev/raw/raw3 %M %m"
ACTION=="add", KERNEL=="/dev/sde1",RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", ENV{MAJOR}=="8",ENV{MINOR}=="65",RUN+="/bin/raw /dev/raw/raw4 %M %m"
KERNEL=="raw[1-4]", OWNER="oracle", GROUP="oinstall", MODE="640"
then check ls /dev/raw/
crw-r----- 1 oracle oinstall 162, 1 Jun 6 17:57 raw1
crw-r----- 1 oracle oinstall 162, 2 Jun 6 17:57 raw2
crw-r----- 1 oracle oinstall 162, 3 Jun 6 17:57 raw3
crw-r----- 1 oracle oinstall 162, 4 Jun 6 17:57 raw4
2.0 shutdown linux and open folder and edit .vmx file
disk.locking = "false"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0"
diskLib.DataCacheMinReadAheadSize = "0"
diskLib.dataCachePageSize = "4096"
diskLib.maxUnsyncedWrites = "0"
scsi1:1.deviceType = "disk"
scsi1:2.deviceType = "disk"
scsi1:3.deviceType = "disk"
scsi1:4.deviceType = "disk"
2 setup the second nodes
1.1 cp dbrac01 dbrac02
1.2 startup linux
1.3 setup network and ip address
1.4 install vmware-tool in both nodes and restart
1.5 set up ssh
1.6 etc/init.d/oracleasm configure
1.6 install crs
建议按下列顺序执行
在 node1 上执行:/opt/ora10g/oraInventory/orainstRoot.sh;
在 node2 上执行:/opt/ora10g/oraInventory/orainstRoot.sh;
在 node1 上执行:/opt/ora10g/product/10.2.0/crs_1/root.sh;
在 node2 上执行:/opt/ora10g/product/10.2.0/crs_1/root.sh;
通常在最后一个节点执行 root.sh 时会遇到错误,就我们的情况而言当然就是 node2~~
提示:一般常见的错误有如下三种:
A).如果你碰到了这个错误:
/opt/ora10g/product/10.2.0/crs_1/jdk/jre//bin/java: error while loading shared libraries: libpthread.so.0:
cannot open shared object file: No such file or directory
可以按照如下方式解决:
===============================
修改 vipca 文件
[root@node2 opt]# vi /opt/ora10g/product/10.2.0/crs_1/bin/vipca
找到如下内容:
Remove this workaround when the bug 3937317 is fixed
arch=`uname -m`
[三思笔记]-手把手教你用 VMware 在 linux 下安装 Oracle10g RAC http://www.5ienet.com/ QQ:5454589 君三思 群:59666289
if [ "$arch" = "i686" -o "$arch" = "ia64" ]
then
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
fi
#End workaround
在 fi 后新添加一行:
unset LD_ASSUME_KERNEL
以及 srvctl 文件
[root@node2 opt]# vi /opt/ora10g/product/10.2.0/crs_1/bin/srvctl
找到如下内容:
LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
同样在其后新增加一行:
unset LD_ASSUME_KERNEL
保存退出,然后在 node2 重新执行 root.sh
当然,既然我们已经知道了有这个问题,建议最好在 node2 执行 root.sh 之前,首先修改 vipca。
其实同时需要你改的还有$ORACLE_HOME/bin/srvctl 文件,不然等装完数据库之后,srvctl 命令
也是会报这个错误地。要知道 srvctl 这么常用,如果它执行老报错,那可是相当致命啊。不过呢你现
在才安装到 crs,离 create db 还远着呢,大可以等到创建完数据库,待到需要管理时再修改该文件。
B).如果你碰到了这个错误:
The given interface(s), "eth0" is not public. Public interfaces should be used to configure virtual IPs.
解决方式如下:
==============================
图形界面上运行$CRS_HOME/bin/vipca,手工重新配置 rac1-vip 和 rac2-vip。
[root@node2 opt]# xhost +
[root@node2 opt]# /opt/ora10g/product/10.2.0/crs_1/bin/vipca
C).如果你碰到了这个错误:
Error 0(Native: listNetInterfaces:[3])
[Error 0(Native: listNetInterfaces:[3])]
解决方式如下:
===============================
[root@node2 bin]# ./oifcfg iflist
eth1 10.10.17.0
virbr0 192.168.122.0
eth0 192.168.100.0
[root@node2 bin]# ./oifcfg setif -global eth0/192.168.100.0:public
[root@node2 bin]# ./oifcfg setif -global eth1/10.10.10.0:cluster_interconnect
[root@node2 bin]# ./oifcfg getif
eth0 192.168.100.0 global public
eth1 10.10.10.0 global cluster_interconnect
然后在视窗界面重新执行 vipca 即可,如上 b 例中所示。
root@node1 ~]# /opt/ora10g/product/10.2.0/crs_1/bin/./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.node1.gsd application ONLINE ONLINE node1
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora.node2.gsd application ONLINE ONLINE node2
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip application ONLINE ONLINE node2
No comments:
Post a Comment