2 Using the Oracle Universal Installer in Silent Mode

This chapter describes how to use the Oracle Universal Installer from the command line.

This chapter includes the following sections:

2.1 Understanding Silent Installation

Silent installation eliminates the need to monitor your product installation because no graphical output is displayed and no input by the user is required.

Silent installation of your Oracle Fusion Middleware product is accomplished by using the -silent flag on the command line when you start the installer. In most cases, you will need to supply the location and name of a file containing certain variable and parameter values (for example, installation location). These are the values that would be asked for during a typical installation using the graphical user interface.

For Oracle Fusion Middleware products, this file is typically called a response file. For more information, see Section 2.2.

Note:

For UNIX users, if this is a first time installation of any Oracle product, you must create the oraInst.loc file before starting. Refer to Section 2.3.1 for more information.

Following installation of your product, you need to run the root.sh script as the root user. The root.sh script detects settings of environment variables and enables you to enter the full path of the local bin directory.

Note:

For Windows users, if this is a first time installation of any Oracle product, you must create the registry keys before starting. Registry key creation is described in Section 2.3.2.

2.2 Understanding Response Files

Before doing a silent installation, you must provide information specific to your installation in a response file (for example, the installation directory). The installer will fail if you attempt an installation using a response file that is not configured correctly. Response files are text files that you can create or edit in a text editor.

2.2.1 Creating a Response File

Oracle recommends creating a response file in the following manner:

  1. Run your product's graphical installer or deinstaller, as described in your product installation guide.

  2. For product installation, on the Installation Summary screen, click Save Response File to save your installation parameters to a response file.

    For product deinstallation, on the Deinstallation Summary screen, click Save Response File to save your deinstallation parameters to a response file.

    You will be prompted for a name and location where you want to create this response file. After it is created, you can use it exactly as-is to replicate the installation or deinstallation on other systems, or modify it as needed.

2.2.2 Sample Response Files

To see some sample response files that can be used for silent installation, see Appendix C.

The parameters that can be included in the response files are described in Section 2.2.3.

2.2.3 Editing Response File Parameters

This section describes the various parameters that can be included in a valid response file for the Oracle Universal Installer.

See Appendix C for some sample response files.

Table 2-1 Response File Parameters

Corresponding Screen Parameter Description

Installation Location

ORACLE_HOME

Location of the Oracle home directory.

Specify Security Updates

MYORACLESUPPORT_USERNAME

MYORACLESUPPORT_PASSWORD

Provide your My Oracle Support user name and password if you want to receive the latest product information and security updates.

DECLINE_SECURITY_UPDATES

Set this parameter to true if you want to decline receiving security updates. By default, this parameter is set to false.

SECURITY_UPDATES_VIA_MYORACLESUPPORT

If you specify values for MYORACLESUPPORT_USERNAME and MYORACLESUPPORT_PASSWORD, this parameter must be set to true.

PROXY_HOST

PROXY_PORT

PROXY_USER

PROXY_PWD

Provide the proxy server information if you use a proxy server in your environment.

COLLECTOR_SUPPORTHUB_URL

The URL of the Oracle Configuration Manager Repeater. The format is:

http://repeater_host:repeater_port

or

https://repeater_host:repeater_port

Installation Type

INSTALL_TYPE

Specify the type of install you want to perform. This value will differ depending on your product distribution.

For the WebLogic Server and Coherence distribution, the following install types are valid:

  • Coherence

  • WebLogic Server

  • Complete with Examples

For the Fusion Middleware Infrastructure distribution, the following install types are valid:

  • Fusion Middleware Infrastructure

  • Fusion Middleware Infrastructure With Examples

For the Oracle HTTP Server distribution, the following install types are valid:

  • Standalone HTTP Server (Managed independently of WebLogic server)

  • Colocated HTTP Server (Managed through WebLogic server)

Distribution to Deinstall

SELECTED_DISTRIBUTION

Specify the distribution you want to remove from the Oracle home.

This parameter is required if more than one distribution exists in the Oracle home from which the deinstaller program is started:

  • For the Oracle Fusion Middleware Infrastructure distribution, specify:

    WebLogic Server for FMW~12.1.2.0.0

  • For the Oracle WebLogic Server and Coherence distribution, specify:

    WebLogic Server~12.1.2.0.0

  • For Oracle HTTP Server, specify:

    Oracle HTTP Server~12.1.2.0.0


2.2.4 Securing Your Response Files for Silent Installation

Your response files contain certain passwords required by the installer. To minimize security issues regarding these passwords in the response file, follow these guidelines:

  • Set the permissions on the response files so that they are readable only by the operating system user who will be performing the silent installation.

  • If possible, remove the response files from the system after the silent installation is completed.

2.3 Performing Pre-Silent Installation Tasks

This section covers the pre-installation tasks that may be required before you are able to perform a silent installation.

The following topics are covered:

2.3.1 UNIX Users: Creating the oraInst.loc File

The Oracle inventory directory is used by the installer to keep track of all Oracle products installed on the computer. The inventory directory is stored in a file called oraInst.loc. If this file does not already exist on your system, you must create it before starting a silent installation. This file is used by the installer.

  1. Log in as the root user.

    prompt> su
    
  2. Using a text editor such as vi or emacs, create the oraInst.loc file in the directory of your choice. The contents of the file consist of the following two lines:

    inventory_loc=oui_inventory_directory
    inst_group=oui_install_group
    

    Replace oui_inventory_directory with the full path to the directory where you want the installer to create the inventory directory. Then, replace oui_install_group with the name of the group whose members have write permissions to this directory.

  3. Exit from the root user.

    # exit
    

2.3.2 Windows Users: Creating the Registry Key

If you have not installed any Oracle products on your computer, then you need to create the following Registry key and value:

HKEY_LOCAL_MACHINE / SOFTWARE / Oracle / inst_loc = [inventory_directory]

Replace Inventory_Directory with the full path to your installer files. For example:

C:\Program Files\Oracle\Inventory

2.4 Running the Oracle Universal Installer in Silent Mode

The full syntax for running the product installer from the command line is shown below:

java -jar distribution_name.jar [-mode] [-options] [(<CommandLinevariable=Value>)*]

To run the product installer in silent mode, use -silent mode and specify a response file:

java -jar distribution_name.jar -silent -responseFile file [-options] [(<CommandLinevariable=Value>)*]

Table 2-2 lists the valid command line parameters for silent installation.

Table 2-2 Installer Command Line Parameters

Parameter Description Version

Installation Modes - Only One Mode Can be Specified

-i

-install

Launches the installer in GUI mode. This is the default mode and is used if no mode is specified on the command line.

11g and 12c

-silent

Install in silent mode. The installer must be passed either a response file or command line variable value pairs.

11g and 12c

Installation Options

-help

--help

--usage

Displays the usage parameters for the runInstaller or setup.exe command.

NOTE: the --usage option is only valid for the runInstaller command on UNIX operating systems.

11g and 12c

-invPtrLoc file

Pointer to the inventory location file. Replace file with the full path and name of the oraInst.loc file.

11g and 12c

-response file

-responseFile file

Pointer to the response file. Replace file with the full path and name of the response file.

See Section 2.2 for information about creating the response files.

11g and 12c

-logLevel level

Specify the level of logging performed by the installer; all messages with a lower priority than the specified level will be recorded. Valid levels are:

  • severe

  • warning

  • info

  • config

  • fine

  • finer

  • finest

11g and 12c

-logFile file

Specify the name of the log file.

12c only

-debug

Obtain debug information from the installer.

11g and 12c

-force

Allow the silent installation to proceed in a non-empty directory.

11g and 12c

-printdiskusage

Log debugging information pertaining to disk usage.

11g and 12c

-printmemory

Log debugging information pertaining to memory usage.

11g and 12c

-printtime

Log debugging information pertaining to time usage. This command causes the timeTakentimestamp.log file to be created.

11g and 12c

-waitforcompletion

Windows only - the installer will wait for completion instead of spawning the Java engine and exiting.

NOTE: this option only works if the command is invoked from a script; for example, if a .bat file contains the setup.exe file with the -waitforcompletion option. This option will not work if invoked directly from the command line prompt.

11g and 12c

-noconsole

Messages will not be displayed to the console window.

11g and 12c

-ignoreSysPrereqs

Ignore the results of the system prerequisite checks and continue with the installation.

11g and 12c

-executeSysPrereqs

Execute the system prerequisite checks only, then exit.

11g and 12c

-paramFile file

The oraparam.ini file is an initialization file for the installer, and is contained inside the distribution .jar file and extracted when the installer is started.

The -paramFile parameter is used to override the default initialization file; for example, in the case where an update to the oraparam.ini file is needed and you are trying to use a customized local version of the file.

11g and 12c

-novalidation

Disables all validation checking performed by the installer.

11g and 12c

-nodefaultinput

For the GUI install, several screens have information or default values pre-populated. Specifying this option disables this behavior so that no information or values are pre-populated.

11g and 12c

-nocheckForUpdates

Disables all checking for updates.

12c only

-updatesDir location

Specify the directory where the latest updates should be downloaded. This parameter can be used in disconnected mode.

12c only

Command Line Variables

Installer Variables

Installer variables are specified using varName=value. For example, on a UNIX operating system:

ORACLE_HOME=/home/Oracle/Products/Oracle_Home

On a Windows operating system:

ORACLE_HOME=C:\Oracle\Products\Oracle_Home

11g and 12c

Session Variables

Session variables are specified using session:varName=value.

11g and 12c

Component Variables

Component variables are specified using session:compInternalName:[Version:]varName=value.

11g and 12c


2.4.1 Sample Silent Install Commands

If this is the first time you are installing on your system (meaning there is no pre-existing Oracle Inventory location), use the following command to perform a silent installation:

java -jar wls_121200.jar -silent -response file -invPtrLoc file

Below is a full example of this command, where the response file was created in the /home/exampleuser/response directory:

java -jar wls_121200.jar -silent -response /home/exampleuser/response/wls.rsp -invPtrLoc /home/exampleuser/oraInst.loc

If you have already installed an Oracle product on your system and do not need to specify an inventory location, then you can use a command similar to the following:

java -jar wls_121200.jar -silent -response file

Below is a full example of this command, where the response file was created in the /home/exampleuser/response directory:

java -jar wls_121200.jar -silent -response /home/exampleuser/response/wls.rsp

2.4.2 Sample Silent Install Output

Below is a sample output from a silent Oracle WebLogic Server and Coherence installation.

java -jar wls_121200.jar -silent -response /home/exampleuser/response/wls.rsp
Extracting files...................
Starting Oracle Universal Installer

Checking if CPU speed is above 300 MHz.   Actual 2526.998 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 10288440 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)
Checking temp space: must be greater than 300 MB.   Actual 44752 MB    Passed
 
 
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2013-04-02_10-32-26AM
Log: /home/exampleuser/oraInventory/logs/install2013-04-02_10-32-26AM.log
Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Expected result: One of enterprise-4,enterprise-5,enterprise-6,redhat-6,redhat-4,redhat-5,SuSE-10,SuSE-11
Actual Result: enterprise-5
Check complete. The overall result of this check is: Passed
CertifiedVersions Check: Success.
Verifying data......
Copying Files...
-----------20%----------40%----------60%----------80%-------100%
 
The installation of WebLogic Server 12.1.2.0.0 completed successfully.

2.5 Running the Oracle Universal Installer for Silent Deinstallation

To deinstall your Oracle Fusion Middleware product in silent mode, use the -silent mode from the command line. The full syntax for running the deinstaller from the command line is shown below:

./deinstall.sh -silent -responseFile file [-options] [(<CommandLinevariable=Value>)*]

Table 2-3 lists the valid command line parameters for silent installation.

Table 2-3 Deinstaller Command Line Parameters

Parameter Description Version

Deinstallation Options

-help

--usage

Displays the usage parameters for the runInstaller or setup.exe command.

NOTE: the --usage option is only valid for the runInstaller command on UNIX operating systems.

11g and 12c

-invPtrLoc file

Pointer to the inventory location file. Replace file with the full path and name of the oraInst.loc file.

11g and 12c

-response file

-responseFile file

Pointer to the response file. Replace file with the full path and name of the response file.

See Section 2.2 for information about creating the response files.

11g and 12c

-logLevel level

Specify the level of logging performed by the installer; all messages with a lower priority than the specified level will be recorded. Valid levels are:

  • severe

  • warning

  • info

  • config

  • fine

  • finer

  • finest

11g and 12c

-logFile file

Specify the name of the log file.

12c only

-debug

Obtain debug information from the installer.

11g and 12c

-force

Allow the silent installation to proceed in a non-empty directory.

11g and 12c

-printdiskusage

Log debugging information pertaining to disk usage.

11g and 12c

-printmemory

Log debugging information pertaining to memory usage.

11g and 12c

-printtime

Log debugging information pertaining to time usage. This command causes the timeTakentimestamp.log file to be created.

11g and 12c

-waitforcompletion

Windows only - the installer will wait for completion instead of spawning the Java engine and exiting.

NOTE: this option only works if the command is invoked from a script; for example, if a .bat file contains the setup.exe file with the -waitforcompletion option. This option will not work if invoked directly from the command line prompt.

11g and 12c

-noconsole

Messages will not be displayed to the console window.

11g and 12c

-ignoreSysPrereqs

Ignore the results of the system prerequisite checks and continue with the installation.

11g and 12c

-executeSysPrereqs

Execute the system prerequisite checks only, then exit.

11g and 12c

-paramFile file

The oraparam.ini file is an initialization file for the installer, and is contained inside the distribution .jar file and extracted when the installer is started.

The -paramFile parameter is used to override the default initialization file; for example, in the case where an update to the oraparam.ini file is needed and you are trying to use a customized local version of the file.

11g and 12c

-novalidation

Disables all validation checking performed by the installer.

11g and 12c

-nodefaultinput

For the GUI install, several screens have information or default values pre-populated. Specifying this option disables this behavior so that no information or values are pre-populated.

11g and 12c

-nocheckForUpdates

Disables all checking for updates.

12c only

-updatesDir location

Specify the directory where the latest updates should be downloaded. This parameter can be used in disconnected mode.

12c only

Command Line Variables

Installer Variables

Installer variables are specified using varName=value. For example, on a UNIX operating system:

ORACLE_HOME=/home/Oracle/Products/Oracle_Home

On a Windows operating system:

ORACLE_HOME=C:\Oracle\Products\Oracle_Home

11g and 12c

Session Variables

Session variables are specified using session:varName=value.

11g and 12c

Component Variables

Component variables are specified using session:compInternalName:[Version:]varName=value.

11g and 12c


2.5.1 Sample Silent Deinstall Commands

Below is an example silent deinstall command:

./deinstall.sh -silent -responseFile /home/exampleuser/wls_deinstall.rsp

Note that when you run the deinstallation program in silent mode, no messages are displayed indicating that the deinstallation is in progress or has completed successfully, even if errors are encountered.

You can include the -logFile and -logLevel parameters to create a verbose installation log. See Table 2-3 for more details about these parameters.

Below is an example silent deinstall command specifying FINE as the logging level. Singe -logFile is not specified, the deinstaller will use the default log file location (see Appendix E).

./deinstall.sh -silent -responseFile /home/exampleuser/wls_deinstall.rsp -logLevel FINE

2.5.2 Sample Silent Deinstall Output

Below is sample output from a silent Oracle WebLogic Server and Coherence deinstallation.

./deinstall.sh -silent -responseFile /home/exampleuser/wls_deinstall.rsp
Starting Oracle Universal Installer

Checking if CPU speed is above 300 MHz.   Actual 2526.998 MHz    Passed
Checking swap space: must be greater than 512 MB.   Actual 10288440 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)
Checking temp space: must be greater than 300 MB.   Actual 44752 MB    Passed
 
 
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2013-04-02_10-32-26AM
Log: /home/exampleuser/oraInventory/logs/install2013-04-02_10-32-26AM.log
Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
Reading response file..
Starting silent deinstallation...
-----------20%----------40%----------60%----------80%-------100%
 
The uninstall of WebLogic Server 12.1.2.0.0 completed successfully.