Home -> oracle -> Oracle 8.1.7 on RedHat 7.2

Oracle8i release 3 (8.1.7) installation on Red Hat Linux 7.2

Installation of Oracle8i server release 3 (8.1.7) on Red Hat Linux 7.2 can be easily done although this combination is not certified by Oracle. In other words: do not use this combination for a production server!
The installation procedure is the same like installing oracle on RedHat 7.1, only this time we will have to downgrade the binutils package down to the RH 7.1 version (binutils-2.10.91.0.2-3) until the database installation is completed.

1. Things you need before the installation

Before you start installing Oracle, you need to have the following packages:
  • jdk-1.1.8_v3 - Blackdown Linux port of Sun's Java Development Kit
    You can find it at www.blackdown.org
  • Red Hat Linux 6.2 compatibility packages
    compat-libstdc++-6.2-2.9.0.16
    compat-glibc-6.2-2.1.3.2
    compat-egcs-c++-6.2-1.1.2.16
    compat-libs-6.2-3
    compat-egcs-6.2-1.1.2.16
    compat-egcs-objc-6.2-1.1.2.16
    These packages can be found on Disk 2 of RedHat 7.2 distribution.
  • binutils-2.10.91.0.2-3 - Binutils shipped with RedHat 7.1
    You can find it on RedHat ftp site, in some RedHat mirror sites or on the disk 2 of RedHat 7.1 distribution.

2. Pre-install actions

2.1 Installing compatibility packages

First of all, we should install all of the RedHat 6.2 compatibility packages mentioned above by issuing 'rpm -Uvh package_name', e.g:
# rpm -Uvh /mnt/cdrom/RedHat/RPMS/compat-libs-6.2-3.i386.rpm

2.2 Installing Java development kit

According to jdk documentation, we will install it under /usr/local by issuing e.g.
# tar -xvjf jdk-1.1.8_v3.tar.bz2 -C /usr/local
Now we 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
Note that it is not necessary to add path to the java executables in PATH environment variable, so you can safely keep whatever jdk or jre version you already have.

2.3 Binutils downgrade

This is the main trick for this installation. Oracle installer runs genclntsh script to relink the software, which should be done against glibc 2.1. The point is that when we tell the ld to look for those libs under /usr/i386-glibc21-linux/lib by running the script
/usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh (provided by RedHat), ld returns the error ld: unrecognized emulation mode: elf_i386_glibc21. This causes all those relinking errors. We have to install ld provided in binutils-2.10.91.0.2-3 (from RedHat 7.1) which can recognize this emulation mode.
rpm -Uvh --force --nodeps binutils-2.10.91.0.2-3.i386.rpm
Note that we should install the original binutils-2.11.90.0.8-9.i386.rpm after the database is installed and configured.

2.4 User oracle, groups and software mount points

We need to create two groups, oinstall and dba.
The oinstall group will own all the installation files, so user oracle should have the oinstall group as its initial group. We also need one more group, dba, that will have oracle's SYSDBA and SYSOPER privileges granted. User oracle should have the dba group as its supplementary group. Note that all linux users (accounts) that are in group dba will also get these privileges.
# 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.7
# chown -R oracle.oinstall /home/oracle/*

2.5 Setting the environment for oracle account

We should now login as user oracle and put the following lines at the end of .bash_profile:
export LD_ASSUME_KERNEL=2.2.5
source /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/8.1.7
export NLS_LANG=croatian_croatia.ee8iso8859p2
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export PATH=$PATH:$ORACLE_HOME/bin
unset LANG
First two lines modify your environment so that gcc and ld look for glibc 2.1.3 compatibility headers and libraries. (Read the RedHat 7.1 RELEASE-NOTES for more information)
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.
The unset LANG line is there because if LANG is set, java is known to generate JNLS Exceptions.

Listing of valid Oracle NLS Data parameters including supported languages, territories and storage character sets can be found here.

The .bash_profile should now be executed in order to initialize these variables:
$ source /home/oracle/.bash_profile
or we can just log off and than back on as user oracle.
If you use some shell other than bash (tcsh, sh, ...) all of those variables should be set according to syntax of your shell and put in script that automatically executes at user login.

3. Running the installer

Oracle installer should be run from Xwindows by user oracle.
Start Xwindows and from terminal window mount Oracle 8i CD-ROM and start the installer:
$ /mnt/cdrom/runInstaller
or if you have downloaded linux81701.tar from Oracle, untar it somewhere (e.g. under /tmp), and then run the installer:
$ tar -xvf linux81701.tar -C /tmp/
$ /tmp/Disk1/runInstaller
Now installer should work and you can install the software.

4. 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.7.0.0 - Production

Copyright (c) 1997, 1999, Oracle Corporation.  All Rights Reserved.

Oracle8i Enterprise Edition Release 8.1.7.0.1 - Production
With the Partitioning option
JServer Release 8.1.7.0.1 - Production

SVRMGR> connect internal
Connected.
SVRMGR> startup
ORACLE instance started.
Total System Global Area                         93675680 bytes
Fixed Size                                          73888 bytes
Variable Size                                    76652544 bytes
Database Buffers                                 16777216 bytes
Redo Buffers                                       172032 bytes
Database mounted.
Database opened.
SVRMGR>exit
Server Manager complete.
$
In order to use dbstart and dbshut scripts for starting/stopping the database we must edit the /etc/oratab.
The last line of that file should look something like this:
*:/home/oracle/product/8.1.7:N
We should just change the last parameter to Y

Now when the database is installed and working (hopefully), we should re-install the original binutils which can be found on RedHat 7.2 Disk 2:

rpm -Uvh /mnt/cdrom/RedHat/RPMS/binutils-2.11.90.0.8-9.i386.rpm
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.7 on RedHat 7.2
Valid CSS! Valid HTML 4.01!