使用VMware ESXi Server 5.0在OEL6.1上安裝 Oracle RAC 11gR1(7)-配置各節點的SSH

cow977發表於2012-03-29

http://space.itpub.net/81227/viewspace-719245     引言

http://space.itpub.net/81227/viewspace-719246     1. 硬體要求和概述

http://space.itpub.net/81227/viewspace-719341     2. 配置第一個虛擬機器

http://space.itpub.net/81227/viewspace-719410     3. 在第一個虛擬機器上安裝 Oracle Linux 6.1

http://space.itpub.net/81227/viewspace-719476     4. 在第一個虛擬機器上配置 Oracle Linux 6.1

http://space.itpub.net/81227/viewspace-719577     5. 在第一個虛擬機器上完成安裝前系統準備

http://space.itpub.net/81227/viewspace-719677     6. 建立並配置第二個虛擬機器

 

 

使用SSH建立使用者等效性。在叢集就緒服務(CRS)RAC安裝過程中,Oracle Universal Installer(OUI)必須能夠以oracle的身份將軟體複製到所有RAC節點,而不提示輸入口令。在Oracle 11g中,可以使用ssh代替rsh完成此操作。

要建立使用者等效性,請在兩個節點上以oracle使用者身份生成使用者的公鑰和私鑰。開啟rac1的電源,在這兩個節點上執行以下任務。

rac1rac2上分別執行以下命令:

rac1-> mkdir ~/.ssh

rac1-> chmod 700 ~/.ssh

rac1-> 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:

87:54:4f:92:ba:ed:7b:51:5d:1d:59:5b:f9:44:da:b6 oracle@rac1.csh1.com

rac1-> 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:

31:76:96:e6:fc:b7:25:04:fd:70:42:04:1f:fc:9a:26 oracle@rac1.csh1.com

rac1上執行

rac1-> cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

rac1-> cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

rac1-> ssh rac2 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

The authenticity of host 'rac2 (192.168.2.132)' can't be established.

RSA key fingerprint is 63:d3:52:d4:4d:e2:cb:ac:8d:4a:66:9f:f1:ab:28:1f.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added 'rac2,192.168.2.132' (RSA) to the list of known hosts.

oracle@rac2's password:

rac1-> ssh rac2 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

oracle@rac2's password:

rac1-> scp ~/.ssh/authorized_keys rac2:~/.ssh/authorized_keys

oracle@rac2's password:

authorized_keys                           100% 1716     1.7KB/s   00:00

在每個節點上測試連線。驗證當您再次執行以下命令時,系統是否不提示您輸入口令。

ssh rac1 date

ssh rac2 date

ssh rac1-priv date

ssh rac2-priv date

ssh rac1.csh1.com date

ssh rac2.csh1.com date

ssh rac1-priv.csh1.com date

ssh rac2-priv.csh1.com date

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

相關文章