ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 11 g rac 安裝 9步

11 g rac 安裝 9步

原创 Linux操作系统 作者:tom_xieym 时间:2011-08-05 10:35:32 0 删除 编辑
九. 建立用戶等效性
使用 SSH 建立用戶等效性。在集群就緒服務 (CRS) 和 RAC 安裝過程中,Oracle Universal Installer (OUI) 必須能夠以 oracle 的身份將軟體複製到所有 RAC 節點,而不提示輸入口令。
要建立用戶等效性,請在兩個節點上以 grid和oracle 用戶身份分別生成用戶的公開金鑰和私密金鑰。
9.1 grid 用戶等效性
在 node1 上執行
wmrac01<*+ASM1*/home/grid>$mkdir ~/.ssh
wmrac01<*+ASM1*/home/grid>$chmod 700 ~/.ssh
wmrac01<*+ASM1*/home/grid>$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<*+ASM1*/home/grid>$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<*+ASM2*/home/grid>$mkdir ~/.ssh
wmrac02<*+ASM2*/home/grid>$chmod 700 ~/.ssh
wmrac02<*+ASM2*/home/grid>$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<*+ASM2*/home/grid>$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<*+ASM1*/home/grid>$cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
wmrac01<*+ASM1*/home/grid>$cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
wmrac01<*+ASM1*/home/grid>$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<*+ASM1*/home/grid>$ssh wmrac02 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
grid@wmrac02'spassword:
wmrac01<*+ASM1*/home/grid>$scp ~/.ssh/authorized_keys wmrac02:~/.ssh/authorized_keys
grid@wmrac02'spassword:
authorized_keys                               100% 1992     2.0KB/s   00:00
在每個節點上測試連接。驗證當您再次運行以下命令時,系統是否不提示您輸入口令。
wmrac01<*+ASM1*/home/grid>$ssh 10.118.253.41 date
Mon Jan 24 17:25:59 CST 2011
wmrac01<*+ASM1*/home/grid>$ssh 10.118.253.42 date
Mon Jan 24 17:26:02 CST 2011
wmrac01<*+ASM1*/home/grid>$ssh 192.168.1.11 date
Mon Jan 24 17:26:12 CST 2011
wmrac01<*+ASM1*/home/grid>$ssh 192.168.1.12 date
Mon Jan 24 17:26:15 CST 2011
wmrac01<*+ASM1*/home/grid>$ssh wmrac01 date
Mon Jan 24 17:26:26 CST 2011
wmrac01<*+ASM1*/home/grid>$ssh wmrac02 date
Mon Jan 24 17:26:29 CST 2011
wmrac01<*+ASM1*/home/grid>$ssh wmpri01 date
Mon Jan 24 17:26:41 CST 2011
wmrac01<*+ASM1*/home/grid>$ssh wmpri02 date
Mon Jan 24 17:26:44 CST 2011
一定要確認不需要密碼就能執行 否則後面從node1遠端安裝grid到node2上的時候會報錯.
9.2 oracle 用戶等效性
在 node1 上執行
wmrac01<*ccptdb1*/home/oracle>$mkdir ~/.ssh
wmrac01<*ccptdb1*/home/oracle>$chmod 700 ~/.ssh
wmrac01<*ccptdb1*/home/oracle>$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<*ccptdb1*/home/oracle>$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<*ccptdb2*/home/oracle>$mkdir ~/.ssh
wmrac02<*ccptdb2*/home/oracle>$chmod 700 ~/.ssh
wmrac02<*ccptdb2*/home/oracle>$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<*ccptdb2*/home/oracle>$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<*ccptdb1*/home/oracle>$cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
wmrac01<*ccptdb1*/home/oracle>$cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
wmrac01<*ccptdb1*/home/oracle>$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<*ccptdb1*/home/oracle>$ssh wmrac02 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
oracle@wmrac02'spassword:
wmrac01<*ccptdb1*/home/oracle>$scp ~/.ssh/authorized_keys wmrac02:~/.ssh/authorized_keys
oracle@wmrac02'spassword:
authorized_keys                               100% 2000     2.0KB/s   00:00 
在每個節點上測試連接。驗證當您再次運行以下命令時,系統是否不提示您輸入口令。
wmrac01<*ccptdb1*/home/oracle>$ssh 10.118.253.41 date
Mon Jan 24 17:31:26 CST 2011
wmrac01<*ccptdb1*/home/oracle>$ssh 10.118.253.42 date
Mon Jan 24 17:31:31 CST 2011
wmrac01<*ccptdb1*/home/oracle>$ssh 192.168.1.11 date
Mon Jan 24 17:31:36 CST 2011
wmrac01<*ccptdb1*/home/oracle>$ssh 192.168.1.12 date
Mon Jan 24 17:31:40 CST 2011
wmrac01<*ccptdb1*/home/oracle>$ssh wmrac01 date
Mon Jan 24 17:31:51 CST 2011
wmrac01<*ccptdb1*/home/oracle>$ssh wmrac02 date
Mon Jan 24 17:31:44 CST 2011
wmrac01<*ccptdb1*/home/oracle>$ssh wmpri01 date
Mon Jan 24 17:31:58 CST 2011
wmrac01<*ccptdb1*/home/oracle>$ssh wmpri02 date
Mon Jan 24 17:32:03 CST 2011
一定要確認不需要密碼就能執行 否則後面從node1遠端安裝oracle到node2上的時候會報錯.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25850100/viewspace-704185/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 11 g rac 安裝 10步
请登录后发表评论 登录
全部评论

注册时间:2011-05-20

  • 博文量
    77
  • 访问量
    95586