11 g rac 安裝 9步

tom_xieym發表於2011-08-05
九. 建立使用者等效性
使用 SSH 建立使用者等效性。在叢集就緒服務 (CRS) 和 RAC 安裝過程中,Oracle Universal Installer (OUI) 必須能夠以 oracle 的身份將軟體複製到所有 RAC 節點,而不提示輸入口令。
要建立使用者等效性,請在兩個節點上以 grid和oracle 使用者身份分別生成使用者的公開金鑰和私密金鑰。
9.1 grid 使用者等效性
在 node1 上執行
wmrac01$mkdir ~/.ssh
wmrac01$chmod 700 ~/.ssh
wmrac01$ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/grid/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/grid/.ssh/id_rsa.
Your public key has been saved in /home/grid/.ssh/id_rsa.pub.
The key fingerprint is:
7a:7c:80:df:d5:26:15:e1:41:91:3e:cd:d4:f2:05:62grid@wmrac01
wmrac01$ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/grid/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/grid/.ssh/id_dsa.
Your public key has been saved in /home/grid/.ssh/id_dsa.pub.
The key fingerprint is:
dc:0a:68:9f:24:e5:4e:38:03:9e:bd:a5:6c:86:9e:7agrid@wmrac01
在 node2 上執行
wmrac02$mkdir ~/.ssh
wmrac02$chmod 700 ~/.ssh
wmrac02$ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/grid/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/grid/.ssh/id_rsa.
Your public key has been saved in /home/grid/.ssh/id_rsa.pub.
The key fingerprint is:
0b:a4:1b:3e:7c:15:23:d4:d1:ff:a3:7f:7d:33:73:ebgrid@wmrac02
wmrac02$ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/grid/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/grid/.ssh/id_dsa.
Your public key has been saved in /home/grid/.ssh/id_dsa.pub.
The key fingerprint is:
2e:cd:ed:d9:de:5d:a5:6b:dd:67:07:14:d9:3f:0b:2cgrid@wmrac02
在 node1 上執行
wmrac01$cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
wmrac01$cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
wmrac01$ssh wmrac02 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'wmrac02 (10.118.253.42)' can't be established.
RSA key fingerprint is 66:d8:2f:b4:58:8b:10:d8:ac:9d:7e:e4:43:a4:18:1c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'wmrac02,10.118.253.42' (RSA) to the list of known hosts.
grid@wmrac02'spassword:
wmrac01$ssh wmrac02 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
grid@wmrac02'spassword:
wmrac01$scp ~/.ssh/authorized_keys wmrac02:~/.ssh/authorized_keys
grid@wmrac02'spassword:
authorized_keys                               100% 1992     2.0KB/s   00:00
在每個節點上測試連線。驗證當您再次執行以下命令時,系統是否不提示您輸入口令。
wmrac01$ssh 10.118.253.41 date
Mon Jan 24 17:25:59 CST 2011
wmrac01$ssh 10.118.253.42 date
Mon Jan 24 17:26:02 CST 2011
wmrac01$ssh 192.168.1.11 date
Mon Jan 24 17:26:12 CST 2011
wmrac01$ssh 192.168.1.12 date
Mon Jan 24 17:26:15 CST 2011
wmrac01$ssh wmrac01 date
Mon Jan 24 17:26:26 CST 2011
wmrac01$ssh wmrac02 date
Mon Jan 24 17:26:29 CST 2011
wmrac01$ssh wmpri01 date
Mon Jan 24 17:26:41 CST 2011
wmrac01$ssh wmpri02 date
Mon Jan 24 17:26:44 CST 2011
一定要確認不需要密碼就能執行 否則後面從node1遠端安裝grid到node2上的時候會報錯.
9.2 oracle 使用者等效性
在 node1 上執行
wmrac01$mkdir ~/.ssh
wmrac01$chmod 700 ~/.ssh
wmrac01$ssh-keygen -t rsa
Generating 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/id_rsa.pub.
The key fingerprint is:
fa:8b:a8:79:e2:14:6e:e5:c0:c3:37:aa:da:62:8d:46oracle@wmrac01
wmrac01$ssh-keygen -t dsa
Generating 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/id_dsa.pub.
The key fingerprint is:
73:4e:9d:cc:7d:d4:85:ee:ce:84:59:04:47:51:38:89oracle@wmrac01
在 node2 上執行
wmrac02$mkdir ~/.ssh
wmrac02$chmod 700 ~/.ssh
wmrac02$ssh-keygen -t rsa
Generating 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/id_rsa.pub.
The key fingerprint is:
df:dd:50:e5:65:a5:41:1a:6e:8d:84:84:04:5d:4c:82oracle@wmrac02
wmrac02$ssh-keygen -t dsa
Generating 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/id_dsa.pub.
The key fingerprint is:
50:75:fe:b5:a9:10:ea:96:df:07:ec:ac:77:3f:48:bcoracle@wmrac02
在 node1 上執行
wmrac01$cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
wmrac01$cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
wmrac01$ssh wmrac02 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
The authenticity of host 'wmrac02 (10.118.253.42)' can't be established.
RSA key fingerprint is 66:d8:2f:b4:58:8b:10:d8:ac:9d:7e:e4:43:a4:18:1c.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'wmrac02,10.118.253.42' (RSA) to the list of known hosts.
oracle@wmrac02'spassword:
wmrac01$ssh wmrac02 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
oracle@wmrac02'spassword:
wmrac01$scp ~/.ssh/authorized_keys wmrac02:~/.ssh/authorized_keys
oracle@wmrac02'spassword:
authorized_keys                               100% 2000     2.0KB/s   00:00 
在每個節點上測試連線。驗證當您再次執行以下命令時,系統是否不提示您輸入口令。
wmrac01$ssh 10.118.253.41 date
Mon Jan 24 17:31:26 CST 2011
wmrac01$ssh 10.118.253.42 date
Mon Jan 24 17:31:31 CST 2011
wmrac01$ssh 192.168.1.11 date
Mon Jan 24 17:31:36 CST 2011
wmrac01$ssh 192.168.1.12 date
Mon Jan 24 17:31:40 CST 2011
wmrac01$ssh wmrac01 date
Mon Jan 24 17:31:51 CST 2011
wmrac01$ssh wmrac02 date
Mon Jan 24 17:31:44 CST 2011
wmrac01$ssh wmpri01 date
Mon Jan 24 17:31:58 CST 2011
wmrac01$ssh wmpri02 date
Mon Jan 24 17:32:03 CST 2011
一定要確認不需要密碼就能執行 否則後面從node1遠端安裝oracle到node2上的時候會報錯.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25850100/viewspace-704185/,如需轉載,請註明出處,否則將追究法律責任。

相關文章