Oracle9I (9.2.0.4.0) Installation On Redhat Advanced Server 3.0 Linux

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 5

Oracle9i (9.2.0.4.

0) Installation on RedHat
Advanced Server 3.0 Linux
This article is intended as a brief guide to installing Oracle9i (9.2.0.4.0) on RedHat
Advanced Server 3.0 Linux.

Download Software
Download Sun's Java Development Kit (JDK 1.3.1).

Download the Oracle installation files from otn.oracle.com.

Download the Oracle 9.2.0.4.0 patchset files from metalink.oracle.com.

Download the following patches (3006854, 3119415) from metalink.oracle.com.

Unpack Files
First unzip the files:
gunzip lnx_920_disk1.cpio.gz
gunzip lnx_920_disk2.cpio.gz
gunzip lnx_920_disk3.cpio.gz
Next unpack the contents of the files:
cpio -idmv < lnx_920_disk1.cpio
cpio -idmv < lnx_920_disk2.cpio
cpio -idmv < lnx_920_disk3.cpio
mkdir 92040
unzip -d 92040 p3095277_9204_LINUX.zip
cd 92040
cpio -idmv < 9204_lnx32_release.cpio
You should now have three directories (Disk1, Disk2 and Disk3) containing installation
files and a 92040/Disk1 directory containing the patch installation files.

Set Kernel Parameters


The following table contains minimum kernel settings. If the current settings
exceed these figures then do not alter them:

Parameter Minimum Setting


SEMMNI 100
SEMMNS 256
SEMOPM 100
SEMMSL 100
SHMMAX 2147483648
SHMMIN 1
SHMMNI 100
SHMSEG 4096
SHMVMX 32767

The current semaphore settings can be viewed using the following command:
cat /proc/sys/kernel/sem

250 32000 32 128


The values listed are for the SEMMSL, SEMMNS, SEMOPM, and SEMMNI parameters.
The adjusted values can be set using:
# echo SEMMSL_value SEMMNS_value SEMOPM_value SEMMNI_value >
/proc/sys/kernel/sem
echo 250 32000 100 128 > /proc/sys/kernel/sem
The shared memory settings can be viewed using the following command:
cat shared_memory_parameter
The values can be set using:
echo 2147483648 > /proc/sys/kernel/shmmax
Set the File Handles, Sockets and Process limit using:
echo 65536 > /proc/sys/fs/file-max
ulimit -n 65536
echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range
ulimit -u 16384
The necessary parameter changes can be combined in a script and run during system
startup:
echo 250 32000 100 128 > /proc/sys/kernel/sem
echo 65536 > /proc/sys/fs/file-max
ulimit -n 65536
echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range
ulimit -u 16384
Alternatively the following lines can be added to the /etc/sysctl.conf file:
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
In addition the following lines can be added to the /etc/security/limits.conf file:
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
Adding lines into these files requires a reboot before they take effect.

Setup
Install the Java development kit:
# Make the bin file executable
chmod u+x j2sdk-1_3_1_09-linux-i586.rpm.bin
# Run the bin file. Agree to the terms and conditions.
./j2sdk-1_3_1_09-linux-i586.rpm.bin
# Install the RPM file.
rpm -ivh jdk-1.3.1_09.i586.rpm
Create the new groups and users:
groupadd oinstall
groupadd dba
groupadd oper
groupadd apache

useradd -g oinstall -G dba oracle


passwd oracle

useradd -g oinstall -G apache apache


passwd apache
Create the directories in which the Oracle software will be installed:
mkdir -p /u01/app/oracle/product/9.2.0.1.0
chown -R oracle.oinstall /u01
Login as the oracle user and add the following lines at the end of the .bash_profile file:
# Oracle 9i
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/9.2.0.1.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=TSH1; 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.1; export LD_ASSUME_KERNEL


TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
Save the .bash_profile file and re-login as the oracle user. Make sure the .bash_profile ran
correctly by issuing the following command:
set | more
The following setup steps relate to Metalink Note:252217.1 and must be performed as the
root user.

Install the following packages:


# From RedHat AS3 Disk 2
cd /mnt/cdrom/RedHat/RPMS
rpm -Uvh setarch-1.3-1.i386.rpm
rpm -Uvh tcl-8.3.5-92.i386.rpm

# From RedHat AS3 Disk 3


cd /mnt/cdrom/RedHat/RPMS
rpm -Uvh openmotif21-2.1.30-8.i386.rpm
rpm -Uvh compat-db-4.0.14-5.i386.rpm \
compat-gcc-7.3-2.96.122.i386.rpm \
compat-gcc-c++-7.3-2.96.122.i386.rpm \
compat-libstdc++-7.3-2.96.122.i386.rpm \
compat-libstdc++-devel-7.3-2.96.122.i386.rpm
Put gcc296 and g++296 first in $PATH variable by creating the following 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++
Make sure the hostname command returns a fully qualified host name by amending the
/etc/hosts file if necessary:
hostname
Install the 3006854 patch:
unzip p3006854_9204_LINUX.zip
cd 3006854
sh rhel3_pre_install.sh
Installation
Start the Oracle Universal Installer (OUI) by issuing the following command in the Disk1
directory:
./runInstaller
Continue with the installation, selecting the "Software Only" option. When the
ins_oemagent.mk error appears install the 3119415 patch:
unzip p3119415_9203_LINUX.zip
cd 3119415
sh patch.sh
Once this is complete click the retry button. Ignore the ins_ctx.mk error as this is fixed in
the 9.2.0.4.0 patch.

With the installation complete start the 9.2.0.4.0 patchset installation by issuing the
following command in the 92040/Disk1 directory:
./runInstaller
First complete the "Oracle Universal Installer 2.2.0.18.0" installation option, then complete
the "Oracle9iR2 Patch Set 3 9.2.0.4.0" installation.

The installation is now complete.

Post Installation
With this done the DBCA can be started to create a database instance using dbca from the
command line.

Once the instance is created edit the /etc/oratab file setting the restart flag for each instance
to 'Y':
TSH1:/u01/app/oracle/product/9.2.0.1.0:Y
Create a file called /etc/init.d/dbora containing the following:
#!/bin/sh
# description: Oracle auto start-stop script.
# chkconfig: - 20 80
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
ORA_HOME=/u01/app/oracle/product/9.2.0.1.0
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
;;
'stop')
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
;;
esac
Use chmod to set the privileges to 750:
chmod 750 /etc/init.d/dbora
Link the file into the appropriate run-level script directories:
ln -s /etc/init.d/dbora /etc/rc0.d/K10dbora
ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora
Associate the dbora service with the appropriate run levels:
chkconfig --level 345 dbora on
The relevant instances should now startup/shutdown automatically at system
startup/shutdown.

You might also like