PERUMAL.ORG

Install Oracle Database 8i (8.1.7) on Red Hat Linux 7.3 (Kernel 2.4.18-3 i386 32 Bit)

~ Ram Perumal


Table of Contents

1) Things you need before Installation
2) Installing Required RPMs
3) Create ORACLE Software owner OS User
4) Setup Kernel Parameters
5) Install JDK
6) Setup Oracle Environment Variables
7) Unpack Oracle TAR file
8) Verify X-Windows
9) Starting Oracle Universal Installer
10) Oracle Software Installation and Database Creation
11) Oracle Stub and Database Creation 
12) Post Database Creation
13) Finalize Installation
14) Other Possible Error Messages

1) Things you need before Installation

1a) Java Development Kit:

jdk118_v3-glibc-2.1.3.tar.bz2 

1b) Red Hat Linux 6.2 Compatible Packages:

compat-libstdc++-6.2-2.9.0.16
compat-glibc-6.2-2.1.3.2
compat-egcs-6.2-1.1.2.16
compat-egcs-c++-6.2-1.1.2.16
compat-libs-6.2-3
compat-egcs-objc-6.2-1.1.2.16

1c) Binutils Packge:

binutils-2.11.93.0.2-11
binutils-2.10.91.0.2-3

1d) Oracle TAR and Stub:

Oracle for Linux 8.1.7.0.1 linux81701.tar
Patch glibc-2.1.3-stubs  *

TIP: You need to apply the patch before Database Creation, if you plan to install Oracle 8i on RHL 7.1 or 7.2 *

2) Installing Required RPMs

2a) Query Installed Packages:

[rperumal@dellcpixl4 ~]$ su - root
[root@dellcpixl4 ~]# rpm -q binutils glibc-kernheaders glibc-devel gcc cpp compat-libstdc++ compat-glibc compat-egcs compat-egcs-c++  compat-libs compat-egcs-objc

Sample output as below;

binutils-2.11.93.0.2-11
glibc-kernheaders-2.4-7.14
glibc-devel-2.2.5-34
gcc-2.96-110
cpp-2.96-110
compat-libstdc++-6.2-2.9.0.16
compat-glibc-6.2-2.1.3.2
compat-egcs-6.2-1.1.2.16
compat-egcs-c++-6.2-1.1.2.16
package compat-libs is not installed
package compat-egcs-objc is not installed
[root@dellcpixl4 rperumal]#

2b) Install Linux Packages: 

[root@dellcpixl4 rperumal]# rpm -Uvh compat-libs-6.2-3.i386.rpm compat-egcs-objc-6.2-1.1.2.16.i386.rpm
Preparing... ########################################### [100%]
1:compat-libs ########################################### [ 50%]
2:compat-egcs-objc ########################################### [100%]

2c) Downgrade Binutils Package: 

[root@dellcpixl4 rperumal]# rpm -Uvh --force --nodeps binutils-2.10.91.0.2-3.i386.rpm
Preparing... ########################################### [100%]
1:binutils ########################################### [100%]
[root@dellcpixl4 rperumal]# 

TIP: Downgrade to binutils-2.10.91.0.2-3.i386.rpm and reinstall binutils-2.11.93.0.2-11.i386.rpm after Oracle installation

3) Create ORACLE Software owner OS User

3a) Create USER and GROUPS:

$ su - root
[root@dellcpixl4 rperumal]# groupadd oinstall
[root@dellcpixl4 rperumal]# groupadd dba
[root@dellcpixl4 rperumal]# groupadd oper
[root@dellcpixl4 rperumal]# useradd oracle -g oinstall -G dba,oper
[root@dellcpixl4 rperumal]# passwd oracle
Changing password for user oracle.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

3b) Create Oracle Software Directory:

$ su - root
[root@dellcpixl4 rperumal]# mkdir -p /u01/app/oracle/product/8.1.7
[root@dellcpixl4 rperumal]# chown -R oracle.dba /u01
[root@dellcpixl4 rperumal]# chmod -R 775 /u01

4) Setup Kernel Parameters

Find out the default kernel parameter values

$ su - root
[root@dellcpixl4 rperumal]# cat /proc/sys/kernel/sem
250 32000 32 128
[root@dellcpixl4 rperumal]# cat /proc/sys/kernel/shmmax 
33554432
[root@dellcpixl4 rperumal]# cat /proc/sys/kernel/shmmni 
4096

If above kernel parameter values are higher than below values, do not set those parameters.

$ su - root
[root@dellcpixl4 rperumal]# echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf 
[root@dellcpixl4 rperumal]# echo "kernel.shmmax=4294967295" >> /etc/sysctl.conf 
[root@dellcpixl4 rperumal]# echo "kernel.shmmni=4096" >> /etc/sysctl.conf 

Adding these parameters to /etc/sysctl.conf will take effect only after reboot. To make this effective immediately, issue the following command  on the same window.

[root@dellcpixl4 rperumal]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.sem = 250 32000 100 128
kernel.shmmax = 4294967295
kernel.shmmni = 4096

5) Install JDK

Unpack JDK into /usr/local directory as root; and symlink to /usr/local/java - this symlink will provided in OUI screen.

[oracle@dellcpixl4 oracle]$ su - root
[root@dellcpixl4 ~]# cd /usr/local 
[root@dellcpixl4 local]# bunzip2 /your/path/jdk118_v3-glibc-2.1.3.tar.bz2 
[root@dellcpixl4 local]# tar -xvf /your/path/jdk118_v3-glibc-2.1.3.tar 
[root@dellcpixl4 local]# ln -s /usr/local/jdk118_v3 /usr/local/java

6) Setup Oracle Environment Variables

The following environment variables must be set before running the oracle installer. To set environment variables every time you login as “oracle” user.  To make profile changes permanent add the below lines to .bash_profile of oracle user.

LD_ASSUME_KERNEL=2.2.5; export LD_ASSUME_KERNEL 
LDEMULATION=elf_i386_glibc21; export LDEMULATION 
GCC_EXEC_PREFIX=/usr/i386-glibc21-linux/lib/gcc-lib/; export GCC_EXEC_PREFIX 
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE 
ORACLE_HOME=$ORACLE_BASE/product/8.1.7; export ORACLE_HOME 
ORACLE_SID=db18i; export ORACLE_SID 
PATH=$PATH:$ORACLE_HOME/bin; export PATH 
CLASS_PATH=.:$ORACLE_HOME/jdbc/lib/classes111.zip; export CLASS_PATH 
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib; export LD_LIBRARY_PATH 
ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data; export ORA_NLS33 
NLS_LANG=american; export NLS_LANG 
umask 022 

TIP: If you are installing Oracle on 7.1/7.2; You don’t have to run /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh as everything has been set in .bash_profile (LDEMULATION, GCC_EXEC_PREFIX)

7) Unpack Oracle TAR file

Unpack linux81701.tar by issuing below command

[root@dellcpixl4 root]# su - oracle
[oracle@dellcpixl4 ~]$ tar -xvf linux81701.tar 
[oracle@dellcpixl4 ~]$ chown -R oracle.dba Disk1/

8) Verify X-Windows

Make sure the clock (xclock) appears before you  kick off oracle installer ; Open a terminal and issue the below command


[oracle@dellcpixl4 ~]$ xclock

If you don’t see a graphical clock on the console then, Issue the below command in terminal

[oracle@dellcpixl4 ~]$ echo "DISPLAY=localhost:0.0;export DISPLAY"
[oracle@dellcpixl4 ~]$ source .bash_profile
[oracle@dellcpixl4 ~]$ xclock

If you don't see a graphical clock after setting the DISPLAY environment variable, please consult Red Hat User Manuals to configure XWindows.

9) Starting Oracle Universal Installer

Run below command to start the oracle installer, only when you succeeded step 8.  

[oracle@dellcpixl4 ~]$ cd Disk1/
[oracle@dellcpixl4 oracle]$ ./runInstaller

TIP: Make sure TARGET PATH is same as ORACLE_HOME.  For RHL 7.1/7.2, Do not choose Automatic Database Creation option as we need apply the oracle’s stub patch.

10) Oracle Software Installation and Database Creation

TIP: For RHL 7.1/7.2, Choose Custom and do not choose Automatic Database Creation option as we need apply the oracle’s stub patch. You will be able to create database with out applying the glibc stub in RHL 7.3

TIP: /usr/local/java is a symlink that you created in Step 5.

Error in invoking target install of makefile /u01/app/oracle/product/8.1.7/lib/ins_ctx.mk

The last few lines of $ORACLE_HOME/install/make.log will look like below;

[oracle@dellcpixl4 ~]$ tail $ORACLE_HOME/install/make.log 
Linking ctxhxx
rm -f ctxhxx
gcc -o ctxhxx -L/u01/app/oracle/product/8.1.7/ctx/lib/ -L/u01/app/oracle/product/8.1.7/lib/ /u01/app/oracle/product/8.1.7/ctx/lib/ctxhx.o -Wl,-rpath,/u01/app/oracle/product/8.1.7/ctx/lib/ -lm -lsc_fa -lsc_fi -lsc_ch -lsc_ut -lsc_ex -lsc_da -lctxhx -lm -lc -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 
/lib/libdl.so.2: undefined reference to `_dl_addr@GLIBC_PRIVATE'
/lib/libdl.so.2: undefined reference to `_dl_open@GLIBC_PRIVATE'
/lib/libdl.so.2: undefined reference to `_dl_close@GLIBC_PRIVATE'
/lib/libdl.so.2: undefined reference to `_dl_sym@GLIBC_PRIVATE'
/lib/libdl.so.2: undefined reference to `_dl_vsym@GLIBC_PRIVATE'
collect2: ld returned 1 exit status
make: *** [ctxhxx] Error 1
[oracle@dellcpixl4 oracle]$
 

TIP: Do not close Oracle Universal Installer window; the following fix must be done before proceeding further

[oracle@dellcpixl4 ~]$ cd $ORACLE_HOME/ctx/lib 
[oracle@dellcpixl4 lib]$ vi env_ctx.mk

Find a line which contains text INSO_LINK =  and add $(LDLIBFLAG)dl after $(LDLIBFLAG)m and save it.

INSO_LINK = -Wl,-rpath,$(CTXLIB) $(LDLIBFLAG)m $(LDLIBFLAG)dl $(LDLIBFLAG)sc_fa $(LDLIBFLAG)sc_fi $(LDLIBFLAG)sc_ch $(LDLIBFLAG)sc_ut $(LDLIBFLAG)sc_ex $(LDLIBFLAG)sc_da $(LLIBCTXHX) $(LDLIBFLAG)m $(LDLIBFLAG)c $(CORELIBS)

Execute the below command and wait for the make process to complete.

[oracle@dellcpixl4 lib]$ /usr/bin/make -f ins_ctx.mk install ORACLE_HOME=$ORACLE_HOME 

Sample output is below;

gcc -o ctxload -L/u01/app/oracle/product/8.1.7/ctx/lib/ -L/u01/app/oracle/product/8.1.7/lib/ -o ctxload -L/u01/app/oracle/product/8.1.7/ctx/lib/ -L/u01/app/oracle/product/8.1.7/lib/ drz.o -lctxs8 -lctx8 -lzx8 -lgx8 -lctx8 -lzx8 -lgx8 /u01/app/oracle/product/8.1.7/rdbms/lib/defopt.o -lclntsh /u01/app/oracle/product/8.1.7/rdbms/lib/kpuadef.o `cat /u01/app/oracle/product/8.1.7/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lnro8 `cat /u01/app/oracle/product/8.1.7/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -lwtc8 -lmm -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 `cat /u01/app/oracle/product/8.1.7/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lnro8 `cat /u01/app/oracle/product/8.1.7/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -ltrace8 -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 `cat /u01/app/oracle/product/8.1.7/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/8.1.7/lib:/lib:/usr/lib -lm `cat /u01/app/oracle/product/8.1.7/lib/sysliblist` -ldl -lm -Wl,-rpath,/u01/app/oracle/product/8.1.7/lib:/lib:/usr/lib
mv -f /u01/app/oracle/product/8.1.7/bin/ctxload /u01/app/oracle/product/8.1.7/bin/ctxloadO
mv ctxload /u01/app/oracle/product/8.1.7/bin/ctxload
chmod 751 /u01/app/oracle/product/8.1.7/bin/ctxload
gcc -o ctxsrv -L/u01/app/oracle/product/8.1.7/ctx/lib/ -L/u01/app/oracle/product/8.1.7/lib/ -o ctxsrv -L/u01/app/oracle/product/8.1.7/ctx/lib/ -L/u01/app/oracle/product/8.1.7/lib/ /u01/app/oracle/product/8.1.7/ctx/lib/drt.o /u01/app/oracle/product/8.1.7/ctx/lib/drtl.o -lctxs8 -lctx8 -lzx8 -lgx8 -lctx8 -lzx8 -lgx8 /u01/app/oracle/product/8.1.7/rdbms/lib/defopt.o -lclntsh /u01/app/oracle/product/8.1.7/rdbms/lib/kpuadef.o `cat /u01/app/oracle/product/8.1.7/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lnro8 `cat /u01/app/oracle/product/8.1.7/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -lwtc8 -lmm -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 `cat /u01/app/oracle/product/8.1.7/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lnro8 `cat /u01/app/oracle/product/8.1.7/lib/ldflags` -lnsgr8 -lnzjs8 -ln8 -lnl8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -ltrace8 -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 -lclient8 -lvsn8 -lwtc8 -lcommon8 -lgeneric8 -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 `cat /u01/app/oracle/product/8.1.7/lib/sysliblist` -Wl,-rpath,/u01/app/oracle/product/8.1.7/lib:/lib:/usr/lib -lm `cat /u01/app/oracle/product/8.1.7/lib/sysliblist` -ldl -lm -Wl,-rpath,/u01/app/oracle/product/8.1.7/lib:/lib:/usr/lib
mv -f /u01/app/oracle/product/8.1.7/bin/ctxsrv /u01/app/oracle/product/8.1.7/bin/ctxsrvO
mv ctxsrv /u01/app/oracle/product/8.1.7/bin/ctxsrv
chmod 751 /u01/app/oracle/product/8.1.7/bin/ctxsrv

Linking ctxhxx
rm -f ctxhxx
gcc -o ctxhxx -L/u01/app/oracle/product/8.1.7/ctx/lib/ -L/u01/app/oracle/product/8.1.7/lib/ /u01/app/oracle/product/8.1.7/ctx/lib/ctxhx.o -Wl,-rpath,/u01/app/oracle/product/8.1.7/ctx/lib/ -lm -ldl -lsc_fa -lsc_fi -lsc_ch -lsc_ut -lsc_ex -lsc_da -lctxhx -lm -lc -lnls8 -lcore8 -lnls8 -lcore8 -lnls8 
/bin/chmod 755 ctxhxx
mv ctxhxx ctxhx
Linking ctxhxx complete
mv -f /u01/app/oracle/product/8.1.7/ctx/bin/ctxhx /u01/app/oracle/product/8.1.7/ctx/bin/ctxhxO
mv ctxhx /u01/app/oracle/product/8.1.7/ctx/bin/ctxhx
chmod 751 /u01/app/oracle/product/8.1.7/ctx/bin/ctxhx
[oracle@dellcpixl4 lib]$
 

Once make process is complete, you click RETRY option on the error popup window and the oracle installer will continue installation of oracle software.

DO NOT RUN root.sh until you issue the below fixes otherwise installation will error out

Fix:

[oracle@dellcpixl4 ~]$ cd $ORACLE_HOME 
[oracle@dellcpixl4 8.1.7] vi root.sh 


search for the text RMF= or directly go to line 102; and change RMF=/bin/rm -f to read RMF="/bin/rm -f"
search for a text RUID= or directly go to line 156; add a single quote after the last right braces.

RUID=`/usr/bin/id|$AWK -F\( '{print $2}'|$AWK -F\) '{print $1}'`

Run:

[oracle@dellcpixl4 8.1.7]$ su - root
Password: 
[root@dellcpixl4 ~]# cd /u01/app/oracle/product/8.1.7
[root@dellcpixl4 8.1.7]# ./root.sh
IMPORTANT NOTE: Please delete any log and trace files previously
created by the Oracle Enterprise Manager Intelligent
Agent. These files may be found in the directories
you use for storing other Net8 log and trace files.
If such files exist, the OEM IA may not restart.
Running Oracle8 root.sh script...
\nThe following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/8.1.7
ORACLE_SID= db18i

Enter the full pathname of the local bin directory: [/usr/local/bin]:/usr/local/bin
\nCreating /etc/oratab file...
Entry will be added to the /etc/oratab file by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
[root@dellcpixl4 8.1.7]# 

Now click OK on Setup Privileges screen

11) Oracle Stub and Database Creation 

While I installed Oracle 8i on RHL 7.1 and 7.2, I skipped stubs and I encountered errors;

11a) Apply Stub:

Copy glibc-2.1.3-stubs.tar.gz to $ORACLE_HOME, if you dont have it in ORACLE_HOME.

$ su - oracle 
$ gunzip glibc-2.1.3-stubs.tar.gz 
$ tar -xvf glibc-2.1.3-stubs.tar 
$ ./setup_stubs.sh 


setup_stubs.sh will remove the initial executables installed by oracle installer, and creates the new software executables. 
You can not proceed for database creation until you complete this step.

11b) Database Creation:

The following command will load the Database Creation Assistant for you to create the new database. 

$ su - oracle 
$ which dbassist 
/u01/app/oracle/product/8.1.7/bin/dbassist 
$ dbassist 

TIP: Applicable only, if you are installing on RHL 7.1 or 7.2

12) Post Database Creation 

12a) Database Startup:

[oracle@dellcpixl4 ~]$ 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 72704160 bytes
Fixed Size 73888 bytes
Variable Size 55681024 bytes
Database Buffers 16777216 bytes
Redo Buffers 172032 bytes
Database mounted.
Database opened.
SVRMGR> quit
Server Manager complete.

12b) Database Shutdown:

[oracle@dellcpixl4 ~]$ 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> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SVRMGR> quit
Server Manager complete.
[oracle@dellcpixl4 oracle]$ 

12c) Listener Start / Stop:

Start:  [oracle@dellcpixl4 ~]$ lsnrctl start
Stop :  [oracle@dellcpixl4 ~]$ lsnrctl stop

12d) Sample Schema Creation:

[oracle@dellcpixl4 ~]$ sqlplus sys/change_on_install

SQL*Plus: Release 8.1.7.0.0 - Production on Fri Jun 21 19:36:19 2002

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


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

SQL> @"$ORACLE_HOME/rdbms/admin/utlsampl.sql"
Disconnected from Oracle8i Enterprise Edition Release 8.1.7.0.1 - Production
With the Partitioning option
JServer Release 8.1.7.0.1 - Production
[oracle@dellcpixl4 oracle]$ 

utlsampl.sql script creates scott, adams, jones, clark and blake schemas.

13) Finalize Installation

Upgrade bin-utils, which we downgraded in step 2c.

[oracle@dellcpixl4 ~]$ su - root
Password: 
[root@dellcpixl4 ~]# rpm -Uvh --force --nodeps /home/oracle/binutils-2.11.93.0.2-11.i386.rpm
Preparing... ########################################### [100%]
1:binutils ########################################### [100%]
[root@dellcpixl4 ~]# 

14) Other Possible Error Messages

 "Error in invoking target ntcontab.o of makefile" may appear during the linking process.

The following error message may appear when you try to build genclntsh manually.
genclntsh: ld: command not found
genclntst: error: could not locate /u01/app/oracle/product/8.1.7/lib/clntsh.map
please generate the client shared library first


Above-mentioned errors encountered due to missing or installation of incorrect RPMs


DISCLAIMER: This information is provided "AS-IS" without warranty of any kind, either expressed or implied. Use of the information posted in this site is at your own risk.