DavidYahalom.com is an IT knowledgebase dedicated to the world of databses and RDBMS systems by David Yahalom. Here you'll find articles, views, news, tips and in-depth analysis about Oracle, DB2 LUW, Sql Server and MySql. I hope you'll enjoy your stay.
8th
OCT
Installing Oracle 9 on RHEL4
Posted by David Yahalom under Linux, Oracle
Installing Oracle 9i on RHEL4 isn’t difficult but requires a certain set of pre-installation actions that aren’t very well documented in the Oracle official installation readme.
This could lead to allot of frustration and hair pulling during installation if you don’t follow the exact set of actions described in this document.
The following errors are known errors which may appear during the Oracle 9i installation on RHEL4. Usually, the cause for these problems is a bad configuration or package dependency at the O/S level. These errors can usually be easily fixed but following the procedure described in this document.
compat-gcc-32 is needed by compat-oracle-rhel4-1.0.5.i386 error invoking target 'install' of makefile $ORACLE_HOME/sqlplus/lib/ins_sqlplus.mk error invoking target relink of makefile $ORACLE_HOME/precomp/lib/ins_precomp.mk GLIBC_2.0 not defiend in file libc.so.6 with link time reference...
Installing RHEL4/ CentOS 4.1
Continue to installing RHEL4/CentOS 4.1 normally as you would usually do just make sure that you have allocated at least 2GB of swap space, disabled SE Linux (THIS IS CRITICAL) and installed the following packages:
X Window System, GNOME, Editors, Server configuration tools, Administration tools, development tools and system tools.
Create users and groups:
As with any Oracle installation we will need to create two groups and one user before we can continue with the installation.
To do so we will run the following commands as root:
groupadd oinstall groupadd dba useradd -g oinstall -G dba oracle passwd oracle
This creates two Linux groups named oinstall and dba and a user called Oracle that is made a member of these two groups.
Create the directory structure:
Before we extract and install the Oracle software we will need to create the directory structure first. You can obviously use any directory structure you want but the dir structure I’m using here is popular amongst many DBAs.
Run the following commands as root:
mkdir /oracle mkdir /oracle/9i chown -R oracle:oinstall /oracle mkdir /osource chown -R oracle:oinstall /osource
This creates two directories (/oracle and /osource). The oracle home will be located in /oracle and the raw installation files in /osource.
Now we will edit the bash_profile file for the Oracle user located in /home/oracle/.bash_profile and add the following lines at the end:
#### Oracle 9i parameters #### ORACLE_BASE=/oracle ORACLE_HOME=/oracle/9i ORACLE_SID=[ENTER SID NAME HERE] PATH=$ORACLE_HOME/bin:$PATH:. LD_LIBRARY_PATH=$ORACLE_HOME/lib; CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib; LD_ASSUME_KERNEL=2.4.19;</code> export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH export LD_LIBRARY_PATH export CLASSPATH export LD_ASSUME_KERNEL
Download Oracle 9i for Linux:
Download the Oracle CDs from otn.oracle.com. The version I’m using in this tutorial is 9.2.0.4.
Beside the Oracle CDs you will also need to download an additional compatibility patch from Metalink. Patch number 4198954. This patch contains two RPMs that we need to install:
compat-oracle-rhel4-1.0-5.i386.RPM compat-libcwait-2.0-2.i386.RPM
But more on this later on. For now, just download the zip file from the note.
Save all files in the /osource directory we created earlier.
Unpacking the files:
After we have downloaded the Oracle CDs we will need to extract the files inside.
To do this run the following commands as the oracle user:
Cd /osource gunzip ship_9204_linux_disk1.cpio.gz gunzip ship_9204_linux_disk2.cpio.gz gunzip ship_9204_linux_disk3.cpio.gz
Followed by:
cpio -idmv < ship_9204_linux_disk1.cpio cpio -idmv < ship_9204_linux_disk2.cpio cpio -idmv < ship_9204_linux_disk3.cpio
(CPIO is an archive utility usually used for tape backups. You can read more about it here.)
After successful completion of the above steps you should now have three directories inside /osource named “Disk1″, “Disk2″ and “Disk3″.
Configure host parameters:
Make sure /etc/hosts contains a FQN of this server. If the hostname of the server isn’t pingable from the server itself, you’ll have problems later on.
[IP_ADDR] [FQ machine name] [machine name]
Configure kernel Parameters:
Login as root and add the following lines to /etc/sysctl.conf file:
kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 262144 net.core.wmem_default = 262144 net.core.rmem_max = 262144 net.core.wmem_max = 262144
Make sure there is a cartridge return after the last line. This is important.
Save the file and run /sbin/sysctl -p to apply the new values to the currently running host.
Add the following lines to /etc/security/limits.conf file:
oracle soft nofile 65536 oracle hard nofile 65536 oracle soft nproc 16384 oracle hard nproc 16384
Pre installation configuration:
As with Metalink note 303859.1 there are additional packages required before we can continue with our Oracle installation.
All the required packages are on the RHEL CDs but they might not have been installed during the initial O/S installation (depending on the selections you
made during package selection).
RHEL Disk 2 / Centos 4.1 Disk 1
cd /media/cdrom/CentOS/RPMS
OR
cd /media/cdrom/RedHat/RPMS
rpm -Uvh xorg-x11-deprecated-libs-6* rpm -Uvh make-3* rpm -Uvh compat-libstdc++-33-3*
RHEL Disk 3 / Centos 4.1 Disk 2
cd /media/cdrom/CentOS/RPMS
OR
cd /media/cdrom/RedHat/RPMS
rpm -Uvh xorg-x11-devel* rpm -Uvh xorg-x11-deprecated-libs-devel-6* rpm -Uvh gcc-c++-3* rpm -Uvh gnome-libs-1* rpm -Uvh freetype-devel* rpm -Uvh compat-db* rpm -Uvh gcc-3* rpm -Uvh fontconfig-devel*
RHEL Disk 4 / Centos 4.1 Disk 3
cd /media/cdrom/CentOS/RPMS
OR
cd /media/cdrom/RedHat/RPMS
rpm -Uvh compat-libgcc-296-2* rpm -Uvh openmotif21-2* rpm -Uvh compat-gcc-32-c++-3* rpm -Uvh compat-gcc-32-3* rpm -Uvh compat-libstdc++-296-2* rpm -Uvh libaio-devel-0* rpm -Uvh libaio-0* rpm -Uvh gnome-libs-devel-1*
It is okay if during installations of some of these packages you’ll receive a message indicating some of these packages are already installed.
Now we’ll install the Metalink patch (4198954) we downloaded earlier. Extract the two packages located in the patch and run the following commands:
rpm -Uvh compat-libcwait-2* rpm -Uvh compat-oracle-rhel4-1*
Be advised that the second rpm is actually only a placeholder for checking if certain RPMs are installed on your system. If during the installation of either of the two RPMs above you get an error indicating a dependency error (such as “compat-gcc-32 is needed by compat-oracle-rhel4-1.0.5.i386″) DO NOT CONTINUE! Go back to the beginning of this document and check if there was anything you may have accidentally missed. The installation will not work otherwise.
Installation:
Now you are ready to continue with the graphical installation of Oracle 9.
Leave a Reply
Post Meta
-
October 8, 2007 -
Linux, Oracle -
No Comments
-
Comments Feed
DavidYahalom.com - Oracle, Databases, SQL, news, views, articles and in-depth analysis is powered by Wordpress. Designed by Free WordPress Themes.
