centos 6.7下靜默安裝oracle 11.2.0.4 RAC的簡單介紹

lsq_008發表於2016-03-03
由於伺服器上沒有安裝圖形介面,在安裝RAC時,不得不使用靜默安裝的方式,之前一直都是圖形化安裝,參照http://www.luocs.com/archives/306.html上寫的步驟折騰了一天,終於搞定了,大致過程如下:

--環境準備(軟體包安裝、建立oracle、grid使用者及相關組、網路、儲存、ssh互信等)


與圖形化安裝一致,具體請參考相關文件

---grid安裝響應檔案
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v11_2_0    
ORACLE_HOSTNAME=pointdb1
INVENTORY_LOCATION=/home/db/oraInventory                                                          
SELECTED_LANGUAGES=en                                                                             
oracle.install.option=CRS_CONFIG                                                                  
ORACLE_BASE=/home/db/grid/base                                                                    
ORACLE_HOME=/home/db/grid/product/11.2.0                                                              
oracle.install.asm.OSDBA=asmdba                                                                   
oracle.install.asm.OSOPER=asmoper                                                                 
oracle.install.asm.OSASM=asmadmin                                                                 
oracle.install.crs.config.gpnp.scanName=pointdb-scan                                            
oracle.install.crs.config.gpnp.scanPort=1521                                                      
oracle.install.crs.config.clusterName=pointdb-cluster                                                 
oracle.install.crs.config.gpnp.configureGNS=false                                                 
oracle.install.crs.config.gpnp.gnsSubDomain=                                                      
oracle.install.crs.config.gpnp.gnsVIPAddress=                                                     
oracle.install.crs.config.autoConfigureClusterNodeVIP=false                                       
oracle.install.crs.config.clusterNodes=pointdb1:pointdb1-vip,pointdb2:pointdb2-vip                                
oracle.install.crs.config.networkInterfaceList=bond1:192.168.78.0:1,bond0:192.168.81.0:2            
oracle.install.crs.config.storageOption=ASM_STORAGE                                               
oracle.install.crs.config.sharedFileSystemStorage.diskDriveMapping=                               
oracle.install.crs.config.sharedFileSystemStorage.votingDiskLocations=                            
oracle.install.crs.config.sharedFileSystemStorage.votingDiskRedundancy=                           
oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=                                   
oracle.install.crs.config.sharedFileSystemStorage.ocrRedundancy=                                  
oracle.install.crs.config.useIPMI=false                                                           
oracle.install.crs.config.ipmi.bmcUsername=                                                       
oracle.install.crs.config.ipmi.bmcPassword=                                                       
oracle.install.asm.SYSASMPassword=password                                                  
oracle.install.asm.diskGroup.name=SYS                                                             
oracle.install.asm.diskGroup.redundancy=EXTERNAL                                                  
oracle.install.asm.diskGroup.AUSize=4                                                             
oracle.install.asm.diskGroup.disks=/dev/mapper/ocr01,/dev/mapper/ocr02,/dev/mapper/ocr03
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/mapper/*                           
oracle.install.asm.monitorPassword=password                                                   
oracle.install.crs.upgrade.clusterNodes=                                                          
oracle.install.asm.upgradeASM=false                                                               
oracle.installer.autoupdates.option=SKIP_UPDATES                                                  
oracle.installer.autoupdates.downloadUpdatesLoc=                                                  
AUTOUPDATES_MYORACLESUPPORT_USERNAME=                                                             
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=                                                             
PROXY_HOST=                                                                                       
PROXY_PORT=0                                                                                      
PROXY_USER=                                                                                       
PROXY_PWD=                                                                                        
PROXY_REALM=       

----檢查環境
su - grid
./runcluvfy.sh stage -pre crsinst -n pointdb1,pointdb2 -verbose

-----執行安裝
su - grid
./runInstaller -ignorePrereq -silent -force -responseFile /tmp/gi.rsp    

----安裝後執行完root指令碼後,需要執行configToolAllCommands
/home/db/grid/product/11.2.0/cfgtoollogs/configToolAllCommands RESPONSE_FILE=./cfgrsp.properties

grid@pointdb1:/home/db/grid/product/11.2.0/cfgtoollogs$ cat cfgrsp.properties
oracle.assistants.asm|S_ASMPASSWORD=password
oracle.assistants.asm|S_ASMMONITORPASSWORD=password

--安裝oracle軟體
./runInstaller -ignorePrereq -silent -force -responseFile /tmp/db_install.rsp

---db_install.rsp內容
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=pointdb1
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/home/db/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/home/db/oracle/product/11.2.0
ORACLE_BASE=/home/db/oracle
oracle.install.db.InstallEdition=
oracle.install.db.EEOptionsSelection=false
oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=
oracle.install.db.CLUSTER_NODES=pointdb1,pointdb2
oracle.install.db.isRACOneInstall=
oracle.install.db.racOneServiceName=
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=pointdb
oracle.install.db.config.starterdb.SID=pointdb
oracle.install.db.config.starterdb.characterSet=ZHS16GBK
oracle.install.db.config.starterdb.memoryOption=true
oracle.install.db.config.starterdb.memoryLimit=700
oracle.install.db.config.starterdb.installExampleSchemas=true
oracle.install.db.config.starterdb.enableSecuritySettings=false
oracle.install.db.config.starterdb.password.ALL=password
oracle.install.db.config.starterdb.password.SYS=
oracle.install.db.config.starterdb.password.SYSTEM=
oracle.install.db.config.starterdb.password.SYSMAN=
oracle.install.db.config.starterdb.password.DBSNMP=
oracle.install.db.config.starterdb.control=DB_CONTROL
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
oracle.install.db.config.starterdb.automatedBackup.enable=false
oracle.install.db.config.starterdb.automatedBackup.osuid=
oracle.install.db.config.starterdb.automatedBackup.ospwd=
oracle.install.db.config.starterdb.storageType=ASM_STORAGE
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
oracle.install.db.config.asm.diskGroup=DATA
oracle.install.db.config.asm.ASMSNMPPassword=password
MYORACLESUPPORT_USERNAME=
MYORACLESUPPORT_PASSWORD=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
PROXY_REALM=
COLLECTOR_SUPPORTHUB_URL=
oracle.installer.autoupdates.option=SKIP_UPDATES
oracle.installer.autoupdates.downloadUpdatesLoc=
AUTOUPDATES_MYORACLESUPPORT_USERNAME=
AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
          
----安裝完畢後,打PSU補丁,先打grid,再打database,這個根據補丁裡的文件來就行了。注意需要使用比較新的opatch

----建立DATA磁碟組
su - grid
sqlplus / as sysasm
create diskgroup DATA external redundancy disk '/dev/mapper/data01'

---建庫
dbca -silent -createDatabase -templateName General_Purpose.dbc  -gdbName pointdb -sid pointdb -sysPassword password -systemPassword  password -storageType ASM -diskGroupName DATA -datafileJarLocation $ORACLE_HOME/assistants/dbca/templates -nodeinfo pointdb1,pointdb2 -characterset ZHS16GBK -obfuscatedPasswords false -sampleSchema false -asmSysPassword password

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10972173/viewspace-2027287/,如需轉載,請註明出處,否則將追究法律責任。

相關文章