【文章內(nèi)容簡(jiǎn)介】
[root@node1 ~] hostname node2[root@node1 ~] vi /etc/sysconfig/network這樣重啟之后機(jī)器名稱(chēng)就會(huì)變成node2了。用 systemconfignetwork 命令Eth0 ,子網(wǎng)掩碼:,網(wǎng)關(guān):Eth0 , 子網(wǎng)掩碼:,網(wǎng)關(guān):null激活網(wǎng)卡修改 ORACLE_SID=rac2。 export ORACLE_SID 重啟節(jié)點(diǎn)2配置Clusterware安裝環(huán)境設(shè)置ssh在clusterware (CRS) 和 Rac Database安裝過(guò)程中,Oracle Universal Installer (OUI) 必須能夠以 oracle 的身份自動(dòng)將軟件復(fù)制到所有 RAC 節(jié)點(diǎn)。這里我們通過(guò)配置ssh 讓oracle用戶(hù)擁有不輸入密碼即可訪問(wèn)各節(jié)點(diǎn)的能力。 首先兩個(gè)節(jié)點(diǎn)間以及與網(wǎng)關(guān)要ping通,要確保都是通的[root@node2 ~] ping PING () 56(84) bytes of data.64 bytes from : icmp_seq=1 ttl=64 time= ms64 bytes from : icmp_seq=2 ttl=64 time= ms ping statistics 2 packets transmitted, 2 received, 0% packet loss, time 999msrtt min/avg/max/mdev = [root@node2 ~] ping PING () 56(84) bytes of data.64 bytes from : icmp_seq=1 ttl=64 time= ms64 bytes from : icmp_seq=2 ttl=64 time= ms ping statistics 2 packets transmitted, 2 received, 0% packet loss, time 999msrtt min/avg/max/mdev = [root@node1 ~] ping PING () 56(84) bytes of data.64 bytes from : icmp_seq=1 ttl=64 time= ms64 bytes from : icmp_seq=2 ttl=64 time= ms要建立用戶(hù)等效性,需要在兩個(gè)節(jié)點(diǎn)上以 oracle 用戶(hù)身份生成用戶(hù)的公鑰和私鑰,首先在node1執(zhí)行[root@node1 ~] su oracle[oracle@node1 ~]$ mkdir ~/.ssh[oracle@node1 ~]$ chmod 700 ~/.ssh[oracle@node1 ~]$ sshkeygen t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/oracle/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/oracle/.ssh/id_rsa.Your public key has been saved in /home/oracle/.ssh/.The key fingerprint is:58:43:d8:96:74:a2:91:30:4f:e4:b8:b2:b3:e9:a6:90 oracle@node1[oracle@node1 ~]$ sshkeygen t dsaGenerating public/private dsa key pair.Enter file in which to save the key (/home/oracle/.ssh/id_dsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/oracle/.ssh/id_dsa.Your public key has been saved in /home/oracle/.ssh/.The key fingerprint is:4a:55:81:ba:e6:09:aa:41:12:d3:3e:7f:ad:f8:68:43 oracle@node1然后node2執(zhí)行[root@node2 ~] su oracle[oracle@node2 ~]$ mkdir ~/.ssh[oracle@node2 ~]$ chmod 700 ~/.ssh[oracle@node2 ~]$ sshkeygen t rsaGenerating public/private rsa key pair.Enter file in which to save the key (/home/oracle/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/oracle/.ssh/id_rsa.Your public key has been saved in /home/oracle/.ssh/.The key fingerprint is:d7:55:13:69:aa:d2:b0:5b:2e:bd:ca:fd:60:62:bd:2b oracle@node2[oracle@node2 ~]$ sshkeygen t dsaGenerating public/private dsa key pair.Enter file in which to save the key (/home/oracle/.ssh/id_dsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/oracle/.ssh/id_dsa.Your public key has been saved in /home/oracle/.ssh/.The key fingerprint is:df:40:a4:54:b1:5a:77:79:e9:98:3d:04:d8:a6:83:83 oracle@node2切換回node1,接著執(zhí)行:ssh[oracle@node1 ~]$