一,节点环境
所有节点分发/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]$
02,运行命令
在 grid用户下执行 ./addNode.sh "CLUSTER_NEW_NODES={node2}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={node2vip}" "CLUSTER_NEW_PRIVATE_NODE_NAMES={node2prv}"
1 [grid@node1 bin]$ ./addNode.sh "CLUSTER_NEW_NODES={node2}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={node2vip}" "CLUSTER_NEW_PRIVATE_NODE_NAMES={node2prv}" 2 3 Performing pre-checks for node addition 4 5 Checking node reachability... 6 Node reachability check passed from node "node1" 7 8 9 Checking user equivalence... 10 User equivalence check passed for user "grid" 11 12 WARNING: 13 Node "node2" already appears to be part of cluster 14 15 Pre-check for node addition was successful. 16 Starting Oracle Universal Installer... 17 18 Checking swap space: must be greater than 500 MB. Actual 1948 MB Passed 19 Oracle Universal Installer, Version 11.2.0.4.0 Production 20 Copyright (C) 1999, 2013, Oracle. All rights reserved. 21 22 23 Performing tests to see whether nodes node2 are available 24 ............................................................... 100% Done. 25 26 . 27 ----------------------------------------------------------------------------- 28 Cluster Node Addition Summary 29 Global Settings 30 Source: /oracle/app/oracle/product/11.2.0/db_1 31 New Nodes 32 Space Requirements 33 New Nodes 34 node2 35 /: Required 4.49GB : Available 32.27GB 36 Installed Products 37 Product Names 38 Oracle Database 11g 11.2.0.4.0 39 Java Development Kit 1.5.0.51.10 40 Installer SDK Component 11.2.0.4.0 41 Oracle One-Off Patch Installer 11.2.0.3.4 42 Oracle Universal Installer 11.2.0.4.0 43 Oracle USM Deconfiguration 11.2.0.4.0 44 Oracle Configuration Manager Deconfiguration 10.3.1.0.0 45 Oracle DBCA Deconfiguration 11.2.0.4.0 46 Oracle RAC Deconfiguration 11.2.0.4.0 47 Oracle Database Deconfiguration 11.2.0.4.0 48 Oracle Configuration Manager Client 10.3.2.1.0 49 Oracle Configuration Manager 10.3.8.1.0 50 Oracle ODBC Driverfor Instant Client 11.2.0.4.0 51 LDAP Required Support Files 11.2.0.4.0 52 SSL Required Support Files for InstantClient 11.2.0.4.0 53 Bali Share 1.1.18.0.0 54 Oracle Extended Windowing Toolkit 3.4.47.0.0 55 Oracle JFC Extended Windowing Toolkit 4.2.36.0.0 56 Oracle Real Application Testing 11.2.0.4.0 57 Oracle Database Vault J2EE Application 11.2.0.4.0 58 Oracle Label Security 11.2.0.4.0 59 Oracle Data Mining RDBMS Files 11.2.0.4.0 60 Oracle OLAP RDBMS Files 11.2.0.4.0 61 Oracle OLAP API 11.2.0.4.0 62 Platform Required Support Files 11.2.0.4.0 63 Oracle Database Vault option 11.2.0.4.0 64 Oracle RAC Required Support Files-HAS 11.2.0.4.0 65 SQL*Plus Required Support Files 11.2.0.4.0 66 Oracle Display Fonts 9.0.2.0.0 67 Oracle Ice Browser 5.2.3.6.0 68 Oracle JDBC Server Support Package 11.2.0.4.0 69 Oracle SQL Developer 11.2.0.4.0 70 Oracle Application Express 11.2.0.4.0 71 XDK Required Support Files 11.2.0.4.0 72 RDBMS Required Support Files for Instant Client 11.2.0.4.0 73 SQLJ Runtime 11.2.0.4.0 74 Database Workspace Manager 11.2.0.4.0 75 RDBMS Required Support Files Runtime 11.2.0.4.0 76 Oracle Globalization Support 11.2.0.4.0 77 Exadata Storage Server 11.2.0.1.0 78 Provisioning Advisor Framework 10.2.0.4.3 79 Enterprise Manager Database Plugin -- Repository Support 11.2.0.4.0 80 Enterprise Manager Repository Core Files 10.2.0.4.5 81 Enterprise Manager Database Plugin -- Agent Support 11.2.0.4.0 82 Enterprise Manager Grid Control Core Files 10.2.0.4.5 83 Enterprise Manager Common Core Files 10.2.0.4.5 84 Enterprise Manager Agent Core Files 10.2.0.4.5 85 RDBMS Required Support Files 11.2.0.4.0 86 regexp 2.1.9.0.0 87 Agent Required Support Files 10.2.0.4.5 88 Oracle 11g Warehouse Builder Required Files 11.2.0.4.0 89 Oracle Notification Service (eONS) 11.2.0.4.0 90 Oracle Text Required Support Files 11.2.0.4.0 91 Parser Generator Required Support Files 11.2.0.4.0 92 Oracle Database 11g Multimedia Files 11.2.0.4.0 93 Oracle Multimedia Java Advanced Imaging 11.2.0.4.0 94 Oracle Multimedia Annotator 11.2.0.4.0 95 Oracle JDBC/OCI Instant Client 11.2.0.4.0 96 Oracle Multimedia Locator RDBMS Files 11.2.0.4.0 97 Precompiler Required Support Files 11.2.0.4.0 98 Oracle Core Required Support Files 11.2.0.4.0 99 Sample Schema Data 11.2.0.4.0 100 Oracle Starter Database 11.2.0.4.0 101 Oracle Message Gateway Common Files 11.2.0.4.0 102 Oracle XML Query 11.2.0.4.0 103 XML Parser for Oracle JVM 11.2.0.4.0 104 Oracle Help For Java 4.2.9.0.0 105 Installation Plugin Files 11.2.0.4.0 106 Enterprise Manager Common Files 10.2.0.4.5 107 Expat libraries 2.0.1.0.1 108 Deinstallation Tool 11.2.0.4.0 109 Oracle Quality of Service Management (Client) 11.2.0.4.0 110 Perl Modules 5.10.0.0.1 111 JAccelerator (COMPANION) 11.2.0.4.0 112 Oracle Containers for Java 11.2.0.4.0 113 Perl Interpreter 5.10.0.0.2 114 Oracle Net Required Support Files 11.2.0.4.0 115 Secure Socket Layer 11.2.0.4.0 116 Oracle Universal Connection Pool 11.2.0.4.0 117 Oracle JDBC/THIN Interfaces 11.2.0.4.0 118 Oracle Multimedia Client Option 11.2.0.4.0 119 Oracle Java Client 11.2.0.4.0 120 Character Set Migration Utility 11.2.0.4.0 121 Oracle Code Editor 1.2.1.0.0I 122 PL/SQL Embedded Gateway 11.2.0.4.0 123 OLAP SQL Scripts 11.2.0.4.0 124 Database SQL Scripts 11.2.0.4.0 125 Oracle Locale Builder 11.2.0.4.0 126 Oracle Globalization Support 11.2.0.4.0 127 SQL*Plus Files for Instant Client 11.2.0.4.0 128 Required Support Files 11.2.0.4.0 129 Oracle Database User Interface 2.2.13.0.0 130 Oracle ODBC Driver 11.2.0.4.0 131 Oracle Notification Service 11.2.0.3.0 132 XML Parser for Java 11.2.0.4.0 133 Oracle Security Developer Tools 11.2.0.4.0 134 Oracle Wallet Manager 11.2.0.4.0 135 Cluster Verification Utility Common Files 11.2.0.4.0 136 Oracle Clusterware RDBMS Files 11.2.0.4.0 137 Oracle UIX 2.2.24.6.0 138 Enterprise Manager plugin Common Files 11.2.0.4.0 139 HAS Common Files 11.2.0.4.0 140 Precompiler Common Files 11.2.0.4.0 141 Installation Common Files 11.2.0.4.0 142 Oracle Help for the Web 2.0.14.0.0 143 Oracle LDAP administration 11.2.0.4.0 144 Buildtools Common Files 11.2.0.4.0 145 Assistant Common Files 11.2.0.4.0 146 Oracle Recovery Manager 11.2.0.4.0 147 PL/SQL 11.2.0.4.0 148 Generic Connectivity Common Files 11.2.0.4.0 149 Oracle Database Gateway for ODBC 11.2.0.4.0 150 Oracle Programmer 11.2.0.4.0 151 Oracle Database Utilities 11.2.0.4.0 152 Enterprise Manager Agent 10.2.0.4.5 153 SQL*Plus 11.2.0.4.0 154 Oracle Netca Client 11.2.0.4.0 155 Oracle Multimedia Locator 11.2.0.4.0 156 Oracle Call Interface (OCI) 11.2.0.4.0 157 Oracle Multimedia 11.2.0.4.0 158 Oracle Net 11.2.0.4.0 159 Oracle XML Development Kit 11.2.0.4.0 160 Oracle Internet Directory Client 11.2.0.4.0 161 Database Configuration and Upgrade Assistants 11.2.0.4.0 162 Oracle JVM 11.2.0.4.0 163 Oracle Advanced Security 11.2.0.4.0 164 Oracle Net Listener 11.2.0.4.0 165 Oracle Enterprise Manager Console DB 11.2.0.4.0 166 HAS Files for DB 11.2.0.4.0 167 Oracle Text 11.2.0.4.0 168 Oracle Net Services 11.2.0.4.0 169 Oracle Database 11g 11.2.0.4.0 170 Oracle OLAP 11.2.0.4.0 171 Oracle Spatial 11.2.0.4.0 172 Oracle Partitioning 11.2.0.4.0 173 Enterprise Edition Options 11.2.0.4.0 174 ----------------------------------------------------------------------------- 175 176 177 Instantiating scripts for add node (Thursday, March 14, 2019 5:02:43 PM CST) 178 . 1% Done. 179 Instantiation of add node scripts complete 180 SEVERE:Abnormal program termination. An internal error has occured. Please provide thefollowing files to Oracle Support : 181 182 "/oracle/app/oraInventory/logs/addNodeActions2019-03-14_05-02-33PM.log" 183 "/oracle/app/oraInventory/logs/oraInstall2019-03-14_05-02-33PM.err" 184 "/oracle/app/oraInventory/logs/oraInstall2019-03-14_05-02-33PM.out" 185 [grid@node1 bin]$