Home -> oracle -> Oracle 9i (9.0.1) on RedHat 7.1

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

This documment provides quick installation guide for Oracle 9i release 1 on Redhat Linux 7.1.

1. Things you need before you start

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 NLS_LANG='croatian_croatia.ee8iso8859p2'
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORACLE_TERM=xterm
export NLS_SORT=xcroatian
export PATH=$PATH:$ORACLE_HOME/bin:/usr/local/java/bin
export TNS_ADMIN=$ORACLE_HOME/config

if [ -z $LD_LIBRARY_PATH ]
then
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib
else
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
fi
if [ -z $CLASSPATH ]
then
    CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_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're lucky):
$ /mnt/cdrom/runInstaller

4. Starting the database for the first time

4.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:
[oracle@marvin oracle]$ sqlplus /nolog

SQL*Plus: Release 9.0.1.0.0 - Production on Sri Srp 4 21:49:58 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  101475576 bytes
Fixed Size                   279800 bytes
Variable Size              79691776 bytes
Database Buffers           20971520 bytes
Redo Buffers                 532480 bytes
Database mounted.
Database opened.
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
[oracle@marvin oracle]$

4.2 Shutting down the database

To shut down the database use:
$ dbshut
or through the SQL*PLUS:
[oracle@marvin oracle]$ sqlplus /nolog

SQL*Plus: Release 9.0.1.0.0 - Production on Sri Srp 4 21:58:31 2001

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

SQL> connect /as sysdba
Connected.
SQL> shutdown immediate
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
[oracle@marvin oracle]$

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
I hope this helps. If you have any questions or comments regarding this text, feel free to contact me.
Home -> oracle -> Oracle 9i (9.0.1) on RedHat 7.1
Valid CSS! Valid HTML 4.01!