测试版本:

系统版本:RHEL 6.5

oracle版本:11.2.4


一、前言


  最近在自学oracle,今天尝试一下静默安装的方法,废话不多说下面开始。


1、准备oracle 软件,我这里使用的11.2.4版本,如果没有就去oracle 网站下载一下,

如果找不到就给我留言,我发网盘链接


2、将软件上传到/tmp 目录下,里面有一个response 目录,里面有3个rsp文件

dbca.rsp  db_install.rsp  netca.rsp,其中作用如下:

db_install.rsp 是安装数据库软件的文件(本次我们用到的就是这个文件)

dbca.rsp  是创建数据库的文件

netca.rsp 是创建数据库监听的文件


2、将文件cp到/home/db/oracle/response中,其中这里测试环境oracle 家目录为/home/db/oracle。

关于安装oracle软件前期的准备工作,例如建立用户、系统参数等。如果不清楚请参考我的上一篇文章,这里就不赘述了,链接如下:http://ureysky.blog.51cto.com/2893832/1843543


3、关于db_install.rsp 文件的配置和解释,因篇幅限制,可去http://down.51cto.com/data/2238464下载,里面有我整理的注释和解释,按自己的需求编辑好后就可以使用了。



二、开始安装 Oracle 软件

1、操作命令

# chmod +x –R  /tmp/database

# su - oracle

# cd database 目录,运行 runInstaller  

#./runInstaller  -silent -responseFile  /home/db/oracle/response/db_install.rsp - ignorePrereq


开始安装,需要等一段时间(如果没有错误提示就不要按“Enter”键,否则可能出现命令行提示,误以为安装终止,其实还在安装)



2、打开另一个终端,可以实时跟踪查看安装日志,了解安装的进度执行: 

tail -f /home/db/oracle/oraInventory/logs/installActions2016-08-30_05-52-18PM.log

 wKioL1fKi2uDDTlpAAEFgnJWgk4308.jpg-wh_50

安装过程中,如果提示[WARNING]不必理会,此时安装程序仍在进行,如果出现[FATAL],则安装程序已经停止了。


3、当出现以下配置脚本需要以 "root" 用户的身份执行。

按其提示操作:

$ exit  // 回到root用户,运行下面两个脚本

/home/db/oracle/oraInventory/orainstRoot.sh

/oracle/product/11.2.4/db_1/root.sh


三、在此安装过程中遇到的问题及解决办法:

  安装过程中我也参考了一些网上的文章,问题一是我这次安装时候遇到的,而问题二和三,是我在网 上查资料的时候看到其他人遇到的,这里就记录了下来。


问题一

[FATAL] [INS-32035] Unable to create a new central inventory directory : /oracle.

   CAUSE: The central inventory location provided is not empty.

   ACTION: Please provide another location for the inventory, or clean up the current location.

A log of this session is currently saved as: /tmp/OraInstall2016-08-30_05-29-49PM/installActions2016-08-30_05-29-49PM.log. Oracle recommends that if you want to keep this log, you should move it from the temporary location to a more permanent location.


--- 解决办法

其实这个问题赖自己,可能还是对oracle安装过程不熟悉,折腾半天。

配置文件里面一定要写上INVENTORY_LOCATION=/home/db/oracle/oraInventory


>>> 问题二


Starting Oracle Universal Installer...


Checking Temp space: must be greater than 415 MB.   Actual 4347 MB    Passed


Checking swap space: must be greater than 150 MB.   Actual 32768 MB    Passed


Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-03-02_04-46-11PM. Please wait ...$ [SEVERE] - Email Address Not Specified


--- 解决办法 

在安装模板中将 DECLINE_SECURITY_UPDATES 参数的值改为true,即:


DECLINE_SECURITY_UPDATES=true  // 参见上述的安装模板文件 db_install.rsp


>>> 问题三


[FATAL] [INS-13013] Target environment do not meet some mandatory requirements.


   CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /orain/oracle/oraInventory/logs/installActions2011-03-02_04-49-41PM.log


   ACTION: Identify the list of failed prerequisite checks from the log: /orain/oracle/oraInventory/logs/installActions2011-03-02_04-49-41PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.


--- 解决办法

这个错误在网上查到说在安装命令中加入选项 -ignorePrereq 就可以解决,但问题的根本原因没有找到。