在OracleLinux7.6上静默安装Oracle11gR2-11.2.0.4数据库
发表于:2026-11-01 作者:千家信息网编辑
千家信息网最后更新 2026年11月01日,一、部署Oracle环境,以及准备responseFile文件1、环境部署请参考博客:https://blog.51cto.com/hnyuanzijian/2342205,此外还需要再创建目录和文件
千家信息网最后更新 2026年11月01日在OracleLinux7.6上静默安装Oracle11gR2-11.2.0.4数据库
一、部署Oracle环境,以及准备responseFile文件
1、环境部署请参考博客:https://blog.51cto.com/hnyuanzijian/2342205,此外还需要再创建目录和文件,并给与权限 a、创建目录 mkdir /u01/app/oracle/oraInventory -p mkdir /u01/app/oracle/fast_recovery_area -p chown -R oracle.oinstall /u01 chmod -R 775 /u01 b、新建文件 [root@oracledb ~]# vim /etc/oraInst.loc inventory_loc=/u01/app/oracle/oraInventory inst_group=oinstall 2、主备responseFile文件,从Oracle软件中获取文件模板[root@oracledb ~]# cd /opt/database/response/[root@oracledb response]# lsdbca.rsp db_install.rsp netca.rsp[root@oracledb response]# 3、其中database是Oracle软件解压后生成的目录。在response目录下有三个模板, a、dbca.rsp是用来创建数据库的。 b、db_install.rsp是用来安装Oracle软件的。 c、netca.rsp是用来创建监听器的。 当然也可在db_install.rsp中直接创建数据库。在这里,为求方便,我们选择db_install.rsp模板一并安装软件,创建数据库。
二、编辑responseFile文件
[root@oracledb response]# grep -Ev "^$|^#" db_install.rsporacle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0#选择安装数据库软件oracle.install.option=INSTALL_DB_SWONLY#数据库服务器的主机名ORACLE_HOSTNAME=oracledb.newcapec.net#Oracle用户组UNIX_GROUP_NAME=oinstall#Oracle环境路径INVENTORY_LOCATION=/u01/app/oracle/oraInventory#Oracle安装语言SELECTED_LANGUAGES=en#ORACLE_HOME目录ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1#ORACLE_BASE目录ORACLE_BASE=/u01/app/oracle#Oracle安装版本,企业版oracle.install.db.InstallEdition=EEoracle.install.db.EEOptionsSelection=falseoracle.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管理员DBA组oracle.install.db.DBA_GROUP=dba#Oracle的安装组oinstalloracle.install.db.OPER_GROUP=oinstalloracle.install.db.CLUSTER_NODES=oracle.install.db.isRACOneInstall=oracle.install.db.racOneServiceName=#Oracle的一般用途oracle.install.db.config.starterdb.type=GENERAL_PURPOSE#Oracle的服务名oracle.install.db.config.starterdb.globalDBName=oracledb.newcapec.net#Oracle实例名oracle.install.db.config.starterdb.SID=oracledb#Oracle字符集oracle.install.db.config.starterdb.characterSet=ZHS16GBK#Oracle内存管理模式oracle.install.db.config.starterdb.memoryOption=true#Oracle的内存限制,内存*80%oracle.install.db.config.starterdb.memoryLimit=1536#Oracle的示例oracle.install.db.config.starterdb.installExampleSchemas=falseoracle.install.db.config.starterdb.enableSecuritySettings=true#Oracle的所有用户密码,ALl填写的话,其他就不用填写了oracle.install.db.config.starterdb.password.ALL=oracleoracle.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文件系统类型oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE#Oracle的日志目录oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/u01/app/oracle/oraInventory#Oracle快速恢复区oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/u01/app/oracle/fast_recovery_areaoracle.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忽略更新oracle.installer.autoupdates.option=SKIP_UPDATESoracle.installer.autoupdates.downloadUpdatesLoc=AUTOUPDATES_MYORACLESUPPORT_USERNAME=AUTOUPDATES_MYORACLESUPPORT_PASSWORD=
三、 静默安装[root@oracledb response]$ ./runInstaller -help如果对runInstaller的参数不是很了解的话,可通过该命令进行查看。Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-01-19_10-56-31PM. Please wait runInstaller [-options] [()*]Where options include: -clusterware oracle.crs, Version of Cluster ready services installed. -crsLocation Used only for cluster installs, specifies the path to the crs home location. Specifying this o inventory. -invPtrLoc Unix only. To point to a different inventory location. The orainst.loc file contains:inventory_loc= inst_group=<> -jreLoc Path where Java Runtime Environment is installed. OUI cannot be run without it. -logLevel To filter log messages that have a lesser priority level than . Valid options are: seve, basic, general, detailed, trace. The use of basic, general, detailed, trace is deprecated. -paramFile Specify location of oraparam.ini file to be used by OUI. -responseFile Specifies the response file and path to use. -attachHome For attaching homes to the OUI inventory. -cfs Indicates that the Oracle home specified is on cluster file system (shared). This is mandatoryversal Installer can register the home appropriately into the inventory. -clone For making an Oracle Home copy match its current environment. -debug For getting the debug information from OUI. -detachHome For detaching homes from the OUI inventory without deleting inventory directory inside Oracle -enableRollingUpgrade Used in cluster environment, to enable upgrade of a product on a subset of nodes (on which the -executeSysPrereqs Execute system pre-requisite checks and exit. -force Allowing silent mode installation into a non-empty directory. -help Displays above usage. -ignoreSysPrereqs For ignoring the results of the system pre-requisite checks. -local Performs the operation on the local node irrespective of the cluster nodes specified. -printdiskusage Log debug information for disk usage. -printmemory Log debug information for memory usage. -printtime Log debug information for time usage. -relink For performing relink actions on the oracle home Usage: -relink -maketargetsxml [-makedepsxml Unix specific option. Used only for cluster installs, specifies the path to the remote copy pr -remoteshell Unix specific option. Used only for cluster installs, specifies the path to the remote shell p -executePrereqs To execute only the prerequisite checks. -ignorePrereq To ignore running the prerequisite checks. -ignoreInternalDriverError To ignore any internal driver errors. -downloadUpdates To download updates only. -showProgress To show the installation progress on the console. This option is supported only in case of silCommand Line Variables Usage Command line variables are specified using ; for example: [ session: | compName: | compName:version: ]variableName=" valueOfVariable"] Session/Installer variables are specified using: [session:]varName=value Ex 1: session:ORACLE_HOME_NAME="OraHome" Ex 2: ORACLE_HOME_NAME="OraHome" The lookup order is session:varName then just varName. The session prefix is used to avoid ambigui Component variables are specified using: [compInternalName:[Version:]]varName Ex 1: oracle.comp1:1.0.1:varName="VarValue" Ex 2: oracle.comp1:varName="VarValue" The lookup order is compInternalName:Version:varName, then compInternalName:varName, then just var./runInstaller -silent -igno
开始静默安装[oracle@oracledb database]$ ./runInstaller -silent -ignoreSysPrereqs -showProgress -responseFile /home/oracle/db_install.rsp其中-silent指的是静默安装,-ignorePrereq忽略prerequisite的检查结果,showProgress显示进度,responseFile是种子文件。
[oracle@oracledb database]$ ./runInstaller -silent -ignoreSysPrereqs -showProgress -responseFile /opt/database/response/db_install.rspStarting Oracle Universal Installer...Checking Temp space: must be greater than 120 MB. Actual 20032 MB PassedChecking swap space: must be greater than 150 MB. Actual 4095 MB PassedPreparing to launch Oracle Universal Installer from /tmp/OraInstall2019-01-19_11-13-22PM. Please wait ...[oracle@oracledb database]$ [WARNING] [INS-32055] The Central Inventory is located in the Oracle base. CAUSE: The Central Inventory is located in the Oracle base. ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.[WARNING] [INS-13014] Target environment do not meet some optional requirements. CAUSE: Some of the optional prerequisites are not met. See logs for details. /tmp/OraInstall2019-01-19_11-13-22PM/installActions2019-01-19_11-13-22PM.log ACTION: Identify the list of failed prerequisite checks from the log: /tmp/OraInstall2019-01-19_11-13-22PM/installActions2019-01-19_11-13-22PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.You can find the log of this install session at: /u01/app/oracle/oraInventory/logs/installActions2019-01-19_11-13-22PM.log[oracle@oracledb database]$ Prepare in progress................................................... 9% Done.Prepare successful.Copy files in progress................................................... 14% Done................................................... 20% Done................................................... 26% Done................................................... 31% Done................................................... 36% Done................................................... 41% Done................................................... 46% Done................................................... 51% Done................................................... 56% Done................................................... 63% Done................................................... 68% Done................................................... 73% Done................................................... 78% Done................................................... 83% Done...............................Copy files successful.Link binaries in progress...........Link binaries successful.Setup files in progress................................................... 88% Done................................................... 94% Done.Setup files successful.The installation of Oracle Database 11g was successful.Please check '/u01/app/oracle/oraInventory/logs/silentInstall2019-01-19_11-13-22PM.log' for more detaiExecute Root Scripts in progress.As a root user, execute the following script(s): 1. /u01/app/oracle/oraInventory/orainstRoot.sh 2. /u01/app/oracle/product/11.2.0/dbhome_1/root.sh.................................................. 100% Done.Execute Root Scripts successful.
最后,需root用户手动执行以下两个文件: 1. /u01/app/oracle/oraInventory/orainstRoot.sh 2. /u01/app/oracle/product/11.2.0/dbhome_1/root.sh 当然,也可查看/u01/app/oracle/oraInventory/logs/installActions2015-04-01_10-13-42PM.log了解具体的安装信息。
四、配置网络[oracle@oracledb database]$netca -silent -responsefile /opt/database/response/netca.rsp
五、安装Oracle数据库实例[oracle@oracledb database]$dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbname oracledb.newcapec.net -sid oracledb -sysPassword oracle -systemPassword oracle -responseFile NO_VALUE -datafileDestination /u01/app/oracle/oradata/ -redoLogFileSize 50 -recoveryAreaDestination /u01/app/flash_recovery_area -storageType FS -characterSet ZHS16GBK -nationalCharacterSet AL16UTF16 -sampleSchema true -memoryPercentage 40 -totalMemory 1530 -databaseType OLTP -emConfiguration NONE
六、检查实例ps -ef | grep ora_ | grep -v grep | wc -lps -ef | grep ora_ | grep -v grep
文件
目录
数据
数据库
软件
内存
实例
模板
环境
用户
服务
检查
管理
选择
三个
下有
不用
两个
主机
参数
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
互联网科技园
什么是科技互联网
喔噻互联网科技有限公司
华服互联网科技怎么样
与互联网科技公司
互联网科技开发公司
猪兼强互联网科技
碳银互联网科技有限公司
新华互联网科技校企合作
安控科技rtu产品工业互联网
哈尔滨新华互联网科技学院
互联网教育科技公司vipkid
互联网对科技的发展
武汉健翔互联网络科技有限公司
和信科技工业互联网
恒生互联网科技指数跳水
张召忠谈中国互联网科技
富国互联网金融科技混合基金
昆明中奇联合互联网科技
珠海东科互联网科技有限公司
上海睿民互联网科技有限公司
互联网科技社
互联网 科技馆
福建科技产业互联网发展
互联网科技革命什么开始
迪庆互联网科技招生
工业互联网等科技实现智能化赋能
互联网公司高科技产品
宁波跨境商互联网科技有限公司
安徽零酒互联网科技有限公司