转载

10g,11g中数据库静默安装中的细小差别

数据库软件的安装根据工作需要主要有以下几种方式,使用oui是普遍的图形界面方式,还有两种是不依赖图形界面的,一种为静默安装,另外一种为克隆安装。
静默安装的时候核心就在于响应文件,在安装目录database/response下提供了几个响应文件,是oracle提供的模板。
比如安装数据库软件的模板db_install.rsp,dbca的模板dbca.rsp,配置监听的netca.rsp
[ora11g@oel1 response]$ ll total 76 -rw-rw-r-- 1 ora11g dba 44969 Feb 14  2009 dbca.rsp -rw-rw-r-- 1 ora11g dba 22663 Oct 11 16:02 db_install.rsp -rwxrwxr-x 1 ora11g dba  5740 Feb 26  2009 netca.rsp 对这个文件略作修改,然后开始尝试静默安装11g的数据库软件,从我接触的情况来看,静默安装失败主要有几个原因,一个是直接用root用户操作有潜在的权限问题,一个是一些必须的安装包,还有的是因为命令的选项不对。 对于这些错误我都了然于心,所以很自然的用到了下面的命令,但是在10g里面没有问题的命令在11g却抛出了下面的错误。 [ora11g@oel1 database]$ ./runInstaller -silent -responsefile /u02/install/11g_install/database/response/db_install.rsp -ignoreSysPrereqs  Starting Oracle Universal Installer... Checking Temp space: must be greater than 80 MB.   Actual 3590 MB    Passed Checking swap space: must be greater than 150 MB.   Actual 1994 MB    Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-10-11_04-04-39PM. Please wait ...[ora11g@oel1 database]$ [INS-10103] Response file is not specified for this session. Usage:  runInstaller  [-options] [(<CommandLineVariable=Value>)*] Where options include:   -clusterware oracle.crs,<crs version>           Version of Cluster ready services installed.   -crsLocation <Path>           Used only for cluster installs, specifies the path to the crs home location. Specifying this overrides CRS information obtained from central inventory.    -invPtrLoc <full path of oraInst.loc>           Unix only. To point to a different inventory location. The orainst.loc file contains: inventory_loc=<location of central inventory> inst_group=<>   根据提示信息是响应文件没有定义,然后给我列出了一些命令使用的帮助,对于此也着实花了一些时间去分析去排除。 首先是文件的权限,但是拷贝到一个很简单的目录下,权限都是正常读写,还是有这个错误。 自己都在怀疑是不是命令行中存在特殊字符导致的,但是把命令粘贴到文本中,手工逐个输入也还是同样的错误。 最后带着疑惑去网上查看,但是网上也没有相关的答案。 看来还是得靠自己了,于是我静下心来自己看看错误,首先这个命令的错误信息提示为: [INS-10103] Response file is not specified for this session. 那么是否是命令的格式定义不对呢,应该为-responsefile=/u02/install/11g_install/database/response/db_install.rsp? 查看提示的帮助内容,格式是没有问题的。   -responseFile <Path>           Specifies the response file and path to use. 但是反复比较发现还是因为一个大小写的F导致的,在11g里面这个参数为responseFile而不是10g里面的responsefile了。 明白了这点之后再次尝试,就非常顺利了。可以看到后台有一个进程在/tmp下忙碌着。 
  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                10229 ora11g    17   0  369m  77m  25m S  7.9  5.6   0:48.01 /tmp/OraInstall2015-10
短暂的等待之后,就会看到日志最后输出下面的内容
INFO: Successfully executed the flow in SILENT mode INFO: Finding the most appropriate exit status for the current application INFO: Exit Status is -3 INFO: Shutdown Oracle Database 11g Release 2 Installer
标志着静默安装已经结束。
这是一个很细小的例子,最开始发现的时候让人还是有些郁闷的,感觉就跟没有打招呼就修改了的感觉。可能是不同的team所做的参与的10g,11g这部分的工作,可能是认为responsefile不够清晰,
命名不够规范等等原因修改来了,同时这也算是一个小惊喜,自己通过这个例子还是发现很简单的一个地方,10g,11g都会有一些细小的差别,自己已经中招多次了,直接用10g的一些思路或者脚本在
11g碰到了一些问题,自己继续总结,把这些不同之处都扒一扒,也减少大家在使用中的一些困扰。

正文到此结束
Loading...