所有节点分发/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]$
新节点配置--->>节点配置前请看往期RAC基础配置,一些基础环境需要先配置好,共享磁盘也需要完成
01,配置互信
node3(新节点)--oracle用户: su - oracle mkdir ~/.ssh ssh-keygen -t rsa ssh-keygen -t dsa 在存活的节点操作: su - oracle ssh node3 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys ssh node3 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys scp ~/.ssh/authorized_keys node3:~/.ssh/authorized_keys node3(新节点)--grid用户: su - grid mkdir ~/.ssh ssh-keygen -t rsa ssh-keygen -t dsa 在存活的节点操作: su - grid ssh node3 cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys ssh node3 cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys scp ~/.ssh/authorized_keys node3:~/.ssh/authorized_keys
02,验证节点是否符合要求
在存活节点操作
1 [grid@node1 ~]$ cluvfy stage -pre nodeadd -n node3 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 Unable to obtain VIP information from node "node1". 14 15 16 Checking CRS integrity... 17 18 Clusterware version consistency passed 19 20 CRS integrity check passed 21 22 Checking shared resources... 23 24 Checking CRS home location... 25 "/oracle/11.2.0/grid/crs" is shared 26 Shared resources check for node addition passed 27 28 29 Checking node connectivity... 30 31 Checking hosts config file... 32 33 Verification of the hosts config file successful 34 35 Check: Node connectivity for interface "eth0" 36 Node connectivity passed for interface "eth0" 37 TCP connectivity check passed for subnet "192.168.0.0" 38 39 40 Check: Node connectivity for interface "eth1" 41 Node connectivity passed for interface "eth1" 42 TCP connectivity check passed for subnet "172.168.0.0" 43 44 Checking subnet mask consistency... 45 Subnet mask consistency check passed for subnet "192.168.0.0". 46 Subnet mask consistency check passed for subnet "172.168.0.0". 47 Subnet mask consistency check passed. 48 49 Node connectivity check passed 50 51 Checking multicast communication... 52 53 Checking subnet "192.168.0.0" for multicast communication with multicast group "230.0.1.0"... 54 Check of subnet "192.168.0.0" for multicast communication with multicast group "230.0.1.0" passed. 55 56 Checking subnet "172.168.0.0" for multicast communication with multicast group "230.0.1.0"... 57 Check of subnet "172.168.0.0" for multicast communication with multicast group "230.0.1.0" passed. 58 59 Check of multicast communication passed. 60 Total memory check passed 61 Available memory check passed 62 Swap space check failed 63 Check failed on nodes: 64 node3,node1 65 Free disk space check passed for "node3:/oracle/11.2.0/grid/crs,node3:/tmp" 66 Free disk space check passed for "node1:/oracle/11.2.0/grid/crs,node1:/tmp" 67 Check for multiple users with UID value 501 passed 68 User existence check passed for "grid" 69 Run level check passed 70 Hard limits check passed for "maximum open file descriptors" 71 Soft limits check passed for "maximum open file descriptors" 72 Hard limits check passed for "maximum user processes" 73 Soft limits check passed for "maximum user processes" 74 System architecture check passed 75 76 WARNING: 77 PRVF-7524 : Kernel version is not consistent across all the nodes. 78 Kernel version = "3.10.0-693.el7.x86_64" found on nodes: node3. 79 Kernel version = "2.6.32-754.11.1.el6.x86_64" found on nodes: node1. 80 Kernel version check passed 81 Kernel parameter check passed for "semmsl" 82 Kernel parameter check passed for "semmns" 83 Kernel parameter check passed for "semopm" 84 Kernel parameter check passed for "semmni" 85 Kernel parameter check passed for "shmmax" 86 Kernel parameter check passed for "shmmni" 87 Kernel parameter check passed for "shmall" 88 Kernel parameter check failed for "file-max" 89 Check failed on nodes: 90 node3 91 Kernel parameter check passed for "ip_local_port_range" 92 Kernel parameter check passed for "rmem_default" 93 Kernel parameter check passed for "rmem_max" 94 Kernel parameter check passed for "wmem_default" 95 Kernel parameter check passed for "wmem_max" 96 Kernel parameter check failed for "aio-max-nr" 97 Check failed on nodes: 98 node3 99 Package existence check passed for "make" 100 Package existence check passed for "binutils" 101 Package existence check passed for "gcc(x86_64)" 102 Package existence check passed for "libaio(x86_64)" 103 Package existence check passed for "glibc(x86_64)" 104 Package existence check passed for "compat-libstdc++-33(x86_64)" 105 Package existence check passed for "elfutils-libelf(x86_64)" 106 Package existence check passed for "elfutils-libelf-devel" 107 Package existence check passed for "glibc-common" 108 Package existence check passed for "glibc-devel(x86_64)" 109 Package existence check passed for "glibc-headers" 110 Package existence check passed for "gcc-c++(x86_64)" 111 Package existence check passed for "libaio-devel(x86_64)" 112 Package existence check passed for "libgcc(x86_64)" 113 Package existence check passed for "libstdc++(x86_64)" 114 Package existence check passed for "libstdc++-devel(x86_64)" 115 Package existence check passed for "sysstat" 116 Package existence check failed for "pdksh" 117 Check failed on nodes: 118 node3,node1 119 Package existence check passed for "expat(x86_64)" 120 Check for multiple users with UID value 0 passed 121 Current group ID check passed 122 123 Starting check for consistency of primary group of root user 124 125 Check for consistency of root user's primary group passed 126 127 Checking OCR integrity... 128 129 OCR integrity check passed 130 131 Checking Oracle Cluster Voting Disk configuration... 132 133 Oracle Cluster Voting Disk configuration check passed 134 Time zone consistency check passed 135 136 Starting Clock synchronization checks using Network Time Protocol(NTP)... 137 138 NTP Configuration file check started... 139 No NTP Daemons or Services were found to be running 140 141 Clock synchronization check using Network Time Protocol(NTP) passed 142 143 144 User "grid" is not part of "root" group. Check passed 145 Checking consistency of file "/etc/resolv.conf" across nodes 146 147 File "/etc/resolv.conf" does not have both domain and search entries defined 148 domain entry in file "/etc/resolv.conf" is consistent across nodes 149 search entry in file "/etc/resolv.conf" is consistent across nodes 150 The DNS response time for an unreachable node is within acceptable limit on all nodes 151 152 File "/etc/resolv.conf" is consistent across nodes 153 154 155 Checking integrity of name service switch configuration file "/etc/nsswitch.conf" ... 156 Check for integrity of name service switch configuration file "/etc/nsswitch.conf" passed 157 158 159 Pre-check for node addition was unsuccessful on all the nodes.
03,添加节点
[grid@node1 ~]$ cd /oracle/11.2.0/grid/crs/oui/bin/
[grid@node1 bin]$ pwd
/oracle/11.2.0/grid/crs/oui/bin
[grid@node1 bin]$ ./addNode.sh "CLUSTER_NEW_NODES={node3}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={node3vip}" "CLUSTER_NEW_PRIVATE_NODE_NAMES={node3prv}" Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 1999 MB Passed Oracle Universal Installer, Version 11.2.0.4.0 Production Copyright (C) 1999, 2013, Oracle. All rights reserved. Performing tests to see whether nodes node2,node3 are available ............................................................... 100% Done. Error ocurred while retrieving node numbers of the existing nodes. Please check if clusterware home is properly configured. SEVERE:Error ocurred while retrieving node numbers of the existing nodes. Please check if clusterware home is properly configured.
好像都会出现这个问题
官方解释是需要执行
[grid@node1 bin]$ ./detachHome.sh ---这个在图形界面执行不要用xshell等连接工具 Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 1999 MB Passed The inventory pointer is located at /etc/oraInst.loc The inventory is located at /oracle/app/oraInventory Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable. localhost:10.0 localhost:10.0 'DetachHome' failed.
[grid@node1 bin]$ ./attachHome.sh ---图形界面执行
节点更新
[grid@node1 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES={node1}" CRS=TRUE Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 1999 MB Passed The inventory pointer is located at /etc/oraInst.loc The inventory is located at /oracle/app/oraInventory 'UpdateNodeList' was successful.
继续执行添加节点
[grid@node1 bin]$ ./addNode.sh "CLUSTER_NEW_NODES={node3}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={node3vip}" "CLUSTER_NEW_PRIVATE_NODE_NAMES={node3priv}" Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 1999 MB Passed Oracle Universal Installer, Version 11.2.0.4.0 Production Copyright (C) 1999, 2013, Oracle. All rights reserved. Performing tests to see whether nodes node3 are available ............................................................... 100% Done. . ----------------------------------------------------------------------------- Cluster Node Addition Summary Global Settings Source: /oracle/11.2.0/grid/crs New Nodes Space Requirements New Nodes node3 /: Required 5.29GB : Available 41.26GB Installed Products Product Names Oracle Grid Infrastructure 11g 11.2.0.4.0 Java Development Kit 1.5.0.51.10 Installer SDK Component 11.2.0.4.0 Oracle One-Off Patch Installer 11.2.0.3.4 Oracle Universal Installer 11.2.0.4.0 Oracle RAC Required Support Files-HAS 11.2.0.4.0 Oracle USM Deconfiguration 11.2.0.4.0 Oracle Configuration Manager Deconfiguration 10.3.1.0.0 Enterprise Manager Common Core Files 10.2.0.4.5 Oracle DBCA Deconfiguration 11.2.0.4.0 Oracle RAC Deconfiguration 11.2.0.4.0 Oracle Quality of Service Management (Server) 11.2.0.4.0 Installation Plugin Files 11.2.0.4.0 Universal Storage Manager Files 11.2.0.4.0 Oracle Text Required Support Files 11.2.0.4.0 Automatic Storage Management Assistant 11.2.0.4.0 Oracle Database 11g Multimedia Files 11.2.0.4.0 Oracle Multimedia Java Advanced Imaging 11.2.0.4.0 Oracle Globalization Support 11.2.0.4.0 Oracle Multimedia Locator RDBMS Files 11.2.0.4.0 Oracle Core Required Support Files 11.2.0.4.0 Bali Share 1.1.18.0.0 Oracle Database Deconfiguration 11.2.0.4.0 Oracle Quality of Service Management (Client) 11.2.0.4.0 Expat libraries 2.0.1.0.1 Oracle Containers for Java 11.2.0.4.0 Perl Modules 5.10.0.0.1 Secure Socket Layer 11.2.0.4.0 Oracle JDBC/OCI Instant Client 11.2.0.4.0 Oracle Multimedia Client Option 11.2.0.4.0 LDAP Required Support Files 11.2.0.4.0 Character Set Migration Utility 11.2.0.4.0 Perl Interpreter 5.10.0.0.2 PL/SQL Embedded Gateway 11.2.0.4.0 OLAP SQL Scripts 11.2.0.4.0 Database SQL Scripts 11.2.0.4.0 Oracle Extended Windowing Toolkit 3.4.47.0.0 SSL Required Support Files for InstantClient 11.2.0.4.0 SQL*Plus Files for Instant Client 11.2.0.4.0 Oracle Net Required Support Files 11.2.0.4.0 Oracle Database User Interface 2.2.13.0.0 RDBMS Required Support Files for Instant Client 11.2.0.4.0 RDBMS Required Support Files Runtime 11.2.0.4.0 XML Parser for Java 11.2.0.4.0 Oracle Security Developer Tools 11.2.0.4.0 Oracle Wallet Manager 11.2.0.4.0 Enterprise Manager plugin Common Files 11.2.0.4.0 Platform Required Support Files 11.2.0.4.0 Oracle JFC Extended Windowing Toolkit 4.2.36.0.0 RDBMS Required Support Files 11.2.0.4.0 Oracle Ice Browser 5.2.3.6.0 Oracle Help For Java 4.2.9.0.0 Enterprise Manager Common Files 10.2.0.4.5 Deinstallation Tool 11.2.0.4.0 Oracle Java Client 11.2.0.4.0 Cluster Verification Utility Files 11.2.0.4.0 Oracle Notification Service (eONS) 11.2.0.4.0 Oracle LDAP administration 11.2.0.4.0 Cluster Verification Utility Common Files 11.2.0.4.0 Oracle Clusterware RDBMS Files 11.2.0.4.0 Oracle Locale Builder 11.2.0.4.0 Oracle Globalization Support 11.2.0.4.0 Buildtools Common Files 11.2.0.4.0 HAS Common Files 11.2.0.4.0 SQL*Plus Required Support Files 11.2.0.4.0 XDK Required Support Files 11.2.0.4.0 Agent Required Support Files 10.2.0.4.5 Parser Generator Required Support Files 11.2.0.4.0 Precompiler Required Support Files 11.2.0.4.0 Installation Common Files 11.2.0.4.0 Required Support Files 11.2.0.4.0 Oracle JDBC/THIN Interfaces 11.2.0.4.0 Oracle Multimedia Locator 11.2.0.4.0 Oracle Multimedia 11.2.0.4.0 Assistant Common Files 11.2.0.4.0 Oracle Net 11.2.0.4.0 PL/SQL 11.2.0.4.0 HAS Files for DB 11.2.0.4.0 Oracle Recovery Manager 11.2.0.4.0 Oracle Database Utilities 11.2.0.4.0 Oracle Notification Service 11.2.0.3.0 SQL*Plus 11.2.0.4.0 Oracle Netca Client 11.2.0.4.0 Oracle Advanced Security 11.2.0.4.0 Oracle JVM 11.2.0.4.0 Oracle Internet Directory Client 11.2.0.4.0 Oracle Net Listener 11.2.0.4.0 Cluster Ready Services Files 11.2.0.4.0 Oracle Database 11g 11.2.0.4.0 ----------------------------------------------------------------------------- Instantiating scripts for add node (Friday, March 15, 2019 10:20:16 AM CST) . 1% Done. Instantiation of add node scripts complete Copying to remote nodes (Friday, March 15, 2019 10:20:20 AM CST) ............................................................................................... 96% Done. Home copied to new nodes Saving inventory on nodes (Friday, March 15, 2019 10:22:44 AM CST) . 100% Done. Save inventory complete WARNING:A new inventory has been created on one or more nodes in this session. However, it has not yet been registered as the central inventory of this system. To register the new inventory please run the script at '/oracle/app/oraInventory/orainstRoot.sh' with root privileges on nodes'node3'. If you do not register the inventory, you may not be able to update or patch the products you installed. The following configuration scripts need to be executed as the "root" user in each new cluster node. Each script in the list below is followed by a list of nodes. /oracle/app/oraInventory/orainstRoot.sh #On nodes node3 /oracle/11.2.0/grid/crs/root.sh #On nodes node3 To execute the configuration scripts: 1. Open a terminal window 2. Log in as "root" 3. Run the scripts in each cluster node The Cluster Node Addition of /oracle/11.2.0/grid/crs was successful. Please check '/tmp/silentInstall.log' for more details.
根据命令在node3节点执行脚本,需要用root执行
脚本一:
[grid@node3 ~]$ cd /oracle/app/oraInventory/ [grid@node3 oraInventory]$ ls backup ContentsXML logs orainstRoot.sh [grid@node3 oraInventory]$ su Password: [root@node3 oraInventory]# sh orainstRoot.sh Creating the Oracle inventory pointer file (/etc/oraInst.loc) Changing permissions of /oracle/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /oracle/app/oraInventory to oinstall. The execution of the script is complete.
脚本二:
1 [root@node3 oraInventory]# cd /oracle/11.2.0/grid/crs/ 2 [root@node3 crs]# ls 3 assistants csmig deinstall gnsd inventory ldap nls oracore perl root.sh suptools 4 auth css demo gpnp javavm lib oc4j oraInst.loc plsql rootupgrade.sh sysman 5 bin ctss diagnostics has jdbc md ohasd ord precomp scheduler usm 6 cfgtoollogs cv eons hs jdk mdns ologgerd osysmond racg slax utl 7 clone dbs evm install jlib mesg OPatch oui rdbms sqlplus wwg 8 crs dc_ocm gipc instantclient JRE network opmn owm relnotes srvm xdk 9 [root@node3 crs]# sh root.sh 10 Performing root user operation for Oracle 11g 11 12 The following environment variables are set as: 13 ORACLE_OWNER= grid 14 ORACLE_HOME= /oracle/11.2.0/grid/crs 15 16 Enter the full pathname of the local bin directory: [/usr/local/bin]: 17 Copying dbhome to /usr/local/bin ... 18 Copying oraenv to /usr/local/bin ... 19 Copying coraenv to /usr/local/bin ... 20 21 22 Creating /etc/oratab file... 23 Entries will be added to the /etc/oratab file as needed by 24 Database Configuration Assistant when a database is created 25 Finished running generic part of root script. 26 Now product-specific root actions will be performed. 27 Using configuration parameter file: /oracle/11.2.0/grid/crs/crs/install/crsconfig_params 28 Creating trace directory 29 User ignored Prerequisites during installation 30 Installing Trace File Analyzer 31 OLR initialization - successful 32 Adding Clusterware entries to inittab 33 ohasd failed to start 34 Failed to start the Clusterware. Last 20 lines of the alert log follow: 35 2019-03-14 22:27:03.400: