时间:2021-07-01 10:21:17 帮助过:4人阅读
安装之前使用脚本进行校验,确保所有的failed选项都可以忽略。
./runcluvfy.sh stage -pre crsinst -n raclhr-12cR1-N1,raclhr-12cR1-N2 -fixup -verbose |
在2个节点上新建/etc/oraInst.loc,文件中的内容如下:
inventory_loc=/u01/app/oraInventory inst_group=oinstall |
输入下面的命令在oraInst.loc文件上设置合适的拥有者,组和权限:
chown oracle:oinstall /etc/oraInst.loc chmod 664 /etc/oraInst.loc |
1、/u01/app/oraInventory必须为空
ls -l /u01/app/oraInventory/* rm -rf /u01/app/oraInventory/* |
否则报错:
[FATAL] [INS-32035] Unable to create a new central inventory directory : /u01/app/oraInventory. CAUSE: The central inventory location provided is not empty. ACTION: Please provide another location for the inventory, or clean up the current location. |
2、INS-32040
[FATAL] [INS-32040] The central inventory location provided is not empty on remote nodes [raclhr-12cr1-n1]. ACTION: Please provide another location for the inventory, or clean up the current location.
|
解决办法:
新建/etc/oraInst.loc,文件中的内容如下:
inventory_loc=/u01/app/oraInventory inst_group=oinstall |
输入下面的命令在oraInst.loc文件上设置合适的拥有者,组和权限:
chown oracle:oinstall /etc/oraInst.loc chmod 664 /etc/oraInst.loc |
静默脚本:
./runInstaller -silent -force -noconfig -IgnoreSysPreReqs -ignorePrereq -showProgress \ INVENTORY_LOCATION=/u01/app/oraInventory \ SELECTED_LANGUAGES=en \ ORACLE_BASE=/u01/app/grid \ ORACLE_HOME=/u01/app/12.1.0/grid \ oracle.install.asm.OSDBA=asmdba \ oracle.install.asm.OSOPER=asmoper \ oracle.install.asm.OSASM=asmadmin \ oracle.install.crs.config.storageOption=ASM_STORAGE \ oracle.install.crs.config.sharedFileSystemStorage.votingDiskRedundancy=EXTERNAL \ oracle.install.crs.config.sharedFileSystemStorage.ocrRedundancy=EXTERNAL \ oracle.install.crs.config.useIPMI=false \ oracle.install.asm.diskGroup.name=OCR \ oracle.install.asm.diskGroup.redundancy=EXTERNAL \ oracle.installer.autoupdates.option=SKIP_UPDATES \ oracle.install.crs.config.gpnp.scanPort=1521 \ oracle.install.crs.config.gpnp.configureGNS=false \ oracle.install.crs.config.autoConfigureClusterNodeVIP=false \ oracle.install.option=CRS_CONFIG \ oracle.install.crs.config.ClusterType=STANDARD \ oracle.install.asm.SYSASMPassword=lhr \ oracle.install.asm.monitorPassword=lhr \ oracle.install.config.managementOption=NONE \ oracle.install.crs.config.ignoreDownNodes=false \ oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asm-disk* \ oracle.install.asm.diskGroup.disks=/dev/asm-diskc \ oracle.install.crs.config.gpnp.scanName=raclhr-12cR1-scan \ oracle.install.crs.config.clusterName=raclhr-cluster \ oracle.install.crs.config.clusterNodes=raclhr-12cr1-n1:raclhr-12cr1-n1-vip,raclhr-12cr1-n2:raclhr-12cr1-n2-vip \ oracle.install.crs.config.networkInterfaceList=eth0:192.168.59.0:1,eth1:192.168.2.0:2 \ ORACLE_HOSTNAME=raclhr-12cR1-N1
|
命令行模式执行静默安装,注意复制脚本的时候最后不能多加回车符号,当前窗口不要执行其他内容。“\”后不能有空格。开始执行有点慢,需要修改的地方我已经用黄色背景标注了。若有其他错误可以采用-debug模式获取更多信息。
关于该部分可参考:http://blog.itpub.net/26736162/viewspace-2129161/。该脚本执行完毕会创建一个sid为-MGMTDB,gdbName为_mgmtdb的单实例容器数据库(从日志可以找到相关命令:/u01/app/12.1.0/grid/bin/dbca -silent -createDatabase -createAsContainerDatabase true -templateName MGMTSeed_Database.dbc -sid -MGMTDB -gdbName _mgmtdb -storageType ASM -diskGroupName OCR -datafileJarLocation /u01/app/12.1.0/grid/assistants/dbca/templates -characterset AL32UTF8 -autoGeneratePasswords -skipUserTemplateCheck -oui_internal)该数据库属于grid用户。
/u01/app/12.1.0/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=/home/grid/cfgrsp.properties |
根据官方文档内容,安装GRID可以配置如下的信息:
oracle.assistants.asm|S_ASMPASSWORD=password oracle.assistants.asm|S_ASMMONITORPASSWORD=password oracle.crs|S_BMCPASSWORD=password |
以grid用户在节点1上执行(准确来说应该在执行静默安装的节点上执行,且节点2上不需要执行):
[grid@raclhr-12cR1-N1 ~]$ more /home/grid/cfgrsp.properties oracle.assistants.asm|S_ASMPASSWORD=lhr oracle.assistants.asm|S_ASMMONITORPASSWORD=lhr oracle.crs|S_BMCPASSWORD=lhr [grid@raclhr-12cR1-N1 ~]$ /u01/app/12.1.0/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=/home/grid/cfgrsp.properties [grid@raclhr-12cR1-N1 admin]$ /u01/app/12.1.0/grid/cfgtoollogs/configToolAllCommands RESPONSE_FILE=/home/grid/cfgrsp.properties Setting the invPtrLoc to /u01/app/12.1.0/grid/oraInst.loc
perform - mode is starting for action: configure
perform - mode finished for action: configure
You can see the log file: /u01/app/12.1.0/grid/cfgtoollogs/oui/configActions2017-01-17_05-29-38-PM.log [grid@raclhr-12cR1-N1 admin]$ [grid@raclhr-12cR1-N1 admin]$
|
首先通过如下的命令进行检查环境配置:
/soft/grid/runcluvfy.sh stage -pre dbinst -n raclhr-12cR1-N1,raclhr-12cR1-N2 -verbose -fixup |
./runInstaller -silent -force -noconfig -IgnoreSysPreReqs -ignorePrereq -showProgress \ oracle.install.option=INSTALL_DB_SWONLY \ DECLINE_SECURITY_UPDATES=true \ UNIX_GROUP_NAME=oinstall \ INVENTORY_LOCATION=/u01/app/oraInventory \ SELECTED_LANGUAGES=en \ oracle.install.db.InstallEdition=EE \ oracle.install.db.isCustomInstall=false \ oracle.install.db.EEOptionsSelection=false \ oracle.install.db.DBA_GROUP=dba \ oracle.install.db.OPER_GROUP=asmoper \ oracle.install.db.isRACOneInstall=false \ oracle.install.db.BACKUPDBA_GROUP=dba \ oracle.install.db.DGDBA_GROUP=dba \ oracle.install.db.KMDBA_GROUP=dba \ oracle.install.db.rac.serverpoolCardinality=0 \ oracle.install.db.ConfigureAsContainerDB=false \ oracle.install.db.config.starterdb.memoryOption=false \ oracle.install.db.config.starterdb.installExampleSchemas=true \ oracle.install.db.config.starterdb.managementOption=DEFAULT \ oracle.install.db.config.starterdb.enableRecovery=false \ oracle.install.db.config.starterdb.type=GENERAL_PURPOSE \ SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \ oracle.installer.autoupdates.option=SKIP_UPDATES \ ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 \ ORACLE_BASE=/u01/app/oracle \ oracle.install.db.CLUSTER_NODES=raclhr-12cr1-n1,raclhr-12cr1-n2 \ ORACLE_HOSTNAME=raclhr-12cR1-N1 |
命令行模式执行静默安装,注意复制脚本的时候最后不能多加回车符号,当前窗口不要执行其他内容。“\”后不能有空格。开始执行有点慢,需要修改的地方我已经用黄色背景标注了。若有其他错误可以采用-debug模式获取更多信息。
[oracle@raclhr-12cR1-N1 ~]$ cd /soft/database/ [oracle@raclhr-12cR1-N1 database]$ ll total 72 drwxr-xr-x 4 root root 4096 Jan 16 17:04 install -rwxr-xr-x 1 root root 34132 Jul 11 2014 readme.html drwxrwxr-x 2 root root 4096 Jul 7 2014 response drwxr-xr-x 2 root root 4096 Jul 7 2014 rpm -rwxr-xr-x 1 root root 8533 Jul 7 2014 runInstaller drwxrwxr-x 2 root root 4096 Jul 7 2014 sshsetup drwxr-xr-x 14 root root 4096 Jul 7 2014 stage -rwxr-xr-x 1 root root 500 Feb 7 2013 welcome.html [oracle@raclhr-12cR1-N1 database]$ ./runInstaller -silent -force -noconfig -IgnoreSysPreReqs -ignorePrereq -showProgress \ > oracle.install.option=INSTALL_DB_SWONLY \ > DECLINE_SECURITY_UPDATES=true \ > UNIX_GROUP_NAME=oinstall \ > INVENTORY_LOCATION=/u01/app/oraInventory \ > SELECTED_LANGUAGES=en \ > oracle.install.db.InstallEdition=EE \ > oracle.install.db.isCustomInstall=false \ > oracle.install.db.EEOptionsSelection=false \ > oracle.install.db.DBA_GROUP=dba \ > oracle.install.db.OPER_GROUP=asmoper \ > oracle.install.db.isRACOneInstall=false \ > oracle.install.db.BACKUPDBA_GROUP=dba \ > oracle.install.db.DGDBA_GROUP=dba \ > oracle.install.db.KMDBA_GROUP=dba \ > oracle.install.db.rac.serverpoolCardinality=0 \ > oracle.install.db.ConfigureAsContainerDB=false \ > oracle.install.db.config.starterdb.memoryOption=false \ > oracle.install.db.config.starterdb.installExampleSchemas=true \ > oracle.install.db.config.starterdb.managementOption=DEFAULT \ > oracle.install.db.config.starterdb.enableRecovery=false \ > oracle.install.db.config.starterdb.type=GENERAL_PURPOSE \ > SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \ > oracle.installer.autoupdates.option=SKIP_UPDATES \ > ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 \ > ORACLE_BASE=/u01/app/oracle \ > oracle.install.db.CLUSTER_NODES=raclhr-12cr1-n1,raclhr-12cr1-n2 \ > ORACLE_HOSTNAME=raclhr-12cR1-N1 Starting Oracle Universal Installer...
Checking Temp space: must be greater than 500 MB. Actual 2287 MB Passed Checking swap space: must be greater than 150 MB. Actual 1785 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-01-17_09-38-20PM. Please wait ...[oracle@raclhr-12cR1-N1 database]$ [oracle@raclhr-12cR1-N1 database]$ [oracle@raclhr-12cR1-N1 database]$ [oracle@raclhr-12cR1-N1 database]$ [oracle@raclhr-12cR1-N1 database]$ You can find the log of this install session at: /u01/app/oraInventory/logs/installActions2017-01-17_09-38-20PM.log
Prepare in progress. .................................................. 8% Done.
Prepare successful.
Copy files in progress. .................................................. 13% Done. .................................................. 18% Done. .................................................. 23% Done. .................................................. 28% Done. .................................................. 33% Done. .................................................. 38% Done.
|