Installing Oracle 9.2.0.6 on Red Hat Linux AS release 5 Update 3

Posted By Sagar Patil

Objectives

The objectives of this document are to:

Record the setup and configuration of the 9i Oracle Standalone environment.

2 System Configuration

2.1 Machine Configuration

3 Oracle Pre-Installation tasks

3.1 Redhat Pre-Requisite

3.2 Check kernel and update rpm files

3.3 Creating Required Operating System Groups and Users

3.4 Oracle required directory creation

3.5 Set Kernel Parameters

3.6 Hosts File

3.7 Create Oracle Profile

4 Oracle Software Configuration

4.1 Directory Structure

4.2 Download Oracle Software ISO files

4.3 Installation

4.3.1 Database Only Installation

4.3.2 Installing the Listener

Segmentation fault

2 System Configuration

2.1 Machine Configuration

The following table details the disk configuration information used to partition the internal disks during the installation process:

File Type Size Mount Point
ext3 5GB /
ext3 99MB /boot
ext3 2GB /home
ext3 1008MB /tmp
ext3 In root / /usr
ext3 2GB /var
ext3 9.9GB /u01
ext3 30GB /u10
ext3 30GB /u11
ext3 30GB /u12

3 Oracle Pre-Installation tasks

3.1 Redhat Pre-Requisite

If Red Hat OS is already installed, ensure the packages detailed below are installed before starting the Oracle Install.

3.2 Check kernel and update rpm files

To locate which files are installed use following command
Locate version of “compat-libcwaitXX” rpm file
[root@Oranode]# rpm -qa --queryformat "%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n" | grep compat-libcwait
compat-libcwait-2.1.1 (i386)
Required packages Packages Needed at Server
compat-db-4.1.25-9 compat-db-4.1.25.9 (x86_64)compat-db-4.1.25.9 (i386)
compat-gcc-32-3.2.3-47.3 <Disk 3>
compat-gcc-32-c++-3.2.3-47.3 <Disk 3>
compat-oracle-rhel4-1.0-3 Oracle Patch 4198954:
compat-libcwait-2.0-1 Oracle Patch 4198954:
compat-libgcc-296-2.96-132.7.2
compat-libgcc-296-2.96.132.7.2 (i386)
compat-libstdc++-296-2.96-132.7.2 compat-libstdc++-296-2.96.132.7.2 (i386)
compat-libstdc++-33-3.2.3-47.3 compat-libstdc++-33-3.2.3.47.3 (i386)compat-libstdc++-33-3.2.3.47.3 (x86_64)
gnome-libs-1.4.1.2.90-44
gnome-libs-1.4.1.2.90.44.1 (x86_64)
gnome-libs-devel-1.4.1.2.90-44 <Disk 3>
libaio-devel-0.3.102-1 libaio-devel-0.3.105.2 (i386)
libaio-0.3.102-1 libaio-0.3.105.2 (i386)libaio-0.3.105.2 (x86_64)
make-3.80-5 make-3.80.7.EL4 (x86_64)
openmotif21-2.1.30-11 openmotif21-2.1.30.11.RHEL4.6 (i386)openmotif-2.2.3.10.2.el4 (i386)
xorg-x11-deprecated-libs-devel-6.8.1-23.EL < Disk 1>
xorg-x11-deprecated-libs-6.8.1-23.EL xorg-x11-deprecated-libs-6.8.2.1.EL.52 (i386)xorg-x11-deprecated-libs-6.8.2.1.EL.52 (x86_64)

Please verify that all packages are on server.

The compat-oracle-rhel4-1.0-5 and compat-libcwait-2.1-1 packages are available

from Oracle Metalink Patch 4198954 . While installing the patch you might receive the warning. It is a normal behaviour.

root@Oranode Desktop]# rpm -ivh compat-oracle-rhel4-1.0-5.i386.rpm

Preparing…                ########################################### [100%]

1:compat-oracle-rhel4    ########################################### [100%]

[root@Oranode Desktop]# rpm -ivh compat-libcwait-2.1-1.i386.rpm

Preparing…                ########################################### [100%]

1:compat-libcwait        ########################################### [100%]

ERROR: ld.so: object ‘/lib/libcwait.so’ from /etc/ld.so.preload cannot be preloaded: ignored.

Problem : I am now returned warning for any rpm command. I restarted it 2 times to see if tat gets any better but no luck.

[root@]# rpm -qa –queryformat “%{NAME}-%{VERSION}.%{RELEASE} (%{ARCH})\n” | grep compat <Errors>

ERROR: ld.so: object ‘/lib/libcwait.so’ from /etc/ld.so.preload cannot be preloaded: ignored.

ERROR: ld.so: object ‘/lib/libcwait.so’ from /etc/ld.so.preload cannot be preloaded: ignored.

ERROR: ld.so: object ‘/lib/libcwait.so’ from /etc/ld.so.preload cannot be preloaded: ignored.

compat-db-4.1.25.9 (x86_64)

compat-libgcc-296-2.96.132.7.2 (i386)

compat-libcom_err-1.0.5 (i386)

compat-openldap-2.1.30.12.el4 (i386)

Reason for Error :

Error is possible if /usr has separate mount point.

Solution: Apply patch 3006854

 

# [3] Set your current directory to the directory where the patch

# is located, eg:

# # cd 3006854

# [4] Run the script supplied by this patch

# # sh rhel3_pre_install.sh

Now Remove file  /etc/ld.so.preload
# lsls: error while loading shared libraries: /etc/libcwait.so: cannot open shared object file: No such file or directory# rm /etc/ld.so.preloadInstall Patch 4198954 again[root@Oranode Desktop]# rpm -ivh compat-libcwait-2.1-1.i386.rpmPreparing...                ########################################### [100%]   1:compat-libcwait        ########################################### [100%]ERROR: ld.so: object '/lib/libcwait.so' from /etc/ld.so.preload cannot be preloaded: ignored.Remove file “ld.so.preload” and this shoud fix the problem[root@Oranode Desktop]# rm /etc/ld.so.preloadERROR: ld.so: object '/lib/libcwait.so' from /etc/ld.so.preload cannot be preloaded: ignored.rm: remove regular file `/etc/ld.so.preload'? y[root@Oranode Desktop]# ls < No errors >amd64_db_9204_Disk1.cpio.gz         Filesystem.desktopamd64_db_9204_Disk2.cpio.gz         gnome-gedit.desktopamd64_db_9204_Disk3.cpio.gz         gnome-terminal.desktopcompat-libcwait-2.1-1.i386.rpm      rhel3_pre_install.shcompat-oracle-rhel4-1.0-5.i386.rpm

 

Required packages Installed Successfully
compat-db-4.1.25-9 compat-db-4.1.25.9 (x86_64)compat-db-4.1.25.9 (i386)
compat-gcc-32-3.2.3-47.3 compat-gcc-32-3.2.3.47.3 (x86_64)compat-gcc-32-c++-3.2.3.47.3 (x86_64)
compat-gcc-32-c++-3.2.3-47.3 compat-gcc-32-3.2.3.47.3 (x86_64)compat-gcc-32-c++-3.2.3.47.3 (x86_64)
compat-oracle-rhel4-1.0-3 compat-oracle-rhel4-1.0-5
compat-libcwait-2.0-1 compat-libcwait-2.1-1
compat-libgcc-296-2.96-132.7.2
compat-libgcc-296-2.96.132.7.2 (i386)
compat-libstdc++-296-2.96-132.7.2 compat-libstdc++-296-2.96.132.7.2 (i386)
compat-libstdc++-33-3.2.3-47.3 compat-libstdc++-33-3.2.3.47.3 (i386)compat-libstdc++-33-3.2.3.47.3 (x86_64)
gnome-libs-1.4.1.2.90-44
gnome-libs-1.4.1.2.90.44.1 (x86_64)
gnome-libs-devel-1.4.1.2.90-44 gnome-libs-devel-1.4.1.2.90.44.1 (x86_64)
libaio-devel-0.3.102-1 libaio-devel-0.3.105.2 (i386)
libaio-0.3.102-1 libaio-0.3.105.2 (i386)libaio-0.3.105.2 (x86_64)
make-3.80-5 make-3.80.7.EL4 (x86_64)
openmotif21-2.1.30-11 openmotif21-2.1.30.11.RHEL4.6 (i386)openmotif-2.2.3.10.2.el4 (i386)
xorg-x11-deprecated-libs-devel-6.8.1-23.EL xorg-x11-deprecated-libs-devel-6.8.2.1.EL.52 (x86_64)xorg-x11-deprecated-libs-6.8.2.1.EL.52 (i386)

xorg-x11-deprecated-libs-6.8.2.1.EL.52 (x86_64)

xorg-x11-deprecated-libs-6.8.1-23.EL xorg-x11-deprecated-libs-6.8.2.1.EL.52 (i386)xorg-x11-deprecated-libs-6.8.2.1.EL.52 (x86_64)

 

Check Linux Kernel Version:

# uname –a

Linux Oranode.ad.bgep.co.uk 2.6.9-78.0.17.ELsmp #1 SMP Thu Mar 5 04:58:34 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

Please set $LD_ASSUME_KERNEL to 2.4.19

3.3 Creating Required Operating System Groups and Users

Create oinstall and dba groups (not created osoper group as this is optional)

/usr/sbin/groupadd oinstall

/usr/sbin/groupadd dba

Create Oracle user

/usr/sbin/useradd -g oinstall -G dba -d /home/oracle -m oracle

This command will create user “oracle”, with group “oinstall” and supplementary group of “dba”. It will also create the home directory of “/home/oracle”. The default shell will be used – /bin/bash

Set Password

passwd oracle

3.4 Oracle required directory creation

Oracle software will be installed on the internal disk, in file system /u01.

On server

mkdir -p /app/oracle

mkdir -p /app/oracle/product/9.2.0

chown -R oracle:oinstall /app/oracle

chmod -R 775 /app/oracle

mkdir -p /u01/oradata

mkdir -p /u01/oraarchive

mkdir -p /u01/oraredo

chmod -R 775 /u01

3.5 Set Kernel Parameters

Kernel parameters were reconfigured to support the Oracle environment. The table below details all Kernel parameter changes.

Add the following lines to the /etc/sysctl.conf file:

kernel.shmall = 2097152

kernel.shmmax = 4294967296

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 767601

net.ipv4.ip_local_port_range = 1024 65000

net.core.rmem_default = 262144

net.core.rmem_max = 262144

net.core.wmem_default = 262144

net.core.wmem_max = 262144

Run the following command to change the current kernel parameters:

/sbin/sysctl –p

Add the following lines to the /etc/security/limits.conf file:

*               soft    nproc   2047

*               hard    nproc   16384

*               soft    nofile  1024

*               hard    nofile  65536

Add the following line to the /etc/pam.d/login file, if it does not already exist:

               session    required     /lib/security/pam_limits.so

Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows:

SELINUX=disabled

Alternatively, this alteration can be done using the GUI tool (Applications > System Settings > Security Level). Click on the SELinux tab and disable the feature.

3.6 Hosts File

The /etc/hosts file must contain a fully qualified name for the server:

127.0.0.1       OraNode.oracledbasupport.co.uk OraNode     localhost.localdomain

3.7 Create Oracle Profile

Login as the oracle user and add the following lines at the end of the .bash_profile file:

# Oracle 9i

ORACLE_BASE=/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/9.2.0; export ORACLE_HOME

ORACLE_TERM=xterm; export ORACLE_TERM

PATH=$ORACLE_HOME/bin:$PATH; export PATH

ORACLE_OWNER=oracle; export ORACLE_OWNER

ORACLE_SID=Prod; export ORACLE_SID

LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH

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

CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib; export CLASSPATH

LD_ASSUME_KERNEL=2.4.19; export LD_ASSUME_KERNEL

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

4 Oracle Software Configuration

4.1 Directory Structure

The following folders and ASM disk groups were created during the installation process for dbora1 and dbora2.

Description Location
Oracle Base Directory /app/oracle
Oracle Inventory Directory /appl/oracle/oraInventory
ORACLE_HOME /app/oracle/product/9.2.0.6

4.2 Download Oracle Software ISO files

Visit http://www.oracle.com/technology/software/products/oracle9i/index.html

Download 3 X 9i installable files for “Oracle9i Database Release 2 Enterprise/Standard Edition for Linux

[root@9idatabase]# ls -l

total 1307296

-rw-r–r– 1 root root 423559952 Apr 16 09:56 amd64_db_9204_Disk1.cpio.gz

-rw-r–r– 1 root root 578948873 Apr 16 09:56 amd64_db_9204_Disk2.cpio.gz

-rw-r–r– 1 root root 334834987 Apr 16 09:56 amd64_db_9204_Disk3.cpio.gz

[root@ 9idatabase]# gunzip amd64_db_9204_Disk1.cpio.gz

[root@ 9idatabase]# gunzip amd64_db_9204_Disk2.cpio.gz

[root@ 9idatabase]# gunzip amd64_db_9204_Disk3.cpio.gz

[root@ 9idatabase]# cpio -idmv < amd64_db_9204_Disk1.cpio

[root@ 9idatabase]# cpio -idmv < amd64_db_9204_Disk2.cpio

[root@ 9idatabase]# cpio -idmv < amd64_db_9204_Disk3.cpio

[root@ 9idatabase]# ls -l

total 1461836

-rw-r–r– 1 root root 552344576 Apr 16 09:56 amd64_db_9204_Disk1.cpio

-rw-r–r– 1 root root 587835392 Apr 16 09:56 amd64_db_9204_Disk2.cpio

-rw-r–r– 1 root root 355244544 Apr 16 09:56 amd64_db_9204_Disk3.cpio

drwxr-xr-x 6 2840 dba 4096 Apr 30 2004 Disk1

drwxr-xr-x 3 2840 dba 4096 Apr 30 2004 Disk2

drwxr-xr-x 3 2840 dba 4096 Apr 30 2004 Disk3

4.3 Installation

Log into the oracle user. If you are using X emulation then set the DISPLAY environmental variable:

DISPLAY=<machine-name>:0.0; export DISPLAY
Start the Oracle Universal Installer (OUI) by issuing the following command in the Disk1 directory:

4.3.1 Database Only Installation

Welcome, click on next:

Specify Home Details.

Don’t select Oracle HTTP server & Oracle EM options while install

4.3.2 Installing the Listener

The DBCA (Database configuration Assistance) needs listener process so please configure it before running DBCA.

Starting up the netca is easy. While logged in with your. oracle user account do the following:

$ netca &

You are presented with several options. Please select “Listener Configuration” and Click on next:

Click “Add” and click on next:

You get a default option “LISTENER” but you can choose whatever name you like. Click on next:

Pick up TCP and click on next:

You can choose other port numbers but try and leave default port 1521. Click on next:

Select “No” when prompted to configure another listener, and Click on next:

Click on next:

Problem :

After an install sqlplus returned “Segmentation fault”

[oracle ~]$ sqlplus

Segmentation fault

This is a known fault with X64 and use metalink note 316746.1

https://metalink2.oracle.com/metalink/plsql/f?p=130:14:6445194178898869881::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,316746.1,1,1,1,helvetica

To implement the solution, please execute the following steps:

1. cd /usr/bin (as root)

2. mv gcc gcc.script

3. mv g++ g++.script

4. ln -s gcc32 gcc

5. ln -s g++32 g++

6. login as oracle software owner (make sure environment is correct)

7. cd $ORACLE_HOME/bin

8. relink all

Now SQLPLUS is working fine

(oracle) db10gr2 Oranode:Prod:/app/oracle/product/9.2.0/bin> sqlplus /nolog

SQL*Plus: Release 9.2.0.4.0 – Production on Thu Apr 16 15:17:49 2009

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

5.5 Upgrade Oracle to 9206

Download patch p4190568 for 90206 upgrade from metalink.oracle.com

You will be presented with this error now

Download Patch 4188455 and install it

======================================

Bug# : 4188455

Platform : Linux X86

Release : Database Patchset 9.2.0.6.0

======================================

To apply the patch

==================

[1]. Extract the patch to a temp location, say, /tmp

[2]. Run the installer from the DB 9206 patchset shiphome with the argument -paramFile <path_to_oraparam.ini_filename>.

Run installer again and choose to install Oracle Installer 10.1.0.3

[oracle@Oranode Disk1]$ sqlplus

sqlplus: error while loading shared libraries: libclntsh.so.9.0: cannot open shared object file: No such file or directory

After the 9.2.0.6 patchset has been applied, download the patch 4190568 from http://metalink.oracle.com. Also, download the opatch utility for release 10.1.0.2 (patch 2617419) from http://metalink.oracle.com.

Download Patch : 4190568

To install opatch, run:

su - oracle
$ cp p2617419_10102_GENERIC.zip /tmp
$ cd /tmp
$ unzip p2617419_10102_GENERIC.zip
$ cp -a /tmp/OPatch/ $ORACLE_HOME

To apply the 4190568 patch, run

su – oracle

$ unzip p4190568_9206_LINUX.zip

$ cd 4193454

$ export PATH=$PATH:$ORACLE_HOME/OPatch

$ opatch apply

This returned above screen and asked to download another patch 6880880

Creating log file “/app/oracle/product/9.2.0/.patch_storage/4193454/Apply_4193454_04-16-2009_17-38-15.log”

Invoking fuser to check for active processes.

Invoking fuser on “/app/oracle/product/9.2.0/bin/oracle”

Backing up comps.xml …

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.

Please shut down Oracle instances running out of this ORACLE_HOME

(Oracle Home = /app/oracle/product/9.2.0)

Is this system ready for updating?

Please respond Y|N > Y

Create dbora File

Edit /etc/oratab and set flag “N” to “Y” instance.

Create dbora shell script and place it in the /etc/init.d directory.

# +————————————————————————+
# | FILE : dbora |
# | DATE : 24-Jan-2008 |
# | HOSTNAME : OraNode.oracledbasupport.co.uk |
# +————————————————————————+
# +———————————+
# | FORCE THIS SCRIPT TO BE IGNORED |
# +———————————+
# exit
# +———————————+
# | PRINT HEADER INFORMATION |
# +———————————+
echo ” ”
echo “+———————————-+”
echo “| Starting Oracle Database Script. |”
echo “| 0 : $0 |”
echo “| 1 : $1 |”
echo “+———————————-+”
echo ” ”
# +—————————————————–+
# | ALTER THE FOLLOWING TO REFLECT THIS SERVER SETUP |
# +—————————————————–+
HOSTNAME=OraNode.oracledbasupport.co.uk
ORACLE_HOME=/u01/app/oracle/product/9.2.0
SLEEP_TIME=10
ORACLE_OWNER=oracle
DATE=`date “+%m/%d/%Y %H:%M”`
export HOSTNAME ORACLE_HOME SLEEP_TIME ORACLE_OWNER DATE
# +———————————————-+
# | VERIFY THAT ALL NEEDED SCRIPTS ARE AVAILABLE |
# | BEFORE CONTINUING. |
# +———————————————-+
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]; then
echo ” ”
echo “+————————————-+”
echo “| ERROR: |”
echo “| Oracle startup: cannot start |”
echo “| cannot find dbstart |”
echo “+————————————-+”
echo ” ”
exit
fi
# +—————————+
# | START/STOP CASE STATEMENT |
# +—————————+
case “$1″ in
start)
echo ” ”
echo “+—————————————-+”
echo “| ************************************** |”
echo “| >>>>>>>>> START PROCESS <<<<<<<<<< |”
echo “| ************************************** |”
echo “+—————————————-+”
echo ” ”
echo “Going to sleep for $SLEEP_TIME seconds…”
sleep $SLEEP_TIME
echo ” ”
su – $ORACLE_OWNER -c “$ORACLE_HOME/bin/dbstart”
echo ” ”
echo “+—————————————————+”
echo “| About to start the listener process in |”
echo “| $ORACLE_HOME |”
echo “+—————————————————+”
echo ” ”
su – $ORACLE_OWNER -c “lsnrctl start listener”
echo ” ”
echo “+—————————————————+”
echo “| About to start the dbconsole EM process |”
echo “+—————————————————+”
echo ” ”
su – $ORACLE_OWNER -c “emctl start dbconsole”
touch /var/lock/subsys/dbora
;;
stop)
echo ” ”
echo “+—————————————-+”
echo “| ************************************** |”
echo “| >>>>>>>>>> STOP PROCESS <<<<<<<<<< |”
echo “| ************************************** |”
echo “+—————————————-+”
echo ” ”
echo ” ”
echo “+—————————————————+”
echo “| About to stop the dbconsole EM process |”
echo “+—————————————————+”
echo ” ”
su – $ORACLE_OWNER -c “emctl stop dbconsole”
echo ” ”
echo “+——————————————————-+”
echo “| About to stop the listener process in |”
echo “| $ORACLE_HOME |”
echo “+——————————————————-+”
echo ” ”
su – $ORACLE_OWNER -c “lsnrctl stop listener”
echo ” ”
echo “+——————————————————-+”
echo “| About to stop all Oracle databases |”
echo “| running. |”
echo “+——————————————————-+”
echo ” ”
su – $ORACLE_OWNER -c “$ORACLE_HOME/bin/dbshut”
rm -f /var/lock/subsys/dbora
;;
*)
echo $”Usage: $prog {start|stop}”
exit 1
esac
echo ” ”
echo “+———————-+”
echo “| ENDING ORACLE SCRIPT |”
echo “+———————-+”
echo ” ”
exit

Manually edit /etc/inittab so that entry to respawn init.cssd comes before running the runlevel 3

Orignal /etc/inittab file: (…)
# System initialization.
l5:5:wait:/etc/rc.d/rc 5
l6:6:wait:/etc/rc.d/rc 6
(…)
h1:35:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 </dev/null
Modified /etc/inittab file: (…)
# System initialization.
si::sysinit:/etc/rc.d/rc.sysinit
l0:0:wait:/etc/rc.d/rc 0
l1:1:wait:/etc/rc.d/rc 1
l2:2:wait:/etc/rc.d/rc 2
h1:35:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 </dev/null
l3:3:wait:/etc/rc.d/rc 3
(…)

 

 

 

 

 

 

 

 

5.5.5 : Configure Listener/ Tnsnames files for ASM/Database instance

Listener.ora :

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = OraNode.oracledbasupport.co.uk )(PORT = 1521))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = prod)
(ORACLE_HOME =/u01/app/oracle/product/9.2.0)
(SID_NAME = Prod)
)
)

Leave a Reply

You must be logged in to post a comment.

Top of Page

Top menu