基於CentOS與VmwareStation10搭建Oracle11G RAC 64叢集環境:2.搭建環境-2.9. 配置使用者等效性(可選項)

來源:互聯網
上載者:User

標籤:style   io   os   ar   for   sp   strong   div   on   

2.9.配置使用者等效性(可選項)

  Oracle 11g r2 ssh也可以在安裝過程中配置.

2.9.1. grid使用者等效性

1.以下均以grid使用者執行: 在兩個節點的grid主目錄分別建立.ssh目錄,並賦予許可權

linuxrac1

[[email protected] ~]$mkdir ~/.ssh

[[email protected] ~]$chmod 755 ~/.ssh

[[email protected] ~]$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:7b:62:31:da:07:88:0d:22:46:46:28:d1:cc:87:e1 [email protected]

[[email protected] ~]$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:

19:3b:fc:23:85:8d:f4:58:7d:f6:fd:80:99:ce:f8:52 [email protected]

 

linuxrac2

[[email protected] ~]$ mkdir ~/.ssh

[[email protected] ~]$ chmod 755 ~/.ssh

[[email protected] ~]$ 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:

69:8c:94:2b:2b:a4:8d:33:82:8f:b0:49:03:a1:1a:b9 [email protected]

 

[[email protected] ~]$ 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:

1f:4d:e7:3f:c7:4d:d8:f0:55:f0:eb:c1:ea:74:93:24 [email protected]

 

以上用預設配置,一路斷行符號即可

 

linuxrac1

cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

[email protected] ~]$ cd .ssh

[[email protected] .ssh]$ ll

total 48

-rw-r--r-- 1 grid oinstall 2000 Sep 25 00:48 authorized_keys

-rw------- 1 grid oinstall  668 Sep 25 00:43 id_dsa

-rw-r--r-- 1 grid oinstall  604 Sep 25 00:43 id_dsa.pub

-rw------- 1 grid oinstall 1675 Sep 25 00:42 id_rsa

-rw-r--r-- 1 grid oinstall  396 Sep 25 00:42 id_rsa.pub

-rw-r--r-- 1 grid oinstall  404 Sep 25 00:48 known_hosts

 

linuxrac2

cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

2.建立等效性 rac1,rac2雙節點執行

[[email protected] ~]$ exec ssh-agent $SHELL

[[email protected] ~]$ ssh-add

Identity added: /home/grid/.ssh/id_rsa (/home/grid/.ssh/id_rsa)

Identity added: /home/grid/.ssh/id_dsa (/home/grid/.ssh/id_dsa)

[[email protected] ~]$ ssh linuxrac1 date

[[email protected] ~]$ ssh linuxrac1-priv date

[[email protected] ~]$ ssh linuxrac2 date

[[email protected] ~]$ ssh linuxrac2-priv date

ssh linuxrac1 date; ssh linuxrac2 date

[[email protected] ~]$ exec ssh-agent $SHELL

[[email protected] ~]$ ssh-add

Identity added: /home/grid/.ssh/id_rsa (/home/grid/.ssh/id_rsa)

Identity added: /home/grid/.ssh/id_dsa (/home/grid/.ssh/id_dsa)

[[email protected] ~]$ ssh linuxrac1 date

[[email protected] ~]$ ssh linuxrac1-priv date

[[email protected] ~]$ ssh linuxrac2 date

[[email protected] ~]$ ssh linuxrac2-priv date

2.9.2. oracle 使用者等效性

以下均以oracle使用者執行

linuxrac1

[oracle @linuxrac1 ~]$mkdir ~/.ssh

[oracle @linuxrac1 ~]$chmod 755 ~/.ssh

[oracle @linuxrac1 ~]$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:

e9:2b:1a:2b:ac:5f:91:be:0f:84:17:d7:bd:b7:15:d2 [email protected]

[oracle @linuxrac1 ~]$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:

f5:0f:f5:0c:55:37:6a:08:ef:06:07:37:65:25:4a:15 [email protected]

 

linuxrac2

[oracle @linuxrac2 ~]$ mkdir ~/.ssh

[oracle @linuxrac2 ~]$ chmod 755 ~/.ssh

[oracle @linuxrac2 ~]$ 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:

56:47:a0:94:67:44:d9:31:12:57:44:08:9d:84:25:a1 [email protected]

 

[oracle @linuxrac2 ~]$ 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:

ae:f0:06:77:62:33:86:dc:f4:0d:d9:c6:38:5e:cb:61 [email protected]

 

以上用預設配置,一路斷行符號即可

linuxrac1

cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

[[email protected] ~]$ cd .ssh

[[email protected] .ssh]$ ll

total 48

-rw-r--r-- 1 oracle oinstall 2008 Sep 25 02:20 authorized_keys

-rw------- 1 oracle oinstall  668 Sep 25 02:09 id_dsa

-rw-r--r-- 1 oracle oinstall  606 Sep 25 02:09 id_dsa.pub

-rw------- 1 oracle oinstall 1675 Sep 25 02:09 id_rsa

-rw-r--r-- 1 oracle oinstall  398 Sep 25 02:09 id_rsa.pub

-rw-r--r-- 1 oracle oinstall  404 Sep 25 02:20 known_hosts

linuxrac2

cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys

ssh [email protected] cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

 

建立等效性 rac1,rac2雙節點執行

[[email protected] ~]$ exec ssh-agent $SHELL

[[email protected] ~]$ ssh-add

Identity added: /home/oracle/.ssh/id_rsa (/home/oracle/.ssh/id_rsa)

Identity added: /home/oracle/.ssh/id_dsa (/home/oracle/.ssh/id_dsa)

[[email protected] ~]$ ssh linuxrac1 date

[[email protected] ~]$ ssh linuxrac1-priv date

[[email protected] ~]$ ssh linuxrac2 date

[[email protected] ~]$ ssh linuxrac2-priv date

 

[[email protected] ~]$ exec ssh-agent $SHELL

[[email protected] ~]$ ssh-add

Identity added: /home/oracle/.ssh/id_rsa (/home/oracle/.ssh/id_rsa)

Identity added: /home/oracle/.ssh/id_dsa (/home/oracle/.ssh/id_dsa)

 

  • The authenticity of host ‘<host>‘ can‘t be established.  

 

  解決辦法:在串連目標機上執行ssh  -o StrictHostKeyChecking=no  xxxx(機器名)

 

基於CentOS與VmwareStation10搭建Oracle11G RAC 64叢集環境:2.搭建環境-2.9.配置使用者等效性(可選項)

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.