OracleRAC安装随笔

在配置RAC节点之间相互信任机制的时候,rac2节点上grid用户忘记给 ~/.ssh授权,导致rac2节点无法通过验证,错误如下:

 1 [grid@rac2 grid]$ ./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -fixup -verbose
 2 
 3 Performing pre-checks for cluster services setup 
 4 
 5 Checking node reachability...
 6 
 7 Check: Node reachability from node "rac2"
 8   Destination Node                      Reachable?              
 9   ------------------------------------  ------------------------
10   rac2                                  yes                     
11   rac1                                  yes                     
12 Result: Node reachability check passed from node "rac2"
13 
14 
15 Checking user equivalence...
16 
17 Check: User equivalence for user "grid"
18   Node Name                             Comment                 
19   ------------------------------------  ------------------------
20   rac2                                  failed                  
21   rac1                                  failed                  
22 Result: PRVF-4007 : User equivalence check failed for user "grid"
23 
24 ERROR: 
25 User equivalence unavailable on all the specified nodes
26 Verification cannot proceed
27 
28 
29 Pre-check for cluster services setup was unsuccessful on all the nodes

上面的错误就是先创建了ssh验证,然后在授权导致,一定要先授权然后在创建ssh验证,代码如下:

 1 [grid@rac2 .ssh]$ chmod 700 ~/.ssh/
 2 [grid@rac2 .ssh]$ /usr/bin/ssh-key -t rsa
 3 ssh-keygen   ssh-keyscan  
 4 [grid@rac2 .ssh]$ /usr/bin/ssh-keygen -t rsa
 5 Generating public/private rsa key pair.
 6 Enter file in which to save the key (/home/grid/.ssh/id_rsa): 
 7 /home/grid/.ssh/id_rsa already exists.
 8 Overwrite (y/n)? yes
 9 Enter passphrase (empty for no passphrase): 
10 Enter same passphrase again: 
11 Your identification has been saved in /home/grid/.ssh/id_rsa.
12 Your public key has been saved in /home/grid/.ssh/id_rsa.pub.
13 The key fingerprint is:
14 3d:50:b7:09:58:c6:84:8e:52:46:a6:ca:bc:6b:da:12 grid@rac2
15 The key's randomart image is:
16 +--[ RSA 2048]----+
17 |     .o  ** .    |
18 |     oo oo.o o   |
19 |    .o o.   o    |
20 | o .. . .o       |
21 |  +  .  S o      |
22 |E  .       .     |
23 | ..              |
24 |....             |
25 |.+o              |
26 +-----------------+
27 [grid@rac2 .ssh]$ cat id_rsa.pub >>authorized_keys 
28 [grid@rac2 .ssh]$ ls
29 authorized_keys  id_rsa  id_rsa.pub  known_hosts
30 [grid@rac2 .ssh]$ ll
31 total 16
32 -rw-r--r--. 1 grid oinstall  782 Aug 17 13:38 authorized_keys
33 -rw-------. 1 grid oinstall 1675 Aug 17 13:37 id_rsa
34 -rw-r--r--. 1 grid oinstall  391 Aug 17 13:37 id_rsa.pub
35 -rw-r--r--. 1 grid oinstall 1590 Aug 17 12:49 known_hosts
36 [grid@rac2 .ssh]$ scp authorized_keys rac1:/home/grid/.ssh/
37 grid@rac1's password: 
38 authorized_keys                                                                                                                                            100%  782     0.8KB/s   00:00    
39 [grid@rac2 .ssh]$ ssh rac1 date
40 Fri Aug 17 13:39:09 CST 2018
41 [grid@rac2 .ssh]$ ssh rac1priv date
42 Fri Aug 17 13:39:18 CST 2018
43 [grid@rac2 .ssh]$ ssh rac2 date
44 Fri Aug 17 13:39:28 CST 2018
45 [grid@rac2 .ssh]$ ssh rac2priv date
46 Fri Aug 17 13:39:33 CST 2018
原文地址:https://www.cnblogs.com/Roobbin/p/9492891.html