二、静默安装10.2.0.5.0 Patch Set Release(PSR)
--解压安装包 [oracle@prod /u01]$ unzip p8202632_10205_LINUX.zip [oracle@prod /u01]$ cd /Disk1/response [oracle@prod response]# ll total 28 -rwxr-xr-x 1 root root 27919 Oct 20 2009 patchset.rsp --修改响应文件patchset.rsp [oracle@prod response]# vi patchset.rsp 修改以下内容: UNIX_GROUP_NAME=oinstall ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 ORACLE_HOME_NAME=OraDb10g_Home1
OUI_HOSTNAME=prod --注意,刚才静默安装数据库软件时,对应的参数名为ORALCE_HOSTNAME,注意区别!
可以发现,PSR的参数要比OARACLE软件的参数少许多
如果忘记ORACLE_HOME_NAME的名字,可以查看$ORACLE_BASE/oraInventory/ContentsXML/inventory.xml文件的内容:
[oracle@prod ~]$ cd $ORACLE_BASE/oraInventory/ContentsXML [oracle@prod ContentsXML]$ ll total 12 -rw-rw---- 1 oracle oinstall 264 Aug 29 14:52 comps.xml -rw-rw---- 1 oracle oinstall 415 Aug 29 14:52 inventory.xml -rw-rw---- 1 oracle oinstall 274 Aug 29 14:52 libs.xml [oracle@prod ContentsXML]$ cat inventory.xml[oracle@prod ContentsXML]$ --开始静默安装patch [oracle@prod response]$ cd .. [oracle@prod Disk1]$ ./runInstaller -silent -responseFile ./response/patchset.rsp ... OUI-10203:The specified response file './response/patchset.rsp' is not found. Make sure that the response file specified exists and you have read privileges to this file. 10.2.0.1.0 2.1.0.6.0
这里必须指定绝对路径,否则会提示找不到rsp文件
[oracle@prod Disk1]$ ./runInstaller -silent -responseFile /u01/Disk1/response/patchset.rsp ... SEVERE:OUI-10029:You have specified a non-empty directory to install this product. It is recommended to specify either an empty or a non-existent directory. You may, however, choose to ignore this message if the directory contains Operating System generated files or subdirectories like lost+found. 由于和之前ORACLE_HOME路径相同,会报OUI-10029,加上-force参数可以忽略这个问题 [oracle@prod Disk1]$ ./runInstaller -silent -responseFile /u01/Disk1/response/patchset.rsp -force
然后会提示没有设置MOS账号,静默安装终止
SEVERE:Values for the following variables could not be obtained from the command line or response file(s): MYORACLESUPPORT_USERNAME(MyOracleSupportUsername) Silent install cannot continue. --再次修改patchset.rsp MYORACLESUPPORT_USERNAME=abc@oracle.com --填写一个不存在的账号,欺骗安装程序 DECLINE_SECURITY_UPDATES=ture [oracle@prod Disk1]$ ./runInstaller -silent -responseFile /u01/Disk1/response/patchset.rsp -force SEVERE:Unable to establish a network connection to Oracle. If your systems require a proxy server for outbound internet connections, enter the proxy server details. If network connectivity to Oracle is not possible, set 'DECLINE_SECURITY_UPDATES' to 'true'.
此时其实已经设置了DECLINE_SECURITY_UPDATES=ture,但不知为何安装程序识别不到,必须在命令行中带上这2个参数才行!
[oracle@prod Disk1]$ ./runInstaller -silent -responseFile /zlm/Disk1/response/