Installing Oracle on Fedora
Download Software
Download the Oracle installation files from Oracle. This includes the 9.2.0.4 install file and the 9.2.0.5 and 9.2.0.6 patches.
Download the following patches (3006854, 3095277) from metalink.oracle.com.
Unpack Files
First uncompress the files:
gunzip *.cpio.gz
Next unpack the contents of the files:
for i in *.cpio
do
cpio -idmv < $i
done
You should now have three directories (Disk1, Disk2 and Disk3) containing installation files. We need to put them into a new directory so they don't get overwritten when we unzip the pathes:
mkdir 9204
mv Disk1 Disk2 Disk3 9204
Next unzip the patches and unpack them:
unzip p3501955_9205_LINUX.zip
mkdir 9205
mv Disk1 9205
unzip p3948480_9206_LINUX.zip
mkdir 9206
mv Disk1 9206
Set Kernel Parameters
The current semaphore settings can be viewed using the following command:
cat /proc/sys/kernel/sem
The values listed are for the SEMMSL, SEMMNS, SEMOPM, and SEMMNI parameters. The adjusted values can be set using:
echo 250 32000 100 128 > /proc/sys/kernel/sem
The shared memory settings can be viewed using the following command:
cat /proc/sys/kernel/shmmax
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
Create the new groups and users:
groupadd dba
useradd -m -g dba oracle
passwd oracle
Login as the oracle user and add the following lines at the end of the .bash_profile file:
# Oracle 9i
ORACLE_BASE=/home/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/9.2.0.4.0; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:$PATH; export PATH
ORACLE_OWNER=oracle; export ORACLE_OWNER
LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
ORACLE_OEM_JAVARUNTIME=/usr/java/jdk1.3.1_09; export ORACLE_OEM_JAVARUNTIME
LD_ASSUME_KERNEL=2.4.1; export LD_ASSUME_KERNEL
THREADS_FLAG=native; export THREADS_FLAG
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 Fedora Core 2
rpm -Uvh compat-libstdc++-7.3-2.96.126.i386.rpm
rpm -Uvh compat-libstdc++-devel-7.3-2.96.126.i386.rpm
rpm -Uvh compat-gcc-7.3-2.96.126.i386.rpm
rpm -Uvh compat-gcc-c++-7.3-2.96.126.i386.rpm
You will probably have to remove the existing compat-libstdc++ and compat-gcc packages from the system first.
Put gcc296 and g++296 first in $PATH variable by creating the following symbolic links:
mv /usr/bin/gcc /usr/bin/gcc342
mv /usr/bin/g++ /usr/bin/g++342
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 Oracle user $HOME directory:
./9204/Disk1./runInstaller
Continue with the installation, selecting the "Software Only" option. Ignore any installation errors.
With the installation complete start the 9.2.0.5.0 patchset installation.
Start the Oracle Universal Installer (OUI) by issuing the following command in the Oracle user's $HOME directory:
./9205/Disk1/runInstaller
First complete the "Oracle Universal Installer" installation option, then complete the "Oracle9iR2 Patch Set" installation.
With that installation complete start the 9.2.0.6.0 patchset installation.
Start the Oracle Universal Installer (OUI) by issuing the following command in the Oracle user's $HOME directory:
./9206/Disk1/runInstaller
First complete the "Oracle Universal Installer" installation option, then complete the "Oracle9iR2 Patch Set" installation.
Post Installation
Create your database using 'dbca':
Once the instance is created edit the /etc/oratab file setting the restart flag for each instance to 'Y':
MYDB:/home/oracle/product/9.2.0.4.0:Y
Create the init script:
Create a file called /etc/init.d/dbora containing the following:
#!/bin/sh
# chkconfig: - 20 80
#
# description: Oracle auto start-stop script.
# 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=/home/oracle/product/9.2.0.4.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
Add 'root' to the dba group (/etc/group) to allow the script to function correctly. The relevant instances should now startup/shutdown automatically at system startup/shutdown.
Create a database
You will need to launch:
$ORACLE_HOME/bin/dbca
and create a new database. Make sure you unlock the CTXSYS user's account.
Configure Listener
You will need to launch:
$ORACLE_HOME/bin/netca
and setup Oracle to NOT use Oracle names. Then setup the Oracle Listener to add your new database.