所有节点分发/etc/hosts,这里我添加两个节点,一个是上次删除的节点,另一个是什么都没有的节点,尝试添加

服务器介绍什么的都在这hosts文件了,大家自己琢磨下

[grid@node1 ~]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.194 node2
192.168.0.193 node1
192.168.0.196 node3
192.168.0.183 node1vip
192.168.0.182 node2vip
192.168.0.185 node3vip
172.168.0.196 node3prv
172.168.0.194 node2prv
172.168.0.193 node1prv
192.168.0.176 dbscan
192.168.0.16 standby

二,添加节点(一)---弃用方案

  01,验证节点通信

./runSSHSetup.sh -user grid -hosts "node1 node2" -advanced -noPromptPassphrase
./runSSHSetup.sh -user oracle -hosts "node1 node2" -advanced -noPromptPassphrase
  1 [oracle@node1 bin]$ pwd
  2 /oracle/app/oracle/product/11.2.0/db_1/oui/bin
  3 [oracle@node1 bin]$ ls
  4 addLangs.sh    detachHome.sh         filesList.sh  runConfig.sh     runSSHSetup.sh
  5 addNode.sh     filesList.bat         lsnodes       runInstaller
  6 attachHome.sh  filesList.properties  resource      runInstaller.sh
  7 [oracle@node1 bin]$ ./runSSHSetup.sh -user grid -hosts "node1 node2" -advanced -noPromptPassphrase
  8 This script will setup SSH Equivalence from the host 'node1' to specified remote hosts.
  9 
 10 ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1
 11 JAR_LOC = /oracle/app/oracle/product/11.2.0/db_1/oui/jlib
 12 SSH_LOC = /oracle/app/oracle/product/11.2.0/db_1/oui/jlib
 13 OUI_LOC = /oracle/app/oracle/product/11.2.0/db_1/oui
 14 JAVA_HOME = /oracle/app/oracle/product/11.2.0/db_1/jdk
 15 
 16 Checking if the remote hosts are reachable.
 17 ClusterLogger - log file location: /oracle/app/oracle/product/11.2.0/db_1/oui/bin/Logs/remoteInterfaces2019-03-14_04-52-46-PM.log
 18 Failed Nodes : node1 node2
 19 Remote host reachability check succeeded.
 20 All hosts are reachable. Proceeding further...
 21 
 22 
 23 NOTE :
 24 As part of the setup procedure, this script will use ssh and scp to copy
 25 files between the local host and the remote hosts. You may be prompted for
 26 the password during the execution of the script.
 27 AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY
 28 AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TO THESE
 29 directories.
 30 
 31 Do you want to continue and let the script make the above mentioned changes (yes/no)?
 32 yes
 33 
 34 If The files containing the client public and private keys already exist on the local host. The current private key may or may not have a passphrase associated with it. In case you remember the passphrase and do not want to re-run ssh-keygen, type 'no'. If youtype 'yes', the script will remove the old private/public key files and, any previous SSH user setups would be reset.
 35 Enter 'yes', 'no'
 36 yes
 37 
 38 Enter the password:
 39 Logfile Location : /oracle/app/oracle/product/11.2.0/db_1/oui/bin/SSHSetup2019-03-14_04-52-54-PM
 40 Checking binaries on remote hosts...
 41 Doing SSHSetup...
 42 Please be patient, this operation might take sometime...Dont press Ctrl+C...
 43 ClusterLogger - log file location: /oracle/app/oracle/product/11.2.0/db_1/oui/bin/Logs/remoteInterfaces2019-03-14_04-52-54-PM.log
 44 Plugin : oracle.sysman.prov.remoteinterfaces.plugins.RemoteCommandSSH found in class path
 45  Changing Default Plugin from  : oracle.sysman.prov.remoteinterfaces.plugins.RemoteCommandSSH to : oracle.sysman.prov.remoteinterfaces.plugins.RemoteCommandSSH
 46 
 47 
 48 Local Platform:- Linux
 49 
 50 ------------------------------------------------------------------------
 51 Verifying SSH setup
 52 ===================
 53 The script will now run the date command on the remote nodes using ssh
 54 to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,
 55 THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR
 56 PASSWORDS. If you see any output other than date or are prompted for the
 57 password, ssh is not setup correctly and you will need to resolve the
 58 issue and set up ssh again.
 59 The possible causes for failure could be:
 60 1. The server settings in /etc/ssh/sshd_config file do not allow ssh
 61 for user grid.
 62 2. The server may have disabled public key based authentication.
 63 3. The client public key on the server may be outdated.
 64 4. ~grid or ~grid/.ssh on the remote host may not be owned by grid.
 65 5. User may not have passed -shared option for shared remote users or
 66 may be passing the -shared option for non-shared remote users.
 67 6. If there is output in addition to the date, but no password is asked,
 68 it may be a security alert shown as part of company policy. Append the
 69 additional text to the <OMS HOME>/sysman/prov/resources/ignoreMessages.txt file.
 70 ------------------------------------------------------------------------
 71 --node1:--
 72 Running /usr/bin/ssh -x -l grid node1 date to verify SSH connectivity has been setup from local host to node1.
 73 IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
 74 grid@node1's password:
 75 Thu Mar 14 16:53:35 CST 2019
 76 ------------------------------------------------------------------------
 77 --node2:--
 78 Running /usr/bin/ssh -x -l grid node2 date to verify SSH connectivity has been setup from local host to node2.
 79 IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
 80 grid@node2's password:
 81 Thu Mar 14 16:53:38 CST 2019
 82 ------------------------------------------------------------------------
 83 ------------------------------------------------------------------------
 84 Verifying SSH connectivity has been setup from node1 to node1
 85 IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.
 86 grid@node1's password:
 87 bash: -c: line 0: unexpected EOF while looking for matching `"'
 88 bash: -c: line 1: syntax error: unexpected end of file
 89 ------------------------------------------------------------------------
 90 ------------------------------------------------------------------------
 91 Verifying SSH connectivity has been setup from node1 to node2
 92 IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.
 93 grid@node1's password:
 94 bash: -c: line 0: unexpected EOF while looking for matching `"'
 95 bash: -c: line 1: syntax error: unexpected end of file
 96 ------------------------------------------------------------------------
 97 -Verification from complete-
 98 SSH verification complete.
 99 [oracle@node1 bin]$ ./runSSHSetup.sh -user oracle -hosts "node1 node2" -advanced -noPromptPassphrase
100 This script will setup SSH Equivalence from the host 'node1' to specified remote hosts.
101 
102 ORACLE_HOME = /oracle/app/oracle/product/11.2.0/db_1
103 JAR_LOC = /oracle/app/oracle/product/11.2.0/db_1/oui/jlib
104 SSH_LOC = /oracle/app/oracle/product/11.2.0/db_1/oui/jlib
105 OUI_LOC = /oracle/app/oracle/product/11.2.0/db_1/oui
106 JAVA_HOME = /oracle/app/oracle/product/11.2.0/db_1/jdk
107 
108 Checking if the remote hosts are reachable.
109 ClusterLogger - log file location: /oracle/app/oracle/product/11.2.0/db_1/oui/bin/Logs/remoteInterfaces2019-03-14_04-54-22-PM.log
110 Failed Nodes : node1 node2
111 Remote host reachability check succeeded.
112 All hosts are reachable. Proceeding further...
113 
114 
115 NOTE :
116 As part of the setup procedure, this script will use ssh and scp to copy
117 files between the local host and the remote hosts. You may be prompted for
118 the password during the execution of the script.
119 AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY
120 AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TO THESE
121 directories.
122 
123 Do you want to continue and let the script make the above mentioned changes (yes/no)?
124 yes
125 
126 If The files containing the client public and private keys already exist on the local host. The current private key may or may not have a passphrase associated with it. In case you remember the passphrase and do not want to re-run ssh-keygen, type 'no'. If youtype 'yes', the script will remove the old private/public key files and, any previous SSH user setups would be reset.
127 Enter 'yes', 'no'
128 yes
129 
130 Enter the password:
131 Logfile Location : /oracle/app/oracle/product/11.2.0/db_1/oui/bin/SSHSetup2019-03-14_04-55-35-PM
132 Checking binaries on remote hosts...
133 Doing SSHSetup...
134 Please be patient, this operation might take sometime...Dont press Ctrl+C...
135 ClusterLogger - log file location: /oracle/app/oracle/product/11.2.0/db_1/oui/bin/Logs/remoteInterfaces2019-03-14_04-55-36-PM.log
136 Plugin : oracle.sysman.prov.remoteinterfaces.plugins.RemoteCommandSSH found in class path
137  Changing Default Plugin from  : oracle.sysman.prov.remoteinterfaces.plugins.RemoteCommandSSH to : oracle.sysman.prov.remoteinterfaces.plugins.RemoteCommandSSH
138 
139 Local Platform:- Linux
140 
141 ------------------------------------------------------------------------
142 Verifying SSH setup
143 ===================
144 The script will now run the date command on the remote nodes using ssh
145 to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,
146 THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR
147 PASSWORDS. If you see any output other than date or are prompted for the
148 password, ssh is not setup correctly and you will need to resolve the
149 issue and set up ssh again.
150 The possible causes for failure could be:
151 1. The server settings in /etc/ssh/sshd_config file do not allow ssh
152 for user oracle.
153 2. The server may have disabled public key based authentication.
154 3. The client public key on the server may be outdated.
155 4. ~oracle or ~oracle/.ssh on the remote host may not be owned by oracle.
156 5. User may not have passed -shared option for shared remote users or
157 may be passing the -shared option for non-shared remote users.
158 6. If there is output in addition to the date, but no password is asked,
159 it may be a security alert shown as part of company policy. Append the
160 additional text to the <OMS HOME>/sysman/prov/resources/ignoreMessages.txt file.
161 ------------------------------------------------------------------------
162 --node1:--
163 Running /usr/bin/ssh -x -l oracle node1 date to verify SSH connectivity has been setupfrom local host to node1.
164 IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
165 Thu Mar 14 16:56:14 CST 2019
166 ------------------------------------------------------------------------
167 --node2:--
168 Running /usr/bin/ssh -x -l oracle node2 date to verify SSH connectivity has been setupfrom local host to node2.
169 IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
170 Thu Mar 14 16:56:14 CST 2019
171 ------------------------------------------------------------------------
172 ------------------------------------------------------------------------
173 Verifying SSH connectivity has been setup from node1 to node1
174 IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.
175 bash: -c: line 0: unexpected EOF while looking for matching `"'
176 bash: -c: line 1: syntax error: unexpected end of file
177 ------------------------------------------------------------------------
178 ------------------------------------------------------------------------
179 Verifying SSH connectivity has been setup from node1 to node2
180 IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL.
181 bash: -c: line 0: unexpected EOF while looking for matching `"'
182 bash: -c: line 1: syntax error: unexpected end of file
183 ------------------------------------------------------------------------
184 -Verification from complete-
185 SSH verification complete.
186 [oracle@node1 bin]$
View Code

相关文章: