install Oracle Database insilent

本文介绍在CentOS 6.5环境中安装配置Oracle Database 11g的过程,包括更新必要软件包、创建安装账户、调整系统参数、准备静默安装配置文件、执行安装步骤、创建实例、配置监听等关键环节。

一、OS:CENTOS 6.5 X86_64
二、更新必要的软件包
yum install binutils compat-libcap1 compat-libstdc+±33 compat-libstdc+±33.i686 gcc gcc-c++ glibc glibc.i686 glibc-devel glibc-devel.i686 ksh libgcc libgcc.i686 libstdc++ libstdc++.i686 libstdc+±devel libstdc+±devel.i686 libaio libaio.i686 libaio-devel libaio-devel.i686 make sysstat
三、添加安装帐户
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
四、修改系统参数
1、修改sysctl.conf,在文件末添加
Oracle Linux 6
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

Oracle Linux 7
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576

2、修改limit.conf限制参数
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
五、准备静默安装rsp配置文件
从response复制db_install.rsp文件进行修改

六、安装条件检查
./runInstaller -executePrereqs

七、开始安装

[oracle@CervicalDB response]$./runInstaller -silent -responseFile /u01/dbsoft/installfile/response/db_install.rsp  -showProgress
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 20970 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 3999 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-04-10_01-57-02AM. Please wai[oracle@CervicalDB installfile]$ [FATAL] [INS-10101] The given response file /u01/dbsoft/response/db_install.rsp is not found.
   CAUSE: The given response file is either not accessible or do not exist.
   ACTION: Give a correct response file location. (Note: relative path is not supported)

[oracle@CervicalDB installfile]$ ./runInstaller -silent -responseFile /u01/dbsoft/installfile/response/db_install.rsp  -showProgress
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 20970 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 3999 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-04-10_01-58-10AM. Please wait ...[oracle@CervicalDB installfile]$ [WARNING] [INS-13014] Target environment do not meet some optional requirements.
   CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/installActions2014-04-10_01-58-10AM.log
   ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/installActions2014-04-10_01-58-10AM.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/oraInventory/logs/installActions2014-04-10_01-58-10AM.log

Prepare in progress.
..................................................   9% Done.

Prepare successful.

Copy files in progress.
..................................................   14% Done.
..................................................   20% Done.
..................................................   26% Done.
..................................................   31% Done.
..................................................   36% Done.
..................................................   44% Done.
..................................................   49% Done.
..................................................   54% Done.
..................................................   59% Done.
..................................................   64% Done.
..................................................   69% Done.
..................................................   74% Done.
..................................................   79% Done.
..................................................   84% Done.
....................
Copy files successful.

Link binaries in progress.
..........
Link binaries successful.

Setup files in progress.
..................................................   89% Done.
..................................................   94% Done.

Setup files successful.
The installation of Oracle Database 11g was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2014-04-10_01-58-10AM.log' for more details.


As a root user, execute the following script(s):
        1. /u01/app/oracle/product/11.2.0.3/dbhome_1/root.sh


......Execute Root Scripts in progress.
............................................   100% Done.

Execute Root Scripts successful.
Successfully Setup Software.

八、创建实例

[oracle@CervicalDB response]$ dbca -silent -responseFile dbca.rsp 
Enter SYS user password: 
 
Enter SYSTEM user password: 
 
Copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
Creating and starting Oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
60% complete
62% complete
Completing Database Creation
66% complete
70% complete
73% complete
85% complete
96% complete
100% complete
Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/cervical01/cervical.log" for further details.
[oracle@CervicalDB response]$ 

九、配置侦听

[oracle@CervicalDB response]$ netca -silent  -responsefile  /u01/dbsoft/installfile/response/netca.rsp

Parsing command line arguments:
    Parameter "silent" = true
    Parameter "responsefile" = /u01/dbsoft/installfile/response/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
    Running Listener Control: 
      /u01/app/oracle/product/11.2.0.3/dbhome_1/bin/lsnrctl start LISTENER
    Listener Control complete.
    Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0

十、检查

[oracle@CervicalDB ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 10-APR-2014 06:14:16

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                10-APR-2014 03:08:55
Uptime                    0 days 3 hr. 5 min. 24 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0.3/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/CervicalDB/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=10.204.152.17)(PORT=1521)))
Services Summary...
Service "cervical01" has 1 instance(s).
  Instance "cervical01", status READY, has 1 handler(s) for this service...
Service "cervical01XDB" has 1 instance(s).
  Instance "cervical01", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@CervicalDB ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Thu Apr 10 06:14:21 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select sysdate from dual;

SYSDATE
---------
10-APR-14

SQL> 
[FATAL] [INS-10105] The given response file /usr/local/products/oracle19c/install/response/db_install.rsp is not valid. CAUSE: Syntactically incorrect response file. Either unexpected variables are specified or expected variables are not specified in the response file. ACTION: Refer the latest product specific response file template SUMMARY: - cvc-complex-type.2.4.a: Invalid content was found starting with element 'oracle.install.db.OSKMDBA'. One of '{oracle.install.responseFileVersion, oracle.install.option, oracle.install.db.ConfigureAsContainerDB, SELECTED_LANGUAGES, ORACLE_HOSTNAME, INVENTORY_LOCATION, UNIX_GROUP_NAME, oracle.install.db.InstallEdition, ORACLE_HOME, OSDBA_GROUP, OSOPER_GROUP, OSBACKUPDBA_GROUP, OSDGDBA_GROUP, OSKMDBA_GROUP, OSRACDBA_GROUP, CLUSTER_NODES, oracle.install.db.rac.configurationType, oracle.install.db.rac.serverpoolName, oracle.install.db.rac.serverpoolCardinality, oracle.install.db.CLUSTER_NODES, oracle.install.db.isRACOneInstall, oracle.install.db.racOneServiceName, oracle.install.db.DBA_GROUP, oracle.install.db.OPER_GROUP, oracle.install.db.BACKUPDBA_GROUP, oracle.install.db.DGDBA_GROUP, oracle.install.db.KMDBA_GROUP, oracle.install.db.OSDBA_GROUP, oracle.install.db.OSOPER_GROUP, oracle.install.db.OSDGDBA_GROUP, oracle.install.db.OSKMDBA_GROUP, oracle.install.db.OSRACDBA_GROUP, oracle.install.IsBuiltInAccount, oracle.install.IsVirtualAccount, oracle.install.OracleHomeUserName, oracle.install.OracleHomeUserPassword, oracle.install.db.rootconfig.executeRootScript, oracle.install.db.rootconfig.configMethod, oracle.install.db.rootconfig.sudoPath, oracle.install.db.config.starterdb.type, oracle.install.db.config.starterdb.SID, oracle.install.db.config.starterdb.globalDBName, oracle.install.db.config.PDBName, oracle.install.db.config.pdbName, oracle.install.db.config.starterdb.characterSet, oracle.install.db.config.starterdb.memoryLimit, oracle.install.db.config.starterdb.storageType, oracle.install.db.config.starterdb.fileSystemStorage.dataLocation, oracle.install.db.config.starterdb.password.ALL, oracle.install.db.config.starterdb.password.SYS, oracle.install.db.config.starterdb.password.DBSNMP, oracle.install.db.config.starterdb.password.SYSTEM, oracle.install.db.config.starterdb.password.PDBADMIN, oracle.install.db.config.starterdb.managementOption, oracle.install.db.config.starterdb.omsHost, oracle.install.db.config.starterdb.omsPort, oracle.install.db.config.starterdb.emAdminUser, oracle.install.db.config.starterdb.emAdminPassword, oracle.install.db.config.starterdb.useWalletForPasswords, oracle.install.db.config.starterdb.walletLocation, oracle.install.db.config.starterdb.walletPassword, SECURITY_UPDATES_VIA_MYORACLESUPPORT, DECLINE_SECURITY_UPDATES, MYORACLESUPPORT_USERNAME, MYORACLESUPPORT_PASSWORD, PROXY_PORT, PROXY_HOST, PROXY_USER, PROXY_PWD, PROXY_REALM, COLLECTOR_SUPPORTHUB_URL, AUTOUPDATES_MYORACLESUPPORT_USERNAME, AUTOUPDATES_MYORACLESUPPORT_PASSWORD, oracle.installer.autoupdates.option, oracle.installer.autoupdates.downloadUpdatesLoc}' is expected.
08-23
<think>我们正在处理Oracle 19c安装中的响应文件错误[INS-10105]。 根据错误信息,问题在于响应文件(db_install.rsp)的格式不合法,具体错误类型为cvc-complex-type.2.4.a。 这种错误通常是由于响应文件中缺少必需的XML元素或元素顺序不正确造成的。 解决步骤: 1. 验证响应文件结构:确保所有必需的参数都存在,并且顺序与模板一致。 2. 检查XML格式:确保没有语法错误(如未闭合的标签、特殊字符未转义等)。 3. 使用Oracle提供的响应文件模板:从安装介质中获取最新的响应文件模板,然后修改它。 具体操作: 步骤1:获取原始响应文件模板 Oracle安装介质中通常包含响应文件模板,位于安装包的`response`目录下。例如: - db_install.rsp: 用于数据库安装的响应文件模板 步骤2:核对参数 将您自定义的响应文件与模板进行对比,确保: - 所有必需的参数都已设置(特别是那些标记为`#`注释掉的参数,如果需要则取消注释并赋值) - 参数的顺序与模板一致(因为Oracle安装程序对顺序敏感) - 参数值符合要求(例如,布尔值必须是`true`或`false`,路径必须存在等) 步骤3:修复常见问题点 根据错误信息`cvc-complex-type.2.4.a: Invalid content was found starting with element ...`,它指出了从哪个元素开始出现无效内容。这通常意味着: - 在XML结构中,某个元素出现在了不允许出现的位置(比如父元素错误) - 缺少了某个必需的子元素 例如,在响应文件中,以下部分的结构是固定的: ```xml <oracle.install.responseFileVersion>/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0</oracle.install.responseFileVersion> <ORACLE_HOSTNAME>localhost</ORACLE_HOSTNAME> <INVENTORY_LOCATION>/u01/app/oraInventory</INVENTORY_LOCATION> ... ``` 步骤4:使用验证工具(可选) 如果有XSD模式文件,可以使用XML验证工具(如xmllint)来验证响应文件: ```bash xmllint --schema db_install.rsp.xsd db_install.rsp --noout ``` 但通常Oracle不提供XSD文件,因此我们主要依靠模板对比。 步骤5:重新运行安装 使用修复后的响应文件重新运行安装程序: ```bash ./runInstaller -silent -responseFile /path/to/db_install.rsp ``` 示例:一个典型的响应文件错误修复前后对比 错误响应文件片段(有顺序错误): ```properties oracle.install.option=INSTALL_DB_SWONLY ORACLE_HOSTNAME=oracle-server INVENTORY_LOCATION=/u01/app/oraInventory oracle.install.db.InstallEdition=EE oracle.install.db.OSDBA=dba # 注意:这里缺少了UNIX_GROUP_NAME参数 ``` 正确顺序(根据模板): ```properties oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oraInventory ORACLE_HOSTNAME=oracle-server oracle.install.db.InstallEdition=EE oracle.install.db.OSDBA=dba ``` 注意:`UNIX_GROUP_NAME`必须在`INVENTORY_LOCATION`之前出现(根据模板要求)。 如果问题仍然存在,请提供响应文件的关键部分(注意隐藏密码等敏感信息),我们可以帮助检查。 另外,参考站内引用中提到的安装教程,我们可以尝试使用以下方法绕过一些检查: - 添加`-ignorePrereq`参数忽略先决条件检查 - 使用`-J"-Doracle.install.db.validate.supportedOSCheck=false"`来跳过操作系统检查 但是,对于响应文件格式错误,这些参数可能无效,因为格式错误发生在解析阶段。 因此,我们应专注于修复响应文件格式。 如果时间紧迫,也可以尝试使用图形界面安装,它会生成一个响应文件供后续使用。 最后,参考引用[2]中提到的配置脚本,在安装完成后可能需要以root身份运行配置脚本: ```bash /etc/init.d/oracledb_ORCLCDB-19c configure ``` 但这一步是在安装成功之后才进行的。 总结:修复响应文件的关键是严格按照模板的顺序和结构来设置参数。 相关问题: 1. 如何为Oracle 19c静默安装创建正确的响应文件? 2. Oracle数据库安装过程中响应文件参数的含义是什么? 3. 如何验证Oracle响应文件的正确性? 4.Oracle静默安装中如何跳过操作系统检查? 5. Oracle安装完成后需要执行哪些配置步骤?</think>### 解决 Oracle 19c 安装错误 [INS-10105]:响应文件格式问题 #### 错误分析 错误 `[INS-10105]` 和 `cvc-complex-type.2.4.a` 表明您的响应文件 `db_install.rsp` 存在格式问题: 1. **XML 结构错误**:参数顺序错误或缺少必需元素 2. **语法问题**:未闭合的标签、非法字符或不正确的缩进 3. **参数冲突**:互斥参数同时启用(如同时指定 OUI 和静默模式) --- ### 修复步骤 #### 1. 获取标准响应文件模板 ```bash # 从安装介质提取标准模板 unzip -j LINUX.X64_193000_db_home.zip "*/response/*.rsp" -d /tmp cp /tmp/db_install.rsp ~/db_install_fixed.rsp ``` #### 2. 关键参数修复(对比您的文件) ```diff # 必需参数必须按顺序出现 - oracle.install.db.OSDBA=dba + UNIX_GROUP_NAME=oinstall + INVENTORY_LOCATION=/u01/app/oraInventory + ORACLE_BASE=/u01/app/oracle + ORACLE_HOME=/u01/app/oracle/product/19c + oracle.install.db.OSDBA=dba ``` #### 3. 验证 XML 结构 使用 `xmllint` 工具检查: ```bash # 安装验证工具 sudo yum install libxml2-utils # 验证响应文件 xmllint --noout --schema /path/to/oracle_schema.xsd db_install.rsp ``` **典型错误输出**: ``` db_install.rsp:XX: element XYZ: Schemas validity error : Element 'oracle.install.db.config.starterdb.globalDBName': This element is not expected. Expected is ( oracle.install.db.config.starterdb.password ) ``` #### 4. 参数冲突检查 禁止同时启用以下互斥参数: ```properties # 互斥组1:安装类型 oracle.install.option=INSTALL_DB_SWONLY # 只能启用一个 DECLINE_SECURITY_UPDATES=true # 互斥组2:密码管理 oracle.install.db.config.starterdb.password.ALL=AutoPass#123 # 与手动密码冲突 oracle.install.db.config.starterdb.password.SYS=手动密码 ``` #### 5. 正确格式示例 ```properties # 核心参数组 (必须按顺序) oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v19.0.0 oracle.install.option=INSTALL_DB_SWONLY UNIX_GROUP_NAME=oinstall INVENTORY_LOCATION=/u01/app/oraInventory ORACLE_BASE=/u01/app/oracle ORACLE_HOME=/u01/app/oracle/product/19c oracle.install.db.InstallEdition=EE # 操作系统组配置 oracle.install.db.OSDBA=dba oracle.install.db.OSOPER=oper oracle.install.db.OSBACKUPDBA=backupdba # 安全更新 (必须显式声明) SECURITY_UPDATES_VIA_MYORACLESUPPORT=false DECLINE_SECURITY_UPDATES=true ``` #### 6. 重新运行安装 ```bash ./runInstaller -silent \ -responseFile ~/db_install_fixed.rsp \ -ignorePrereqFailure \ -showProgress ``` --- ### 错误预防指南 1. **参数顺序规则**: - Group/Oracle用户 → 路径 → 版本 → 安全设置 - 完整顺序:[参考官方文档顺序](https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/rsp-parameters-for-oracle-universal-installer.html) 2. **特殊字符处理**: ```properties # 错误:包含未转义& oracle.install.db.config.starterdb.password.SYS=Pass&123 # 正确:XML实体转义 oracle.install.db.config.starterdb.password.SYS=Pass&123 ``` 3. **注释规范**: ```properties # 正确:单独行注释 #oracle.install.db.isRACOneInstall=false # 错误:行内注释(导致解析失败) oracle.install.db.config.starterdb.storageType=FS # 使用文件系统 ``` > **关键提示**:使用官方验证工具 `chkresp` 检查响应文件: > ```bash > $ORACLE_HOME/install/chkresp /path/to/db_install.rsp > ```[^1] --- ### 响应文件调试工具对比 | 工具 | 命令 | 检测能力 | 安装要求 | |------|------|----------|----------| | **xmllint** | `xmllint --noout --schema file.xsd` | XML结构验证 | 需安装libxml2 | | **chkresp** | `$ORACLE_HOME/install/chkresp` | 参数逻辑验证 | 需预装Oracle | | **OUI模拟** | `./runInstaller -dryRun` | 完整安装流程 | 无需实际安装 |
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值