Tuesday, November 11, 2008

Installation guide for 64 bit Oracle 9i on 64 bit Linux.

Installation guide for 64 bit Oracle 9i on 64 bit Linux.

Packages (RPMs) required for Red Hat Linux Advanced Server 4 (AMD64/EM64T)

These are the most important rpm’s for this installation

libaio-devel-0.3.102-1.i386.rpm
compat-libcwait-2.1-2.x86_64.rpm

rest these binaries are also required …….

compat-db-4.1.25-9.i386.rpm
compat-gcc-32-3.2.3-47.3.i386.rpm
glibc-devel-2.3.4-2.i386.rpm
glibc-headers-2.3.4-2.i386.rpm
glibc-kernheaders-2.4-9.1.87.i386.rpm
cpp-3.4.3-9.EL4.i386.rpm
compat-gcc-32-c++-3.2.3-47.3.i386.rpm
compat-libstdc++-33-3.2.3-47.3.i386.rpm
gcc-3.4.3-9.EL4.i386.rpm
cpp-3.4.3-9.EL4.i386.rpm
gcc-c++-3.4.3-9.EL4.i386.rpm
libstdc++-devel-3.4.3-9.EL4.i386.rpm
openmotif21-2.1.30-11.RHEL4.2.i386.rpm
xorg-x11-deprecated-libs-6.8.1-23.EL.i386.rpm
compat-libgcc-296-2.96-132.7.2.i386.rpm
compat-libstdc++-296-2.96-132.7.2.i386.rpm
libaio-0.3.102-1.i386.rpm

for getting the rpm compat-libcwait-2.1-2.x86_64.rpm down load p5386899_40_Linux-x86-64 from metalink.oracle.com or get it from rpm.pbone.net

NOTE: i386 packages might require the --force option during installation if the 64-bit version of the same package is already installed. For example, "rpm -ivh --force glibc-devel-2.3.4-2.9.i386.rpm" may be required.

Next, as root, modify your kernel settings in /etc/sysctl.conf as follows:

kernel.hostname = yourhost.yourdomain.com
kernel.domainname = yourdomain
fs.file-max = 327679
kernel.shmmax = 2147483648 ( In the case of 32-BIT it can not be more then 4
GB but in the case of 64 BIT you can increase as much as required.
kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 1024 65000

after saving the file type sysctl –p on the prompt and press enter.

Add the following settings to /etc/security/limits.conf

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 pam_limits.so

Creating Oracle User Accounts

su – root
groupadd dba # group of users to be granted with SYSDBA system privilege
groupadd oinstall # group owner of Oracle files
useradd -c "Oracle owner" -g oinstall -G dba oracle
passwd oracle

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++

if you don’t find the above written lines to move then ignore these eg. mv /usr/bin/gcc /usr/bin/gcc323

Relink the oracle binary again, Once you are done, make sure to revert back the changes you've made

mv /usr/bin/gcc323 /usr/bin/gcc
mv /usr/bin/g++323 /usr/bin/g++

Creating Oracle Directories

su – root
mkdir -p /software/app/oracle/product/9.2.0
chown -R oracle.oinstall /u01 ( /u01 is the path where u r installing the oracle ex. /u01, /software, /data, etc ).
This is for changing the ownership of the directory

mkdir /var/opt/oracle
chown oracle.dba /var/opt/oracle
chmod 755 /var/opt/oracle

Setting Oracle Environments Variables

edit the following lines in /home/oracle/.bash_profile
export ORACLE_BASE=/software/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
export ORACLE_SID=test
export ORACLE_TERM=xterm
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin


For the Display related settings …

The version of the openmotif should be
openmotif21-2.1.30-11.RHEL4.2

[root@brp ~]# cd /etc/X11/gdm/
[root@brp gdm]# gedit gdm.conf

Set DisallowTCP=false and Save the file and restart gdm

[root@brp gdm]# gdm-restart

[root@erp gdm]# export DISPLAY=erp.isl.com:0.0
[root@erp gdm]# xhost +
access control disabled, clients can connect from any host
[root@erp gdm]# xhost +erp.isl.com
brp.isl.com being added to access control list

for testing type xclock or xterm


Run the Installer

switch to the oracle user to run the installer. / su – oracle
su - rootmount /mnt/cdrom next à note : don’t do cd/media/cdrom/Disk1and run the runInstallter go n this way su – oracle/media/cdrom/Disk1/runInstallter with in a minute the Oracle screen will appear on u r screen.


Note :

switch to the oracle user to run the installer. / su – oracle
if u r system gets hang don't worry restart it, switch to oracle user and set the LD_ASSUME_KERNEL again.
don't surf for removing the error xlib: … DISPLAY error can't connect to oracle server.
simply switch on with su - root and mount the media and log out from the root user then log on
with the oracle. ( this exercise is done because not to disturb the display variables ).

Or

another reason is you have to start setup from the user who has the rights of DBA or authentication to install the software.

Or

simply give the rights to the oracle user for root.


Now move to the sql prompt.

SQL> CONNECT / AS SYSDBA or conn “/as sysdba”
SQL> SHUTDOWN
SQL> EXIT

Restart the database

$ sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> EXIT