Oracle 9i under Fedora Core 3 - Installation How to

Gaurav  
gauravpd@gmail.com

v1.0-pre1, April 1, 2005


This tutorial describes how to install Oracle 9i on Fedora Core 3 (or greater)



Table of Contents

Oracle 9i under Fedora Core 3 - Installation How to 1

1. Introduction 2

1.1 Acknowledgments 3

1.2 Revision History 3

1.3 New versions of this document 3

1.4 Feedback 3

1.5 Distribution Policy 3

2. Get Oracle 9i 5

2.1 CD Installation 5

2.2 Download 5

3. Create users and Directories 5

3.1 Create users and groups 5

3.2 Create the directories 5

4. Set Environmental variables 6

4.1 Edit .bash_profile 6

5. Set Kernel Parameters 7

5.1 Edit /etc/sysctl.conf 7

5.2 Edit /etc/security/limits.conf 7

6. Install GCC 2.9 Compat libraries 7

6.1 Install GCC 2.96 Compat packages 7

6.2 Create symbolic links 8

7. Run Installer 8

7.1 Apply libwait.c patch 8

7.2 Export Display variable 9

7.3 Finally Run the Installation 9

7.4 Fix nodeinfo 9

7. Startup script 10

Miscellaneous Errors 11



1. Introduction

This tutorial was written due to my frustration on installing Oracle 9i on FC3. Basically 9i installation on RAS 1,2,3 RH 9, fc1, fc 2 is documented fairly well but its hard to find anything worth while on FC3 , some people even suggested installing Oracle 9i on FC3 is not possible !! . This How to attempts to condense all my experience /findings with any such info peculiar to FC3 which scattered all over web in to one concise but useful Doc.

I hope you might find this short tutorial useful

If you need to install Oracle 9i on FC3 than you must know/ look at following fact

also

1.1 Acknowledgments

I would like to thank Jean Francois for helping me out on most tricky part

1.2 Revision History

Version 1.0-pre1 – March 25, 2005.

Version 1.1 -April 1,2005 added miscellaneous errors section



1.3 New versions of this document

The latest version can be found at http://www.pagux.com/oracle9ionfedora3.html

1.4 Feedback

I rely on you, the reader, to make this HOWTO useful. If you have any suggestions, corrections or comments, please send them to me ( gauravpd@gmail.com), and I will try to incorporate them in the next revision.

1.5 Distribution Policy

Copyright 2005/2006 Gaurav Prasad

This HOWTO is free documentation; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This document is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. See the GNU General Public License for more details.

You can obtain a copy of the GNU General Public License by writing to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.





2. Get Oracle 9i

2.1 CD Installation

2.2 Download



3. Create users and Directories

3.1 Create users and groups

groupadd oinstall
groupadd dba
groupadd oper
groupadd apache

useradd -g oinstall -G dba oracle
passwd oracle

3.2 Create the directories

in which the Oracle software will be installed:

mkdir /u01 /u02
chown oracle.dba /u01 /u02
chmod 755 /u01 /u02


4. Set Environmental variables

4.1 Edit .bash_profile

############################################################################
############################ Oracle Variables######################################
echo " Wel come to oracle";
ORACLE_BASE=/u01/app/oracle
ORACLE_OWNER=oracle; export ORACLE_OWNER
ORACLE_TERM=xterm; export ORACLE_TERM
ORACLE_HOME=/u01/app/oracle/product/9.2.0.1.0
ORACLE_SID=ORTD
LD_PRELOAD=$HOME/libcwait.so
export DISPLAY=172.28.66.39:0.0
PATH=$PATH:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME/network/lib

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL
THREADS_FLAG=native; export THREADS_FLAG
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

export PATH ORACLE_BASE ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH LD_PRELOAD
###############################Oracle##################################

5. Set Kernel Parameters

5.1 Edit /etc/sysctl.conf

kernel.shmmax = 2147483648
kernel.shmmni = 128
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000

5.2 Edit /etc/security/limits.conf

oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384

6. Install GCC 2.9 Compat libraries

6.1 Install GCC 2.96 Compat packages

compat-libstdc++-7.3-2.96
compat-libstdc++-devel-7.3-2.96
compat-gcc-7.3-2.96.118.i386.rpm
compat-gcc-c++-7.3-2.96
compat-db

6.2 Create symbolic links

mv /usr/bin/gcc /usr/bin/gcc323
mv /usr/bin/g++ /usr/bin/g++323
ln -s /usr/bin/gcc296 /usr/bin/gcc
ln -s /usr/bin/g++296 /usr/bin/g++

7. Run Installer

7.1 Apply libwait.c patch

7.2 Export Display variable

7.3 Finally Run the Installation

7.4 Fix nodeinfo

 Parameter "nodeinfo" = NO_VALUE
Agent Service Failed

7. Startup script

#!/bin/bash
#
# Run-level Startup script for the Oracle Instance and Listener
#
# chkconfig: 345 91 19
# description: Startup/Shutdown Oracle listener and instance

ORA_HOME="/u01/app/oracle/product/9.2.0.1.0"
ORA_OWNR="oracle"

# if the executables do not exist -- display error

if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
        echo "Oracle startup: cannot start"
        exit 1
fi

# depending on parameter -- startup, shutdown, restart 
# of the instance and listener or usage display 

case "$1" in
    start)
        # Setting up kernel parameters 
        #echo 100 32000 100 100 > /proc/sys/kernel/sem
        #echo 2147483648 > /proc/sys/kernel/shmmax
        #echo 4096 > /proc/sys/kernel/shmmni
        #echo 2097152 > /proc/sys/kernel/shmall
        #echo 65536 > /proc/sys/fs/file-max
        #ulimit -n 65536
        #echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range
        #ulimit -u 16384
        
        # Oracle listener and instance startup
        echo -n "Starting Oracle: "
        su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl start"
        su - $ORA_OWNR -c $ORA_HOME/bin/dbstart
        touch /var/lock/subsys/oracle
        echo "OK"
        ;;
    stop)
        # Oracle listener and instance shutdown
        echo -n "Shutdown Oracle: "
        su - $ORA_OWNR -c "$ORA_HOME/bin/lsnrctl stop"
        su - $ORA_OWNR -c $ORA_HOME/bin/dbshut
        rm -f /var/lock/subsys/oracle
        echo "OK"
        ;;
    reload|restart)
        $0 stop
        $0 start
        ;;
    *)
        echo "Usage: $0 start|stop|restart|reload"
        exit 1
esac
exit 0

Miscellaneous Errors

ERROR:
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux Error: 2: No such file or directory


This error happens when you reboot and try to login ... you will get lot of errors as database instance is not mounted/started automatically
Step 1
In /etc/oratab If you  have:
*:/opt/oracle/OraHome1:N
ordb:/opt/oracle/OraHome1:N

edit  it  to *:/opt/oracle/OraHome1:Y
ordb:/opt/oracle/OraHome1:Y

here N means No and Y means Yes ....so you basically asking database to start automatically when you reboot or stop service
Step 2
after that try to initialize database
$ORACLE_HOME/bin/dbstart

if you get  error

No start entry for SID * at /opt/oracle/OraHome1 in /etc/oratab

this might be due a bug in dbstart script looking at sid file wrong place
then ->
cp $ORACLE_BASE/admin/$ORACLE_SID/pfile/init_*.ora
$ORACLE_HOME/dbs/init$ORACLE_SID.ora

and
$ sqlplus '/ as sysdba'
SQL> create pfile from spfile;
SQL> exit
run  the db start script
$ORACLE_HOME/bin/dbstart




if you reached this state with any errors the Congrats !! Relax :-) ...Go have a cup of coffee or call your girl friend