Oracle 9i (9.0.1) installation on Red Hat Linux 7.2

Oracle 9i (9.0.1) installation on Red Hat Linux 7.2
Installation of Oracle 9i server on Redhat 7.2 is the same as on Redhat 7.1, except for some really strange behaviour I experienced when the Database configuration assistant (dbca) was invoked, both as part of installation and later when I tried to invoke it manually. This combination is not certified by Oracle, therefore installation problems were to be expected.

Contents
1. Things you need before you start
2. Unpacking downloaded installation files
3. Installation procedure
4. the Database configuration assistant
5. Starting the database for the first time
5.1 Starting the database
5.2 Shutting down the database
Notes on memory usage
1. Things you need before you start
jdk-1.1.8_v3 - Blackdown Linux port of Sun's Java Development Kit
Get it at www.blackdown.org
binutils-2.10.0.18-1
This is binutils package shipped with RedHat 7.0. You can find it on RedHat 7.0 installation CD, or at the RH site: ftp://ftp.redhat.com/pub/redhat/ ... .10.0.18-1.i386.rpm
2. Unpacking downloaded installation files
If you downloaded database installation files from Oracle site (Linux9i_Disk1.cpio.gz, Linux9i_Disk2.cpio.gz and Linux9i_Disk3.cpio.gz) gunzip them somewhere and you'll get three .cpio files.
Unpacking them as described in Oracle documentation won't work (at least it didn't work for me and I have GNU cpio version 2.4.2), so use:

# cpio -idmv<Linux9i_Disk1.cpio
# cpio -idmv<Linux9i_Disk2.cpio
# cpio -idmv<Linux9i_Disk3.cpio

Now you should have three directories (Disk1, Disk2 and Disk3) containing installation files.
3. Installation procedure
Install jdk-1.1.8_v3.
According to jdk documentation, install jdk under /usr/local. Now you should create symbolic link to the jdk because oracle expects to find it under /usr/local/java:
# ln -s /usr/local/jdk118_v3 /usr/local/java
Now you should downgrade your binutils to the version 2.10.0.18-1, shipped with RedHat 7.0:

# rpm -Uvh --force --nodeps binutils-2.10.0.18-1.i386.rpm
Create user oracle and dependent groups:
# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba oracle
# passwd oracle
Create user that apache with primary group oinstall:
# groupadd apache
# useradd -g oinstall -G apache  apache
# passwd apache
Create directories in which database files will reside. Oracle recommends OFA - Optimal Flexible Architecture (see oracle installation guide), but in this example everything will be installed under /home/oracle:
# mkdir /home/oracle/product
# mkdir /home/oracle/product/9.0.1
# chown -R oracle.oinstall /home/oracle/*
# mkdir /var/opt/oracle
# chown oracle.dba /var/opt/oracle
Now login as user oracle and put the following lines at the end of your .bash_profile:
#oracle 9i
export ORACLE_HOME=/home/oracle/product/9.0.1
export ORACLE_BASE=/home/oracle
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORACLE_TERM=xterm
export PATH=$PATHORACLE_HOME/bin:/usr/local/java/bin
export TNS_ADMIN=$ORACLE_HOME/config

# change this NLS settings to suit your taste
# or don't put anything and fall back to
# american NLS settings
export NLS_LANG='croatian_croatia.ee8iso8859p2'
export NLS_SORT=xcroatian


if [ -z $LD_LIBRARY_PATH ]
then
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib
else
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATHORACLE_HOME/lib
fi
if [ -z $CLASSPATH ]
then
    CLASSPATH=$ORACLE_HOME/JREORACLE_HOME/jlibORACLE_HOME/rdbms/jlib
    CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
    export CLASSPATH
else
    CLASSPATH=$CLASSPATH:$ORACLE_HOME/JRE:$ORACLE_HOME/jlib
    CLASSPATH=$CLASSPATH:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
    export CLASSPATH
fi

Since I am from Croatia, I use Croatian national language support (NLS_LANG, NLS_DATE_LANGUAGE, NLS_SORT and NLS_DATE_FORMAT). You should set these variables to suit your needs. Note that all other variables defined here are mandatory.
Listing of valid Oracle NLS Data parameters including supported languages, territories and storage character sets can be found here.

Now .bash_profile should be executed in order to initialize these variables:
$ source /home/.bash_profile
or just log off and than back on as user oracle.
If you use some shell other than bash (tcsh, sh, ...) these variables should be set according to syntax of your shell and put in script that automatically executes at user login.
Oracle installer MUST be run from Xwindows by user oracle.
Start Xwindows and from terminal window and start the installer:
$ /wherever/you/unpacked/it/Disk1/runInstaller
or (if you have the CD set):
$ /mnt/cdrom/runInstaller
4. the Database Configuration Assistant
After install and relink, oracle installer first runs Network configuration assistant. The 'use tipical configuration' is a safe bet. Then comes configuring and starting of Apache web server which is done with no user input. This should work, but if you experience any problems, you may try to temporarilly shut down your Apache server if you have one running).
Now comes the interesting part, the dbca. On step 2 of 8 page I picked the General purpose template which includes pre-configured database files.
Procede in choosing your configuration until you come to Step 6 of 8: Initialization parameters (snapshot available).
The thing is that when I pressed 'Next' button, the Database Configuration Assistant filled up all the available memory and crashed. In second attempt (well, actually it was more like tenth), instead of clicking 'Next' I clicked 'Finish' and this time installation went on.
Now I got to the 'Summary' page (snapshot available).
I waited for some time for Database template to load but nothing showed up, so I just clicked 'OK' and, surprisingly, installation went on.
Now that your installation has completed, you should reinstall the original binutils from Redhat 7.2 distribution:

[root@marvin ora9]# rpm -Uvh binutils-2.11.90.0.8-9.i386.rpm
5. Starting the database for the first time
5.1 Starting the database
In .bash_profile (if you use bash shell) for user oracle add variable ORACLE_SID=your_database_instance. Default value for instance is ORCL, so your line would look like this:
export ORACLE_SID=ORCL
Now we should set this variable for current session:
$ export ORACLE_SID=ORCL
alternatively, you can log off and than back on.
Now open /etc/oratab with your favorite editor, and make sure that it contains the following line:
orcl:/home/oracle/product/9.0.1:Y
(you should replace 'orcl' with the name of your instance)
Let's actually start the database now:
$ dbstart
Or you can do it the other way:

[ora9@marvin ora9]$ sqlplus /nolog

SQL*Plus: Release 9.0.1.0.0 - Production on Pon Stu 19 23:02:05 2001

(c) Copyright 2001 Oracle Corporation.  All rights reserved.

SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area  235693104 bytes
Fixed Size                   279600 bytes
Variable Size             167772160 bytes
Database Buffers           67108864 bytes
Redo Buffers                 532480 bytes
Database mounted.
Database opened.
SQL> select sysdate from dual;

SYSDATE
--------
19.11.01

SQL> select * from scott.dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.0.1.0.0 - Production
With the Partitioning option
JServer Release 9.0.1.0.0 - Production
[ora9@marvin ora9]$
5.2 Shutting down the database
To shut down the database use:
$ dbshut
or through the SQL*PLUS:
[ora9@marvin ora9]$ sqlplus /nolog

SQL*Plus: Release 9.0.1.0.0 - Production on Pon Stu 19 23:12:36 2001

(c) Copyright 2001 Oracle Corporation.  All rights reserved.

SQL> connect / as sysdba
Connected.
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.0.1.0.0 - Production
With the Partitioning option
JServer Release 9.0.1.0.0 - Production
[ora9@marvin ora9]$
Notes on memory usage
I have 256M RAM, and 450M swap partition. First time I tried installing 9i I ran completely out of memory, so I had to add more swap space on the run. Here's a little tip how to do it in the times of need ;)
First, make a file that will act as additional swap space, let's say about 300 Megs:
# dd if=/dev/zero of=tempswap bs=1k count=300000
Now we should change the file permissions:
# chmod 600 tempswap
Finally we format the "partition" as swap and add it to swap space:
# mke2fs tempswap
# mkswap tempswap
# swapon tempswap
My actual configuration
Here are the actual values I used, just so you don't get confused with the SQL*plus output:
Oracle account: ora9
ORACLE_HOME: /public/ora9/product/9i
ORACLE_SID: orcl9
My linux box is an AMD Athlon, 700MHz, 256M RAM, Kernel 2.2.14, Redhat linux 7.2 with all available updates to date (including glibc-2.2.4-19)