Installation Cookbooks: Installing Oracle9i

Tuesday Dec 30th 2003 by Steve Callan

In his new series, Installation Cookbooks, Steve Callan lays out a methodology for installing Oracle products on UNIX-based systems (primarily using Solaris).

When people talk about installing Oracle, more times than not they are referring to installing the program files for the relational database management system (RDBMS) application. Other people use the word Oracle somewhat loosely when referring to any Oracle product (e.g., Forms & Reports, Developer Suite, Application Server, etc.) to be installed. Whichever it is you are installing - the database software or an application from Oracle - understanding and applying an installation methodology will make your job easier.

This article, and others to follow in the Installation Cookbook series, will lay out a methodology or approach to installing Oracle products on UNIX-based systems (primarily using Solaris). Once you see several examples, you will be well-armed when it comes to the occasional egg Oracle lays in its installation documentation. On the whole, the work produced by the technical writers at Oracle, and the overall documentation effort, is really nothing less than superhuman, and the writers and publishers should be commended for their work. However, the sheer amount of documentation can appear overwhelming, especially to a new DBA who is charged with installing software on a server. And, once in a while, the documentation effort falls short (Oracle9iAS immediately comes to mind, as does Oracle9iDS).

Going back to the new DBA charged with installing Oracle software on a server - it is tempting for many in this situation to simply insert the first CD-ROM and go for it, especially if the operating system happens to be based on the Blue Screen of Death. Let's face it: installing software on Windows is pretty straightforward these days. But when it comes to UNIX-based systems, installing software can be an involved process (personal opinion time: the extra effort is worth it because UNIX is so much better). Installing Oracle products on UNIX-based systems should drive home the point that one needs to be knowledgeable of the underlying operating system. It isn't enough to know only Oracle, and being more self-sufficient adds to the value you bring to your current and future employers.

A general outline of installation steps

Instead of just plowing into the reading of a 300 page installation guide and several release notes, if you look for an outline of steps to follow, your comprehension of what must be done is increased. Listed below is a general outline of steps that corresponds to the chapters in most installation guides.

  1. Verify that hardware and software minimums are met or exceeded
  2. Prepare or update the operating system
  3. Create administrative/owner accounts and file structures
  4. Reserve, specify, or designate disk space
  5. Start the Oracle Universal Installer (OUI) and provide information as necessary
  6. Perform post-installation tasks
  7. Test your installation

The first four steps can be considered as pre-installation tasks, step five as THE installation task, and steps six and seven as post-installation tasks. When writing installation cookbooks (primarily for customers, but they work just as well for in-house users), I like to include an introduction along with a list of assumptions or standards, and include a list of references from which the information was drawn. The reference list is useful when you have to come back to the installation procedure and justify why you installed an OS patch cluster or needed to have a bigger disk installed.

So, without further ado, here is a detailed, step-by-step installation cookbook for installing Oracle9i ( on a Sun Solaris platform.

Installation Guide for Oracle Relational Database Management System

Enterprise Edition, Version, Release 2, for Sun SPARC Solaris


This document guides you through installing the server components of Oracle9i, Version, Release 2 on the Solaris 8 operating system. The installation is performed using Oracle's Oracle Universal Installer (OUI), a GUI-based tool similar to the OUI for Oracle8i and other Oracle products. This guide takes you through the pre-installation, installation, and post-installation tasks referenced in the Oracle9i Installation Guide dated May 2002 (Oracle Part No. A96167-01).

The following conventions are used in this installation guide:

  • oracle9 is the UNIX account owner of the Oracle files
  • oracle9 belongs to two groups - oinstall and dba (dba is the primary group)
  • apache is the name of owner of the Apache server, and apache is in the oinstall group. By default, the Apache server is installed along with the Oracle9i program files. Refer to http://httpd.apache.org for more information about the Apache web server and to Oracle documentation on applications that require the Apache server. Apache-related processes will start during the installation, and you will be directed to stop them later on in this guide.
  • The home directory created/used for oracle9 is /opt2/ora9201
  • The ORACLE_HOME path used in examples is /opt2/ora9201/app/oracle/product/
  • ORACLE_HOME for oracle9 is separate from any other ORACLE_HOME
  • ORACLE_HOME and the UNIX home directory for oracle9 is not the same thing. The home directory is where oracle9's .cshrc file is located and is the working directory when oracle9 first logs in. ORACLE_HOME refers to the directory path structure where Oracle files are located.
  • Text in courier, such as "cd $ORACLE_HOME" is text you explicitly type or enter, or identifies explicit values or names, such as the UNIX user "root."
  • <...> = anything between the angle brackets is user-supplied and varies from user to user. "#" represents the UNIX prompt on your workstation. "SQL>" is the SQL*Plus prompt on your workstation.
  • <mnt_pt> is a mount point where the start of the Oracle installation tree begins (e.g., /opt2/ora9201)
  • Oracle automatically creates a seed database when using the options you will be selecting later on. The db_name parameter used in this guide is test. This database can be deleted after the installation is complete.
  • All instructions to edit a file refer to using a text editor such as vi.
  • For installation on versions of Solaris 8 prior to February 2002, a patch cluster from Sun must be downloaded and installed prior to installing Oracle9i. The instructions for doing this are also covered in this guide.

More information can be found in the documents listed below:

  • Oracle9i Installation Guide, Release 2 ( for UNIX Systems: AIX-Based Systems, Compaq Tru64 UNIX, HP 9000 Series HP-UX, Linux Intel and Sun Solaris, dated May 2002 (Oracle Part No. A96167-01), and
  • Oracle9i Release Notes, Release 2 ( for Sun Solaris (64-bit), dated May 2002 (Oracle Part No. A97347-01).

System Requirements

The list below details the system requirements.

64-bit Support: As root, execute isainfo -v at a UNIX prompt. If you see the following output, your server supports 64-bit in addition to 32-bit applications.

	64-bit sparcv9 applications
	32-bit sparc applications

If you do not see the 64-bit line or receive a "Command not found" error, contact your UNIX system administrator and verify your intended server is 64-bit enabled.

Memory: 512MB of RAM to install the Oracle9i Server. To determine the memory on your workstation, see the example below:


	# /usr/sbin/prtconf | grep "Memory"
	Memory size: 512 Megabytes

Swap Space: amount of disk space equal to the system's physical memory, or 1GB, whichever is greater. df -k | grep swap will show available swap space in kilobytes (swap space may be on more than one device/disk).

Disk Space: 3.5GB for database software and 1GB for the seed database created during installation. Create the seed database as a means of confirming the Oracle program files work. If you do not want to keep it, delete the seed database to recapture the disk space.

Temporary Disk Space: Up to 400MB available in the /tmp directory or other location identified via environment variables (TEMP, TMPDIR). Execute df -k | grep tmp at a UNIX prompt to see how much space is available.

Operating System: This install guide covers the installation of Oracle9i only on Solaris 8. Execute uname -a at a UNIX prompt to verify the OS version (look for the "5.8" value).


Operating System Packages: The following OS packages must be installed.

Execute pkginfo -i <package name> at a UNIX prompt to see if a package has been installed. If a package has not been installed, contact your UNIX system administrator for assistance.

	SUNWarc     SUNWbtool   SUNWhea     SUNWlibm
	SUNWlibms   SUNWsprot   SUNWtoo

Font packages required for Java are SUNWilof (i-one-o-f, not i-"ell"-o-f) and SUNWxwfnt.

Required Executables: The following executables must be present in the /usr/ccs/bin directory: make, ar, ld, and nm.

CD-ROM Drive: You must have a CD-ROM drive capable of reading CD-ROM disks in the ISO 9660 format with RockRidge extensions (if you have successfully installed other Oracle products in the past with the CD-ROM drive you are planning to use for the installation of Oracle9i, then your drive meets this requirement).

Files edited or modified by the UNIX users root and oracle9

Kernel Parameters: Oracle9i requires certain kernel parameters to be modified, and the parameters are found in the /etc/system file. As root, make a backup copy of this file before making any changes. Add or modify the following parameters, using any higher values if they already exist on your system. These settings can be placed at the end of the file.

	set semsys:seminfo_semmni=100
	set semsys:seminfo_semmns=1024
	set semsys:seminfo_semmsl=256
	set shmsys:shminfo_shmmax=4294967295
	set shmsys:shminfo_shmmin=1
	set shmsys:shminfo_shmmni=100
	set shmsys:shminfo_shmseg=10

Port Designation: You may need to add an entry to the /etc/services file to reserve a port number (1521) regularly used by Oracle. If the entry is required, it looks like the line below (where listener_name is the name of the listener, which probably is listener ("listener" is the default name).

	listener    1521/tcp    #Oracle 	Net listener


As root at a UNIX prompt, execute reboot to reboot your system.

If this installation is the only installation of Oracle database program files on your server or machine, you will need to create two UNIX groups: oinstall and dba. A UNIX account called oracle9 will be the owner of the Oracle program files, and will have dba as its primary group.

Even if you have other Oracle products (such as Oracle 8.1.6 or Developer 6.0) installed on your system, you need to create the owner of the Oracle program files, and this UNIX account will be named oracle9 and have dba as its primary group (assuming dba already exists). Add the UNIX user oracle9 to the dba and oinstall groups in the /etc/group file. The owner of the Oracle 8.1.6 program files (or other Oracle products) may be called oracle8. It is important you do not use the same UNIX account name for the Oracle9i program files. Having and using different UNIX accounts helps differentiate who you are and what you can do with respect to the program files. For example, your Oracle 8.1.6 user called oracle8 should not remove any Oracle program files owned by oracle9, and vice versa.

Create a user called apache and assign apache to the apache and oinstall groups.

(Optional) If you are installing Forms & Reports 6i after the 9i installation is complete, you can create the 6i owner now. Otherwise, ignore the references to oradev6.

To add a user, you can use the admintool utility or manually enter the information (while logged in as root) into the /etc/passwd and /etc/group files. You may need to change the permissions on the passwd file so it becomes editable (chmod 644 /etc/passwd). The line entries to create oracle9 and the user called apache would look like this:

	oracle9:x:<id #>:<group #>::<home directory>:<startup shell>
	oradev6:x:<id #>:<group #>::<home directory>:<startup shell>
	apache:x:<id #>:<group #>::<home directory>:<startup shell>

As an example -


The line entries in /etc/group would look like this:


When all changes have been made, execute pwconv as root at a UNIX prompt. Create the mount point, establish a location for the starter database datafiles, and assign ownership for oracle9 by entering the following commands:

	# mkdir -p /opt2/ora9201
	# mkdir -p /opt2/oradata
	# mkdir -p /opt2/apache
	# mkdir -p /opt1/ora6i
	# chown oracle9:dba /opt2/ora9201
	# chown oracle9:dba /opt2/oradata
	# chown apache:apache /opt2/apache
	# chown oradev6:dba /opt1/ora6i

Log in as oracle9. Your file system may generate a default set of files (.cshrc, etc.) in the oracle9 home directory. If not, you can copy the .cshrc file from another Oracle account and edit it to reflect the settings you need for oracle9.

Using a text editor such as vi, edit the .cshrc file for oracle9. Modify the file so that the following settings and environment variables are set, and source the file (source .cshrc) when finished with the editing.

	umask 022
	setenv DISPLAY <your machine name>:0.0
	setenv ORACLE_TERM sun5
	setenv ORACLE_SID <name of your Oracle instance>
	setenv ORACLE_BASE /<mnt_pt>/app/oracle would be
	setenv ORACLE_BASE /opt2/ora9201/app/oracle
	setenv ORACLE_HOME $ORACLE_BASE/product/
	setenv TNS_ADMIN <location> 
	  (used if Oracle Net configuration files are not in any of the default locations)
	setenv PATH <should include $ORACLE_PATH, /usr/ccs/bin, 
	             /usr/bin, /etc, /usr/openwin, /usr/local/bin and .> 

Performing the installation

Insert CD 1 of 3 from the set of CD-ROMs titled

Database (64-bit)
Release 2 ( for Sun SPARC Solaris
CD 1 of 3 (the other two are 2 of 3 and 3 of 3)

and refer to the table below for actions to take in each window displayed by the Oracle Universal Installer. Minimize the File Manager window after the CD-ROM is mounted (Solaris Volume Manager mounts the CD-ROM for you). As the UNIX user oracle9, start the installation by typing /cdrom/disk1/runInstaller at a UNIX prompt. Do not navigate to /cdrom or /cdrom/disk1 or you will run into problems ejecting the CD-ROM from this shell window. Do not double click the runInstaller icon in the File Manager window - use the UNIX command line.

You may encounter other windows during the installation process for a variety of reasons (improper system setup, lack of file permissions, non-existent paths, etc.). The OUI windows are fairly self-explanatory as to what needs to be done to correct the problem.

In the windows that appear below, take the action(s) indicated.

Window Name/Display/Progress Bar

Action to take

Oracle Universal Installer: Welcome

Click Next.

Oracle Universal Installer: File Locations

Source path should be from the CD-ROM and Destination path should reflect your $ORACLE_HOME path. Enter a name for the ORACLE_HOME (ex: Ora9201_home). Click Next.

Product list progress bar appears

Wait for next window.

Oracle Universal Installer: Available Products

Select Oracle9i Database and click Next.

Oracle Universal Installer: Installation Types

Select Enterprise Edition (3.09GB) and click Next.

Progress bar appears

Wait for the next window.

Oracle Universal Installer: Database Configuration

Select General Purpose and click Next.

Progress bar continues

Wait for next window.

Oracle Universal Installer: Database Identification

Enter the same value as the SID shown at the bottom of the window for the seed database

(ex: test) and click Next. You do not have to enter a domain name at this time (so the Global Database Name = SID).

Oracle Universal Installer: Database File Location

Enter the location for your database files

(ex: /opt2/oradata) and click Next. If possible, set a location other than the disk where the program files are being installed.

Oracle Universal Installer: Database Character Set

Use the default character set as shown and click Next.

Progress bar continues

Wait for the next window.

Oracle Universal Installer: Summary

Scroll down and expand the list if you want to see what will be installed. Otherwise, click Install.

Oracle Universal Installer: Install

window appears with a progress bar

Wait for instructions to mount the other two CD-ROMs. At the Disk Location window, change the path to /cdrom/disk2/ for CD #2 (/cdrom/disk3/ for CD #3) and click OK to continue the process. If an error related to oracle.swd.jre appears, click Ignore. See Troubleshooting Tips later to fix this.

Setup Privileges

Run the root.sh script as root in a separate shell window as directed. Oracle recommends that you make a backup copy of this file after running it. Return to the Setup Privileges window and click OK.

Oracle Net Configuration Assistant

Oracle Database Configuration Assistant

When prompted, enter passwords for sys and system. For JRE-related assistant errors, see Troubleshooting Tips section at the end of this guide. Do not enter Password Management.

Oracle Universal Installer: Configuration Tools

Click Next.

Oracle Universal Installer: End of Installation

(eject the last CD when finished)

Note the HTTP server information if you need it. Otherwise, click Exit and click Yes at the Exit window. Exit the OEM Console if it starts.

Post-installation tasks

1. If necessary, modify the Oracle Net configuration files (tnsnames.ora, listener.ora, and sqlnet.ora) found in $TNS_ADMIN (if you specified that variable) or $ORACLE_HOME/network/admin (typically the primary default location).

2. Log in as oracle9 and at a UNIX prompt, reload (or start, if not already running) the listener by typing lsnrctl reload (or lsnrctl start) to register the instance with the listener. The value "test" (or the name you used for the seed database) should appear in the output (part of a sample output is shown below).

Service "test" has 1 instance(s).
  Instance "test", status READY, has 1 handler(s) for this service...

At this point, you should be able to start a SQL*Plus session. Verify that you can connect as sysdba. At a UNIX prompt, enter

	# sqlplus /nolog

followed by

	SQL> connect / as sysdba

Connecting as sysdba is how you need to connect to the database when performing startup and shutdown because Oracle9i no longer supports the use of Server Manager (the svrmgrl utility found in earlier releases of Oracle). See Troubleshooting Tips if you cannot connect as sysdba.

Once you are satisfied you can connect to the seed database locally and across your network (by testing a connection to the server from a remote client), you can shutdown the instance and delete the database files to recover the disk space. You can also delete the control files and redo log files.

3. If you do not need the Apache web server, stop the Apache server by executing

# $ORACLE_HOME/Apache/Apache/bin/apachectl stop

Installing Solaris OS Patches

If you are using a version of Solaris 8 that does not have Sun kernel patch 108528-15 or higher, or if your company requires the latest Solaris OS patch as a matter of policy, follow the steps in this section. The output from uname -a will show the patch level of 108528.

$ uname -a
SunOS stecal 5.8 Generic_108528-15 sun4u sparc SUNW,Ultra-5_10

Sun recommends you download and install a Sun recommended patch cluster for Solaris 8 ("Solaris 8 Recommended Patch Cluster") and have patch 108528-15 (or higher) installed as part of the cluster (see http://sunsolve.sun.com). Download the patch cluster for Solaris 8 (not "8 x86") and unzip the files. The files can be unzipped anywhere on the file system where your UNIX user root has access. The install script that comes with the cluster will place the patches in their proper locations. You need approximately 75.5MB of disk space for the download (as of Dec 4, 2002).

After unzipping the download in the <patch cluster directory>, at a UNIX prompt as root run the install cluster script.

	# cd <patch cluster directory> 
	# ./install_cluster 

By default, a message warning the user to check for minimum disk space allowance will appear and allow the user to abort if inadequate space exists. The progress of the script will be displayed on your terminal. It should look something like:

	# ./install_cluster 
	Patch cluster install script for <cluster name> 
	Determining if sufficient save space exists... 
	Sufficient save space exists, continuing... 
	Installing patches located in <patch cluster directory> 
	Installing <patch-id> 

To confirm that patch 108528-17 (where -17 is the latest patch version) was installed, execute showrev -p | grep 108528-17 at a UNIX prompt. If the patch does not appear, check the install log at

/var/sadm/install_data/<cluster name>_log

There may be two patches in the cluster that do not install (110723-03 and 109951-01), but their absence does not matter. If you experience problems while installing patches, contact your UNIX systems administrator for assistance.

When the install cluster process is finished, reboot the system. You will also need to reboot the system after kernel parameters have been changed, and you can wait until then to reboot.

Troubleshooting Tips

Problem: GUI-based tools such as Database Configuration Assistant fail to run ($ORACLE_HOME/JRE/bin/jre not found message appears when using the OUI)

Description: A Java component (oracle.swd.jre) did not install properly.

Solution: Continue the installation without running the Database Configuration Assistant or Oracle Net Configuration Assistant. Exit the installation process when everything else is finished. Re-insert CD #1 and wait for the Oracle Universal Installer: Welcome window to appear. Open a separate shell window, login as oracle9, and issue the following commands at the UNIX prompt:

	# cd /tmp/OraInstall/jre
	# cp -r * $ORACLE_HOME/JRE

Confirm the bin and lib directories were created in $ORACLE_HOME/JRE. The /tmp/OraInstall directory is automatically created and deleted during the installation process. Re-starting the OUI creates the necessary files you can copy to $ORACLE_HOME/JRE. As oracle9 at a UNIX prompt, you can type dbca and netca to start the two assistants and run them outside of the installation process. dbca and netca are found in $ORACLE_HOME/bin.

Problem: You cannot connect as sysdba, and receive ERROR ORA-01031: insufficient privileges

Description: Your user privileges need to be adjusted. On a local machine, connect / as sysdba will work in virtually all cases as this command string replaces connect internal, which Oracle9i does not support. You should be able to perform a connect system/manager as sysdba on the server (do not include the @<net service name> part of the string). You may encounter the ORA-01031 error if you use connect system/manager@<net service name>.

Solution: Refer to the following items for information on how to resolve this error:

  • Doc Id 50508.1 on MetaLink,
  • Doc Id 50507.1 on MetaLink, or
  • Oracle9i Database Administrator's Guide, Release 2 (9.2), dated March 2002 (Oracle Part No. A96521-01), starting on page 1-13 (PDF version) in the section titled, "Database Administrator Authentication."

» See All Articles by Columnist Steve Callan

Mobile Site | Full Site