Install db in silent mode

pentium發表於2013-03-29
First, please remember that the most difficult part is not this installation, but the preparation for this installation, like checking the hardware requirements, software requirements, and tunning the kernel parameters.
Second, Oracle11g Release2 adopts different response file than Oracle10g and Oracle11g Release1.
Third, the silent installation is easy, just a piece of cake! :)
[@more@]
You can install the Oracle Database software with/without response file in silent mode.
----Without response file installation----
10.2.0.X
UNIX
$ cd /mount/dvd/database
$ ./runInstaller -silent -force -debug
FROM_LOCATION="/mount/dvd/database/stage/products.xml"
ORACLE_HOME="/u01/app/oracle/product/10.2.0/db_1"
ORACLE_HOME_NAME="Ora10gDb1"
TOPLEVEL_COMPONENT='{"oracle.server","10.2.0.1.0"}'
INSTALL_TYPE="EE" n_configurationOption=3
Windows
> cd Y:database
> setup.exe -silent -force -debug FROM_LOCATION="Z:databasestageproducts.xml" ORACLE_HOME="D:apporacleproduct10.2.0db_1" ORACLE_HOME_NAME="Ora10gDb1" TOPLEVEL_COMPONENT={"oracle.server","10.2.0.1.0"} INSTALL_TYPE="EE" n_configurationOption=3
Note: Oracle10g Release2 runInstaller does not support ORACLE_BASE parameter, so you have to set it as:
export ORACLE_BASE='...'
INSTALL_TYPE="EE" --&gt Enterprise Edition, you can find other types from the response file sample in the installation packages.
n_configurationOption=3 --&gt Software Installation Only
11gR1
Unix
$ cd /mount/dvd/database
$ ./runInstaller -silent -force -debug
FROM_LOCATION="/mount/dvd/database/stage/products.xml"
ORACLE_HOME="/u01/app/oracle/product/11.1.0/db_1"
ORACLE_HOME_NAME="Ora11gDb1" ORACLE_BASE="/u01/app/oracle"
TOPLEVEL_COMPONENT='{"oracle.server","11.1.0.6.0"}'
INSTALL_TYPE="EE" n_configurationOption=3
Windows
> cd Z:database
> setup.exe -silent -force -debug FROM_LOCATION="Z:databasestageproducts.xml" ORACLE_HOME="D:apporacleproduct11.1.0db_1" ORACLE_HOME_NAME="Ora11gDb1" ORACLE_BASE="D:apporacle" TOPLEVEL_COMPONENT={"oracle.server","11.1.0.6.0"} INSTALL_TYPE="EE" n_configurationOption=3
11gR2
$ cd /11gR2/database
$ ./runInstaller -silent -debug -force
FROM_LOCATION=/11gR2/database/stage/products.xml
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oracle/oraInventory
ORACLE_HOME=/u01/app/oracle/product/11201/db_1
ORACLE_HOME_NAME="OraDb11g_Home1"
ORACLE_BASE=/u01/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.isCustomInstall=false
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
DECLINE_SECURITY_UPDATES=true
Note:
"DECLINE_SECURITY_UPDATES=true" causes the Install of the OCM component but does not do the OCM configuration.
If user wants to configure the OCM along with Database Silent Installation, then the following parameters need to be included to the above command:
MYORACLESUPPORT_USERNAME=
SECURITY_UPDATES_VIA_MYORACLESUPPORT=true
MYORACLESUPPORT_PASSWORD=
If direct connection is not possible, then following proxy connection details are required additionally
PROXY_HOST=
PROXY_PORT=
PROXY_USER=
PROXY_PWD=
DECLINE_SECURITY_UPDATES=false
----With response file installation----
How to generate the response file?
Two ways, one is using the OUI:
setup -record -destinationFile (on Windows)
./runInstaller -record -destinationFile (on UNIX)
Finally, note that the -record option applies only to the 10gR1 (also used for 9.2.0.5-8)
through 11gR1 OUI versions; starting with 11gR2, OUI automatically records responses
and prompts for a filename to save to at the Summary screen,
Maybe you will have to add other parameters as needed, like '-ignoreSysPrereqs':
./runInstaller -ignoreSysPrereqs -record -destinationFile '/home/oracle/10gR2.rsp'
A sample using OUI for your reference:
[Oracle11g Release2 (EE SoftwareOnly), just the differences with the original response file sample]
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=sles10.site
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/oracle/oraInventory
SELECTED_LANGUAGES=en
ORACLE_HOME=/oracle/product/11.2.0
ORACLE_BASE=/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.EEOptionsSelection=false
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
oracle.install.db.isRACOneInstall=false
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.memoryOption=false
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=true
oracle.install.db.config.starterdb.control=DB_CONTROL
oracle.install.db.config.starterdb.automatedBackup.enable=false
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
oracle.installer.autoupdates.option=SKIP_UPDATES
The other is using the sample file:
Select which edition you'll install, then copy and modify the corresponding sample file(below sample for Oracle10g):
UNIX_GROUP_NAME=dba
ORACLE_HOME=/bustools/oracle/product/10.2.0
ORACLE_HOME_NAME="10g_home1"
ORACLE_HOSTNAME=sg2as136
SELECTED_LANGUAGES={"en"}
n_configurationOption="SoftwareOnly" or n_configurationOption=3
s_nameForOPERGrp=dba
s_nameForDBAGrp=dba
Note: Oracle10g Release2 runInstaller does not support ORACLE_BASE parameter, so you have to set it as:
export ORACLE_BASE='...'
Install the database using modified response file:
$ /directory_path/runInstaller [-silent] [-noconfig] -responseFile responsefilename
[-paramFile oraparamsilent.ini]
In this example:
■ directory_path is the path of the "database" directory on the DVD or the
path of the "Disk1" directory on the hard drive.
■ -silent indicates that you want to run Oracle Universal Installer in silent
mode.
■ -noconfig suppresses running the configuration assistants during
installation, and a software-only installation is performed.
responsefilename is the full path and file name of the installation response
file that you configured.
■ The optional -paramFile option specifies an alternative parameter file
(oraparamsilent.ini) that you can use when performing silent
installations. This alternative parameter file does not include checks for CDE
or X Window System software patches for Solaris.
When the installation completes, you'll get prompt that you should run the root.sh script as root user:
$ su
# /oracle_home_path/root.sh
----Patch Installation----
10.2.0.X
UNIX
$ cd /oracle/Patches/10.2.0.4/Disk1
$ ./runInstaller -ignoreSysPrereqs -silent -force -debug
FROM_LOCATION="/busdata/rvpv/acj0/oracle/source/Disk1/stage/products.xml"
ORACLE_HOME="/bustools/oracle/product/10.2.0"
ORACLE_HOME_NAME="10g_home1"
TOPLEVEL_COMPONENT='{"oracle.patchset.db","10.2.0.3.0"}'
-------------------------------------------------
Goal
Assistance for customers installing patchsets using the OUI in interactive mode using a response file and do not wish to be prompted for OCM installation information.
Solution
The command line will look like:
runInstaller -ignoreSysPrereqs -responseFile .rsp
If the -silent option is used then the dialogs won't be shown.
When the " runInstaller -ignoreSysPrereqs -responseFile .rsp" command is used then it will perform an interactive install by using the values from the response file. If the person doing the install does not want to be prompted for OCM configuration, then they need to add to the response file the line:
b_supressRegistration=true
------------------------------------------------
Windows
> cd Z:patches10.2.0.4Disk1
> setup.exe -silent -force -debug FROM_LOCATION="Z:patches10.2.0.4Disk1stageproducts.xml" ORACLE_HOME="D:apporacleproduct10.2.0db_1" ORACLE_HOME_NAME="Ora10gDb1" TOPLEVEL_COMPONENT={"oracle.patchset.db","10.2.0.4.0"}
11.1.0.X
Unix:
./runInstaller -silent -force -debug
FROM_LOCATION="/work/orasoft/Disk1/stage/products.xml"
ORACLE_HOME="/u01/oracle/product/11.1.0"
ORACLE_HOME_NAME="11gR1_home"
TOPLEVEL_COMPONENT='{"oracle.patchset.db","11.1.0.7.0"}'
DECLINE_SECURITY_UPDATES=TRUE
Windows
> cd Z:patches11.1.0.7Disk1
> setup.exe -silent -force -debug FROM_LOCATION="Z:patches11.1.0.7Disk1stageproducts.xml" ORACLE_HOME="D:apporacleproduct11.1.0db_1" ORACLE_HOME_NAME="Ora11gDb1" TOPLEVEL_COMPONENT={"oracle.patchset.db","11.1.0.7.0"} DECLINE_SECURITY_UPDATES=TRUE
----Deinstallation----
UNIX
$ ./runInstaller -silent -debug -deinstall
DEINSTALL_LIST='{"oracle.server","10.2.0.1.0"}'
REMOVE_HOMES={"/u01/app/oracle/product/10.2.0/db_1"}
$ ./runInstaller -silent -debug -deinstall
DEINSTALL_LIST='{"oracle.server","11.1.0.6.0"}'
REMOVE_HOMES={"/u01/oracle/product/11.1.0"}
Windows
> setup.exe -silent -debug -deinstall DEINSTALL_LIST={"oracle.server","10.2.0.1.0"} REMOVE_HOMES={"D:apporacleproduct10.2.0db_1"}
11gR2
% cd $ORACLE_HOME/deinstall
% deinstall -checkonly -o
Note: Use the deinstall tool carefully, I encountered following issue:
Oracle 11gR2 Database server 64bit and Oracle 11gR2 Client 32bit in Windows 2008 R2, I want to deinstall the Oracle11gR2 client software, while the deinstall tool remove both the 64bit server and 32bit client software!

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/14377/viewspace-1060349/,如需轉載,請註明出處,否則將追究法律責任。

相關文章