Home -> oracle -> Oracle 8.1.5 on RedHat 6.x

Installing Oracle 8.1.5 on Red Hat Linux 6.x

Here you can read about my experience installing Oracle 8i (8.1.5) server on Red Hat Linux 6.2. I wrote this document as reminder to myself for future installations, but I thought it might help someone else.
A little note before we begin:
This works for me, but there is no warranty that it will work at your machine. Use at your own risk. Anyway, people who have oracle server in production should get help from Oracle support ;)

1. Things you need before the installation

Before you start installing, you need to have following software (besides Oracle server):
  • jre-1.1.6_v5 - Blackdown Linux port of Sun's Java Runtime Environment
    You must have JRE (not JDK), and version must be 1.1.6_v5. No more, no less. JRE can be downloaded directly from blackdown.org site, or if you prefer RPM, you can get it at Red Hat site.
  • LessTif - a free replacement for OSF/Motif
    libXm.so, a part of LessTif is needed in order to install JRE (unless you have statically linked JRE). LessTif can be found on Powertools CD, or downloaded from Red Hat site.
  • Oracle 8i For Linux 8.1.5.0.2 patch set
    In order to download this file from Oracle site you need to have an account on Oracle Technology Network. Account is FREE, and once you open it, get the patch here.
  • TCL 7.5
    Oracle Intelligent Agent needs TCL, and if you want to install OIA, download TCL from ftp.scriptics.com. Your Oracle server will work just fine without it, though.

2. Pre-install actions

First of all, you need to install jre-1.1.6_v5.
Once JRE is installed, you should make static link to jre in the place where Oracle expect it to be: (Note that you need to login as root to do this)
# ln -s /usr/local/jdk1.1.6/ /usr/local/lib/jre
Create groups and user that will own Oracle files:
# groupadd oinstall
# groupadd dba
# useradd -g oinstall -G dba oracle
# passwd oracle
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
# cd /home/oracle/product
# mkdir 8.1.5
# chown -R oracle.oinstall /home/oracle/*
Now login as user oracle and put these lines at the end of your .bash_profile:
export ORACLE_HOME=/home/oracle/product/8.1.5
export ORACLE_BASE=/home/oracle
export NLS_LANG='croatian_croatia.ee8iso8859p2'
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORACLE_TERM=vt100
export NLS_SORT=xcroatian
export NLS_DATE_LANGUAGE=croatian
export NLS_DATE_FORMAT='DD.MM.YYYY'
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$PATH:$ORACLE_HOME/bin:/usr/local/jre/bin
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.

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. Now you logoff and then log back on as user oracle in order to set these variables, and start Xwindows. (Oracle installer MUST be run under X, by user oracle)
Since Oracle installer uses huge amount of memory, if you have less than 128M RAM on your machine you should use some lightweight Xwindows manager like blackbox or IceWM (both Gnome and KDE use a lot of memory, and once your swap partition starts to fill... well, you know what happens)

3. Running the installer

Open terminal window and mount Oracle 8i CD-ROM (or, if you have downloaded .tar file from oracle site, unpack it somewhere) We will now assume that you have Oracle 8i CD mounted on /mnt/cdrom/
Start the installation script:
$ sh /mnt/cdrom/install/linux/runInst.sh
Install script may complain about JNLS exception, but you can safely ignore this message. When prompted for type of installation, choose 'custom', and when prompted if you want to use dbassist to create database choose 'no'. Database should not be created before the patch is applied.
When installer finishes you should apply the patch:
$ tar -xvzf linux_815patches.gz
$ cd linux_815patches
$ sh linux_815patches.sh
Now everything should be ready for

4. Creating the database

Logon as user oracle and start Xwindows session. Open the terminal window and start database assistant:

$ dbassist

More information about dbassist can be found in Oracle documentation. Database creation takes very long time, so either be very patient, or choose to create scripts that will create your database. Those dbassist-generated scripts can be found at $ORACLE_HOME/install/ and you can run them later, one at the time.

5. Running the database for the first time

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.
Let's actually start the database now:
$ svrmgrl
Oracle Server Manager Release 3.1.5.0.0 - Production
(c) Copyright 1997, Oracle Corporation. All Rights Reserved.
Oracle8i Enterprise Edition Release 8.1.5.0.2 - Production
With the Partitioning and Java options
PL/SQL Release 8.1.5.0.0 - Production
SVRMGR> connect internal
Connected.
SVRMGR> startup
ORACLE instance started.
Total System Global Area                        71998864 bytes
Fixed Size                                      64912 bytes
Variable Size                                   54984704 bytes
Database Buffers                                16777216 bytes
Redo Buffers                                    172032 bytes
Database mounted.
Database opened.
SVRMGR> exit
Server Manager complete.
$
If server manager doesn't complain about something, than that's it! Your database is working.
Now let's try to run SQL*plus:
$ sqlplus scott/tiger
SQL*Plus: Release 8.1.5.0.0 - Production on Sub Srp 15 19:21:26 2000
(c) Copyright 1999 Oracle Corporation. All rights reserved.
Connected to:
Oracle8i Enterprise Edition Release 8.1.5.0.2 - Production
With the Partitioning and Java options
PL/SQL Release 8.1.5.0.0 - Production
SQL> select sysdate from dual;
SYSDATE
--------
15.07.00
SQL> exit
Disconnected from Oracle8i Enterprise Edition Release 8.1.5.0.2 - Production
With the Partitioning and Java options
PL/SQL Release 8.1.5.0.0 - Production
$
I hope this helps. Anyway, if you have any questions or comments regarding this text, feel free to mail me at denis.klaric@in2.hr.
Home -> oracle -> Oracle 8.1.5 on RedHat 6.x
Valid CSS! Valid HTML 4.01!