Oracle安装(11g)静默安装
本博文讲述如何在linux系统下静默安装oracle11g(11.2.4.0)。主要用于图形显示不方便的场景,也适用于脚本化批量部署的需要。
系统环境
OS: Oracle Linux Server release 6.7
软件包采用mini安装,降低系统负载,减少系统漏洞***面。并安装oracle工具包,简化oracle数据库安装流程。省去创建oracle用户和oinstall用户租的创建,并能够满足通过oracle安装过程的依赖检查。
静默安装流程:
1. 定义目录结构:
ORACLE_BASE ORACLE产品的根目录
Linux建议设置:ORACLE_BASE=/u01/app/oracle
ORACLE_HOME 数据库产品目录
Linux建议设置:ORACLE_HOME=/u01/app/oracle/product/11.2.4/dbhome_1ORACLE_INVENTORY 数据库资产清单目录
Linux建议设置:ORACLE_INVENTORY=/u01/app/oraInventory
2.准备应答文件:
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0oracle.install.option=INSTALL_DB_SWONLY #仅安装软件不创建数据库ORACLE_HOSTNAME=DB-DEV01 #服务器主机名UNIX_GROUP_NAME=oinstall #软件安装所需群组INVENTORY_LOCATION=/u01/app/oraInventory #指定资产清单目录SELECTED_LANGUAGES=en,zh_CN #软件语言ORACLE_HOME=/u01/app/oracle/product/11.2.4/dbhome_1 #ORACLE_HOMEORACLE_BASE=/u01/app/oracle #ORACLE_BASEoracle.install.db.InstallEdition=EE #安装版本,本例选择企业版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.0oracle.install.db.DBA_GROUP=dba #安装软件时的指定用户oracle.install.db.OPER_GROUP= oracle.install.db.CLUSTER_NODES=oracle.install.db.isRACOneInstall=falseoracle.install.db.racOneServiceName=oracle.install.db.config.starterdb.type=oracle.install.db.config.starterdb.globalDBName=oracle.install.db.config.starterdb.SID=oracle.install.db.config.starterdb.characterSet=AL32UTF8 #字符集oracle.install.db.config.starterdb.memoryOption=trueoracle.install.db.config.starterdb.memoryLimit=oracle.install.db.config.starterdb.installExampleSchemas=falseoracle.install.db.config.starterdb.enableSecuritySettings=trueoracle.install.db.config.starterdb.password.ALL=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_CONTROLoracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=oracle.install.db.config.starterdb.automatedBackup.enable=falseoracle.install.db.config.starterdb.automatedBackup.osuid=oracle.install.db.config.starterdb.automatedBackup.ospwd=oracle.install.db.config.starterdb.storageType=oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=oracle.install.db.config.asm.diskGroup=oracle.install.db.config.asm.ASMSNMPPassword=MYORACLESUPPORT_USERNAME=MYORACLESUPPORT_PASSWORD=SECURITY_UPDATES_VIA_MYORACLESUPPORT=DECLINE_SECURITY_UPDATES=truePROXY_HOST=PROXY_PORT=PROXY_USER=PROXY_PWD=PROXY_REALM=COLLECTOR_SUPPORTHUB_URL=oracle.installer.autoupdates.option=SKIP_UPDATESoracle.installer.autoupdates.downloadUpdatesLoc=AUTOUPDATES_MYORACLESUPPORT_USERNAME=AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
3.执行安装命令
/directory_path/runInstaller [-silent] [-noconfig] -responseFile /home/oracle/
4.查看安装过程
执行上面的命令后,会弹出
You can find the log of this install session at:
/u01/app/oraInventory/logs/installActions2015-12-09_10-26-42PM.log
使用tail -f 监控安装过程。
5.结束后应用,切换到root用户,应用指定的脚本安装结束。
常见问题以及解决方案:
1. Could not retrieve local nodename
INFO: Setting value for the property:configcmds in the bean:configcmdmappings
SEVERE: [FATAL] PRVF-0002 : Could not retrieve local nodename.
Refer associated stacktrace #oracle.install.commons.util.exception.DefaultErrorAdvisor:35
INFO: Advice is ABORT
SEVERE: Unconditional Exit
INFO: Adding ExitStatus FAILURE to the exit status set
WARNING: A log of this session is currently saved as: /tmp/OraInstall2016-06-26_07-52-09PM/installActions2016-06-26_07-52-09PM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location to a more permanent location.
INFO: Finding the most appropriate exit status for the current application
INFO: Exit Status is -1
INFO: Shutdown Oracle Database 11g Release 2 Installer
解决方案: