Tuesday, October 6, 2015

Installing Oracle using a response file

Another day, another task that I haven't had to do for ages.

I was asked to install Oracle (Standard Edition, but that's not important) onto a unix host, so copied the files, fired up my X-windows server (I use MobaXterm, it can run off a USB), logged into the host, set the DISPLAY variable and ran ./runInstaller.

And nothing happened for a while until this:

Checking monitor: must be configured to display at least 256 colors
    >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set.    Failed <<<<

I figured it could be the firewall rules on my PC which I don't have admin rights on.

After trying a few things I decided it wasn't going to work, so looked at running the install in silent mode with a response file, something I haven't done for a while.

There are sample response files in the directory where the software was extracted:

/comms/oracle/orabackup/software/database/response

The install one is called

db_install.rsp

I copied that as a backup and moved it to the parent directory.

The instructions are really good, although there are a couple of things that caught me out.

Edit the file and scroll through, making the appropriate changes.

These are the options I changed:

oracle.install.option=INSTALL_DB_SWONLY

ORACLE_HOSTNAME=hostname_goes_here

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/comms/oracle/oraInventory

SELECTED_LANGUAGES=en

ORACLE_HOME=/comms/oracle/product/11.2.0.2/cmssse

ORACLE_BASE=/comms/oracle/product

oracle.install.db.InstallEdition=SE

oracle.install.db.EEOptionsSelection=false

oracle.install.db.DBA_GROUP=dba

oracle.install.db.config.starterdb.type=GENERAL_PURPOSE


I didn't want to create a database at the time of install, so left all the stuff about the starter database blank or default, then carried on with the changes.

MYORACLESUPPORT_USERNAME=someone@somewhere.com

MYORACLESUPPORT_PASSWORD=xxxxxxxxxxxx


The rest I left alone.

The ones that caught me out were the ORACLE_BASE - it was the same as the user home directory and the installer objected to that so I changed it in the file.

It also needs something in the MYORACLESUPPORT fields - even though the host can't connect to the outside world, the installer failed when I left it blank.

Once the file had been saved, but before I ran the installer, I backed up the existing oraInventory directory just in case things went pear-shaped.

Then I ran the command (this is all on one line):

./runInstaller -silent -noconfig -responseFile /comms/oracle/orabackup/software/database/db_install.rsp
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 3302 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 49359 MB    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-10-07_01-28-05AM. Please wait ...


It didn't take long, and then prompted for root.sh to be run:

As a root user, execute the following script(s):
        1. /comms/oracle/product/11.2.0.2/cmssse/root.sh

Successfully Setup Software.

I checked the new ORACLE_HOME location and all the binaries were there, so it looked as if it worked OK.

Next thing I did was to create a dummy database to make sure it was all good.