linux下Oracle11g RAC搭建(五)
四、建立主机间的信任关系(node1、node2)
建立节点之间oracle 、grid 用户之间的信任(通过ssh 建立公钥和私钥)
分别在node1和node2创建
=====Oracle用户=========================
在oracle用户下操作:
[root@node1 /]# su - oracle
[oracle@node1 ~]$ mkdir .ssh 创建一个.ssh的隐藏目录
[oracle@node1 ~]$ ls -al
total 44
-rw-r--r-- 1 oracle oinstall 33 Jul 12 17:05 .bash_logout
-rw-r--r-- 1 oracle oinstall 438 Jul 12 18:03 .bash_profile
drwxr-xr-x 4 oracle oinstall 4096 Jul 1217:05 .mozilla
drwx------ 2 oracle oinstall 4096 Jul 1218:05 .ssh
-rw------- 1 oracle oinstall 657 Jul 12 18:03 .viminfo
1)生成密钥对(rsa+dsa)(node1、node2)
node1生成密钥rsa类型
id_rsa为私钥,自动保存到.ssh下
id_rsa.pub为公钥,自动保存到.ssh下
[oracle@node1 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key(/home/oracle/.ssh/id_rsa): enter
Enter passphrase (empty for nopassphrase): enter
Enter same passphrase again: enter
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:
64:a6:4a:77:db:33:a4:aa:6e:ca:8f:5f:2f:77:0f:40oracle@node1
node1生成密钥dsa类型
id_dsa为私钥,自动保存到.ssh下
id_dsa.pub为公钥,自动保存到.ssh下
[oracle@node1 ~]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key(/home/oracle/.ssh/id_dsa): enter
Enter passphrase (empty for no passphrase):enter
Enter same passphrase again: enter
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:
7c:41:b5:0f:81:06:ad:30:07:4f:8b:1a:9b:94:68:14oracle@node1
node2生成密钥rsa类型
id_rsa为私钥,自动保存到.ssh下
id_rsa.pub为公钥,自动保存到.ssh下
[oracle@node2 asm]# su - oracle
[oracle@node2 ~]$ mkdir .ssh
[oracle@node2 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key(/home/oracle/.ssh/id_rsa): enter
Enter passphrase (empty for nopassphrase): enter
Enter same passphrase again: enter