![]() |
Step By Step
Instructions on Installing Oracle 9iR2 32-bit (9.2.0.1)
on RedHat AS 3 x86 (RHEL3) / CentOS
3 x86 By Bhavin Hingu |
Before
you start installing Oracle 9iR2 software, please make sure that you
have
the below packages installed on your Linux box,
Oracle
Documents says that you need at least 512MB of memory and 1024MB of
swap space (Double the size of memory if you have
RAM larger than 2 gigs) to run Oracle (9i and above)
Database on Linux. Well, I have managed to successfully run one 9i and
2
10g instances (one ASM and one regular) simultaneously on a single
linux box with 512 MB of memory. You simply need to adjust
the init.ora memory parameter for that.
If
you do not have enough Swap Space, you can add extra temporary swap
space.
Oracle
recommends that you set shared memory segment attributes as well as
semaphores to the following values.
If not set, database instance creation will fail. I added the following
lines to /etc/sysctl.conf file. Every OS process needs
semaphore where It waits on for the resources. For more on semaphore,
please read the UNIX os documents.
NOTE:
If the current value for any parameter is higher than the value listed
in this table, then do not change
the value of that parameter.
To see the current setting in the kernel, please use the below command.
/sbin/sysctl -a
| grep sem -- for semmsl,
semmns, semopm, semmni
/sbin/sysctl -a
| grep shm -- for shmall, shmmax,
shmmni
/sbin/sysctl
-a | grep file-max
/sbin/sysctl
-a | grep ip_local_port_range
/sbin/sysctl -a
| grep rmem_default
Please
add/change the appropriate variables value in the /etc/sysctl.conf
file as shown below.
You
need OS “oracle” user account created which owns the Oracle
software. Oracle Software installation
needs
to be proceeds by this account. Oracle software installation (without
Companion CD) requires 2.5 GB
of
free space available for the ORACLE_BASE directory. Please make sure
that the mount point where you
Setting Shell Limits
for the Oracle User:
To improve the performance of the software on
Linux systems, you must increase the following shell limits
for the oracle
user:
Add
the following lines to the /etc/security/limits.conf file:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
Add or edit the following line in the /etc/pam.d/login file, if it does not already exist:
session required
/lib/security/pam_limits.so
For the Bourne, Bash, or Korn
shell, add the following lines to the /etc/profile:
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
For
the C shell (csh or tcsh), add the following lines to the
/etc/csh.login.
if ( $USER == "oracle" ) then
limit maxproc 16384
limit
descriptors 65536
endif
Create
the following symbolic links to put gcc296 and g++296 in the $PATH
variable. These are required during the relink process of Oracle
Software binaries.
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++
Executing
hostname should return the fully qualified name (hostname.domainname).
Default setting is sufficent (localhost.localdomain) if you are
installing for
experimental / learning purpose.
[root@shree root]# hostname
shree.oracledba.org
Unset the java environment Variable if any.
unset JAVA_HOME
Also make usre that oracle user does not have any installation related veriables set by default.
Creating Oracle
Software Directories:
Asp
per OFA, oracle base directory has the path:
/mount_point/app/oracle_sw_owner where,
mount_point
is
the mount point directory for the file system that will contain the
Oracle software. I have used
/u01
for the mount point directory. However, you could choose
another mount point directory,
such as /oracle
or /opt/oracle.
[root@shree root]# mkdir -p
/9i
[root@shree
root]#
chown -R oracle:oinstall /9i
[root@shree
root]# mkdir -p /u02/oradata/db920
[root@shree
root]# chown -R oracle:oinstall
/u02/oradata/db920
[root@shree root]# chmod -R 775 /9i
[root@shree root]# chmod -R 775 /u02/oradata/db920
Setup Oracle User
Environment:
If you have more than one Oracle
software installed on the machine, then you might want to create
.bash_profile
for each oracle home. For e.g, I have two oracle software installed on
my machine. I have created .bash_profile9i
for my 9i server and .bash_profile10g for my 10g server. I leave
.bash_profile to its default. If you are going to
install Only 9i, then no need to create extra profile file.
export ORACLE_BASE=/9i
export ORACLE_HOME=/9i/product/9.2.0
export ORACLE_SID=db920
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export LD_ASSUME_KERNEL=2.4.19
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORACLE_TERM=xterm
export PATH=$PATH:$ORACLE_HOME/bin:/opt/bin:/bin:/usr/bin:/usr/local/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/java/bin:.
export CLASSPATH=/9i/product/9.2.0/jdbc/lib/classes12.zip:/9i/product/9.2.0/JRE:/9i/product/9.2.0/jlib:/9i/product/9.2.0/rdbms/jlib:/9i/product/9.2.0/network/jlib:.
At this point you are ready to start Installing Oracle 9iR2.
Obtaining Oracle 9iR2
Base Software (9.2.0.1):
Goto
otn.oracle.com and download the appropriate Oracle 9iR2 Software into
the /tmp. Make Sure You have enough
space under this mount point. You
can check this using df command. I downloaded following 3 files from
OTN for my 32-bit Linux box
under the /tmp directory.
Along
with the base software (9.2.0.1) you also need to download and apply
patchsets on top of the base release to fix most of the bugs
that comes with base release (9.2.0.1). Please download the below
patches from the http://metalink.oracle.com. If you are installing for
experimental / learning purpose then you do not need to apply those
patches.
p3006854_9204_LINUX.zip: This
patch builds /etc/libwait.so and ld.so.preload files. The second file
is used to load the module
libcwait.so on every boot of OS. This is used to fix the below error
generated by executing runInstaller.
Error occurred during initialization of
VM
Unable to load native library:
/tmp/OraInstall2005-12-16_02-19-25AM/jre/lib/i386/libjava.so: symbol
__libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link
time reference
p2617419_10102_GENERIC.zip:
This patch supply the opatch utility which is used to apply oracle
patch.
p3095277_9204_LINUX.zip:
This patch is required to upgrade the 9.2.0.1 database server to
9.2.0.4 server.
p3119415_9204_LINUX.zip:
This patch fixes the linking error during the installation of
intelligent agent file: ins_oemagent.mk
Applying p3006854_9204_LINUX.zip:
Installing
Oracle 9iR2
Software
[root@shree root]# mount /mnt/cdrom
[root@shree
root]# su - oracle
[oracle@shree
oracle]$
echo $ORACLE_BASE
/9i
[oracle@shreeoracle]$ echo $ORACLE_SID
db920
[oracle@shree oracle]$ export
DISPLAY=shree.oracledba.org:0.0
[oracle@shree oracle]$ /mnt/cdrom/runInstaller
Applying p3119415_9204_LINUX.zip:
Creating Backup of the root.sh:
Oracle
recommends that you back up the root.sh
script after you complete an installation. If you install other
products
in the same Oracle home directory, then Oracle Universal
Installer updates the contents of the existing root.sh
script
during the installation. If you require information contained
in the original root.sh
script, then you can recover it from
the backed up root.sh
file.
Configuring New or Upgraded Databases:
Oracle
recommends that you run the utlrp.sql
script after creating or upgrading a database to recompile all
PL/SQL
modules that might be in an invalid state, including packages,
procedures, and types. This is an optional
step but Oracle recommends
that you do it during installation and not at a
later date.