RACDB1@rac1 /home/oracle$ vi ssh.sh
ssh db10a date
ssh db10b date
ssh db10a-priv date
ssh db10b-priv date
ssh db10b
RACDB1@rac1 /home/oracle$ sh ssh.sh
The authenticity of host 'rac1 (192.168.1.103)' can't be established.
RSA key fingerprint is 94:ca:c8:ef:47:81:d7:f2:f6:1a:34:43:2f:5e:68:49.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1,192.168.1.103' (RSA) to the list of known
hosts.
Mon May 13 15:09:04 CST 2013
Mon May 13 15:09:06 CST 2013
The authenticity of host 'rac1-priv (192.168.2.101)' can't be established.
RSA key fingerprint is 94:ca:c8:ef:47:81:d7:f2:f6:1a:34:43:2f:5e:68:49.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1-priv,192.168.2.101' (RSA) to the list of known
hosts.
Mon May 13 15:09:07 CST 2013
The authenticity of host 'rac2-priv (192.168.2.102)' can't be established.
RSA key fingerprint is 94:ca:c8:ef:47:81:d7:f2:f6:1a:34:43:2f:5e:68:49.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2-priv,192.168.2.102' (RSA) to the list of known
hosts.
Mon May 13 15:09:10 CST 2013
RACDB2@rac2 /home/oracle$
这时已经通过 ssh 切换到 rac2 上,
副节点 rac2 上同样进行校验
RACDB2@rac2 /home/oracle$ vi ssh.sh
ssh rac1 date
ssh rac2 date
ssh rac1-priv date
ssh rac2-priv date
ssh rac1
RACDB2@rac2 /home/oracle$ sh ssh.sh
The authenticity of host 'rac1 (192.168.1.103)' can't be established.
RSA key fingerprint is 94:ca:c8:ef:47:81:d7:f2:f6:1a:34:43:2f:5e:68:49.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1,192.168.1.103' (RSA) to the list of known
hosts.
Mon May 13 15:11:11 CST 2013
The authenticity of host 'rac2 (192.168.1.102)' can't be established.
RSA key fingerprint is 94:ca:c8:ef:47:81:d7:f2:f6:1a:34:43:2f:5e:68:49.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2,192.168.1.102' (RSA) to the list of known
hosts.
Mon May 13 15:11:14 CST 2013
The authenticity of host 'rac1-priv (192.168.2.101)' can't be established.
RSA key fingerprint is 94:ca:c8:ef:47:81:d7:f2:f6:1a:34:43:2f:5e:68:49.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac1-priv,192.168.2.101' (RSA) to the list of known
hosts.
Mon May 13 15:11:14 CST 2013
The authenticity of host 'rac2-priv (192.168.2.102)' can't be established.
RSA key fingerprint is 94:ca:c8:ef:47:81:d7:f2:f6:1a:34:43:2f:5e:68:49.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'rac2-priv,192.168.2.102' (RSA) to the list of known
hosts.
Mon May 13 15:11:17 CST 2013
RACDB1@rac1 /home/oracle$
校验完毕同时切回了 rac1 节点
再次进行测试看看是否需要手动操作
RACDB1@rac1 /home/oracle$ sh ssh.sh
Mon May 13 15:12:17 CST 2013
Mon May 13 15:12:18 CST 2013
Mon May 13 15:12:17 CST 2013
Mon May 13 15:12:18 CST 2013
Last login: Mon May 13 15:09:10 2013 from rac1
RACDB2@rac2 /home/oracle$ sh ssh.sh
Mon May 13 15:12:23 CST 2013
Mon May 13 15:12:24 CST 2013
Mon May 13 15:12:23 CST 2013
Mon May 13 15:12:25 CST 2013
Last login: Mon May 13 15:11:16 2013 from rac2
一去一回,完全不用进行手动操作,两个节点间的互信关系就此配置完毕!!! PS:保证两节点的时间同步,在二节点停止ntpd服务,并部署下面的脚本,1s进行一次时间同步
[iyunv@rac2 ~]# cat ntpdate_to_rac1.sh -----注意:使用这个脚本的时候客户端的ntpd服务不启动
while :; do ntpdate db10a; sleep 1; done
如若仍不满足需求,可以在后台同时启动多个同步脚本。后台启动方法如下。
[iyunv@rac2 ~]# nohup sh ntpdate_to_rac1.sh >> ntpdate_to_rac1.log&
[iyunv@db10b ~]# tail -f ntpdate_to_rac1.log
9 Sep 22:51:20 ntpdate[9892]: adjust time server 192.168.1.10 offset -0.000113 sec
9 Sep 22:51:21 ntpdate[9894]: adjust time server 192.168.1.10 offset 0.000029 sec
9 Sep 22:51:22 ntpdate[9896]: adjust time server 192.168.1.10 offset -0.000058 sec
9 Sep 22:51:23 ntpdate[9898]: adjust time server 192.168.1.10 offset 0.000010 sec
9 Sep 22:51:24 ntpdate[9900]: adjust time server 192.168.1.10 offset -0.000062 sec
9 Sep 22:51:25 ntpdate[9902]: adjust time server 192.168.1.10 offset -0.000022 sec
9 Sep 22:51:26 ntpdate[9904]: adjust time server 192.168.1.10 offset -0.000017 sec
..... 三,安装 1.安装cluster软件
解压:
cd /oracle/media/clusterware/
./runcluvfy.sh stage -pre crsinst -n db10a,db10b -verbose
检查报:
Could not find a suitable set of interfaces for VIPs.
忽略,继续安装
安装cluster软件的最后要执行两个脚本
[iyunv@rac1 ~]# /u01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oracle/oraInventory to 770.
Changing groupname of /u01/app/oracle/oraInventory to oinstall.
The execution of the script is complete
[iyunv@rac2 ~]# /u01/app/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oracle/oraInventory to 770.
Changing groupname of /u01/app/oracle/oraInventory to oinstall.
The execution of the script is complete
第二个脚本在第一个节点 rac1 上执行
[iyunv@db10b bin]# /u01/crs1020/root.sh
Checking to see if Oracle CRS stack is already configured
Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: db10a db10a-priv db10a
node 2: db10b db10b-priv db10b
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Now formatting voting device: /dev/raw/raw2
Format of 1 voting devices complete.
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
Failure at final check of Oracle CRS stack.
10
查看日志
注释:这个日志在crs目录下的log目录下的db10a(主机名),例如,/u01/crs1020/log/db10b下面的alertdb10b.log
[client(20498)]CRS-1006:The OCR location /dev/raw/raw1 is inaccessible. Details in /u01/crs1020/log/db10a/client/ocrconfig_20498.log.
2014-09-10 11:57:38.503
[client(20498)]CRS-1006:The OCR location /dev/raw/raw1 is inaccessible. Details in /u01/crs1020/log/db10a/client/ocrconfig_20498.log.
2014-09-10 11:57:38.533
[client(20498)]CRS-1006:The OCR location /dev/raw/raw1 is inaccessible. Details in /u01/crs1020/log/db10a/client/ocrconfig_20498.log.
2014-09-10 11:57:38.616
[client(20498)]CRS-1001:The OCR was formatted using version 2.
CRS
crsd.log:
Oracle Database 10g CRS Release 10.2.0.1.0 Production Copyright 1996, 2005 Oracle. All rights reserved.
2008-06-25 13:44:35.663: [ default][3086907072][ENTER]0
Oracle Database 10g CRS Release 10.2.0.1.0 Production Copyright 1996, 2004, Oracle. All rights reserved
2008-06-25 13:44:35.663: [ default][3086907072]0CRS Daemon Starting
2008-06-25 13:44:35.664: [ CRSMAIN][3086907072]0Checking the OCR device
2008-06-25 13:44:35.669: [ CRSMAIN][3086907072]0Connecting to the CSS Daemon
2008-06-25 13:44:35.743: [ COMMCRS][132295584]clsc_connect: (0x86592a8) no listener at (ADDRESS=(PROTOCOL=ipc)(KEY=OCSSD_LL_rac2_crs))
2008-06-25 13:44:35.743: [ CSSCLNT][3086907072]clsssInitNative: connect failed, rc 9
2008-06-25 13:44:35.743: [ CRSRTI][3086907072]0CSS is not ready. Received status 3 from CSS. Waiting for good status ..
2008-06-25 13:44:36.753: [ COMMCRS][132295584]clsc_connect: (0x86050a8) no listener at (ADDRESS=(PROTOCOL=ipc)(KEY=OCSSD_LL_rac2_crs))
2008-06-25 13:44:36.753: [ CSSCLNT][3086907072]clsssInitNative: connect failed, rc 9
2008-06-25 13:44:36.753: [ CRSRTI][3086907072]0CSS is not ready. Received status 3 from CSS. Waiting for good status ..
.
..(后面一直重复同样的错误信息)
解决方法:
[iyunv@db10b u01]# /u01/crs1020/root.sh
Checking to see if Oracle CRS stack is already configured
Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: db10a db10a-priv db10a
node 2: db10b db10b-priv db10b
clscfg: Arguments check out successfully.
NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
db10a
db10b
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
PRKH-1010 : Unable to communicate with CRS services.
[PRKH-1000 : Unable to load the SRVM HAS shared library
[PRKN-1008 : Unable to load the shared library "srvmhas10"
or a dependent library, from
LD_LIBRARY_PATH="/u01/crs1020/jdk/jre/lib/i386/client:/u01/crs1020/jdk/jre/lib/i386:/u01/crs1020/jdk/jre/../lib/i386:/u01/crs1020/lib32:/u01/crs1020/srvm/lib32:/u01/crs1020/lib:/u01/crs1020/srvm/lib:/u01/crs1020/lib"
[java.lang.UnsatisfiedLinkError: /u01/crs1020/lib32/libsrvmhas10.so: libclntsh.so.10.1: wrong ELF class: ELFCLASS64]]]
PRKH-1010 : Unable to communicate with CRS services.
[PRKH-1000 : Unable to load the SRVM HAS shared library
[PRKN-1008 : Unable to load the shared library "srvmhas10"
or a dependent library, from
LD_LIBRARY_PATH="/u01/crs1020/jdk/jre/lib/i386/client:/u01/crs1020/jdk/jre/lib/i386:/u01/crs1020/jdk/jre/../lib/i386:/u01/crs1020/lib32:/u01/crs1020/srvm/lib32:/u01/crs1020/lib:/u01/crs1020/srvm/lib:/u01/crs1020/lib"
[java.lang.UnsatisfiedLinkError: /u01/crs1020/lib32/libsrvmhas10.so: libclntsh.so.10.1: wrong ELF class: ELFCLASS64]]]
PRKH-1010 : Unable to communicate with CRS services.
[PRKH-1000 : Unable to load the SRVM HAS shared library
[PRKN-1008 : Unable to load the shared library "srvmhas10"
or a dependent library, from
LD_LIBRARY_PATH="/u01/crs1020/jdk/jre/lib/i386/client:/u01/crs1020/jdk/jre/lib/i386:/u01/crs1020/jdk/jre/../lib/i386:/u01/crs1020/lib32:/u01/crs1020/srvm/lib32:/u01/crs1020/lib:/u01/crs1020/srvm/lib:/u01/crs1020/lib"
[java.lang.UnsatisfiedLinkError: /u01/crs1020/lib32/libsrvmhas10.so: libclntsh.so.10.1: wrong ELF class: ELFCLASS64]]]
解决:
[iyunv@db10b u01]# /u01/crs1020/root.sh
Checking to see if Oracle CRS stack is already configured
Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: db10a db10a-priv db10a
node 2: db10b db10b-priv db10b
clscfg: Arguments check out successfully.
NO KEYS WERE WRITTEN. Supply -force parameter to override.
-force is destructive and will destroy any previous cluster
configuration.
Oracle Cluster Registry for cluster has already been initialized
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
db10a
db10b
CSS is active on all nodes.
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
Error 0(Native: listNetInterfaces:[3])
[Error 0(Native: listNetInterfaces:[3])]
解决: