静默方式安装10g数据库软件+升级patch+手工建库(六)

2015-02-03 03:52:09 · 作者: · 浏览: 76
nfiguration tools after exiting the OUI. The installation of Oracle Database 10g was successful. Please check '/u01/app/oracle/oraInventory/logs/silentInstall2014-08-29_02-39-21PM.log' for more details. --另外开启一个session,分别执行orainstRoot.sh和root.sh脚本 [root@prod oracle]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory to 770. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete [root@prod oracle]# /u01/app/oracle/product/10.2.0/db_1/root.sh 略……

二、静默安装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





10.2.0.1.0
2.1.0.6.0





[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.

这里必须指定绝对路径,否则会提示找不到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/