Look in:

Web oracle-core-dba.blogspot.com
Showing posts with label Installation. Show all posts
Showing posts with label Installation. Show all posts

Thursday, September 13, 2007

Oracle Installation(9.2.0.1.0) on Red Hat Enterprise Linux 3 and upgrading to 9.2.0.4

In order to install an Oracle9iR2 database on RHEL 3, the "Oracle9iR2 Patch Set 3 9.2.0.4.0" patchset and some other patches must be applied. Some errors can only be fixed by applying the 9.2.0.4 patchset.
Patches required:
p3006854_9204_LINUX.zip
p3095277_9204_LINUX.zip
p3119415_9204_LINUX.zip

1. Install/Check the following RPMs (see Oracle Note:252217.1 for more information):
su - root
rpm -q patch name-->To check

rpm -ivh \
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 \
openmotif21-2.1.30-8.i386.rpm \
setarch-1.3-1.i386.rpm \
tcl-8.3.5-92.i386.rpm

2. Open a terminal window and log in as the root user.

3. The following local UNIX groups and user must exist on the system:

Groups: oinstall and dba
User: oracle

Now create the two groups oinstall, dba

#groupadd oinstall
#groupadd dba

Create the operating system user oracle:

#useradd -g oinstall -G dba oracle

Enter the following command to set the password of the oracle user:

#passwd oracle

4. Create the directory for the software installation and assign ownership to oracle:oinstall. In the example, you use /u01/app/oracle.

mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app
chmod -R 775 /u01/app

5. With an editor of your choosing, open /home/oracle/.bash_profile and add the entries to the appropriate file.

umask 022
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib
ORACLE_BASE=/u01/app/oracle/
ORACLE_HOME=/u01/app/oracle/product/9.2.0.1.0

#PATH=/u01/app/oracle/product/9.2.0.1.0/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin
export PATH
ORACLE_OWNER=oracle

ORACLE_SID=sid
ORACLE_SID=orcl
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_OWNER ORACLE_SID
export PATH LD_LIBRARY_PATH
CLASSPATH=:/u01/app/oracle/product/9.2.0.1.0/JRE:/u01/app/oracle/product/9.2.0.1.0/jlib:/u01/app/oracle/product/9.2.0.1.0/rdbms/jlib:/u01/app/oracle/product/9.2.0.1.0/network/jlib
export CLASSPATH
LD_ASSUME_KERNEL=2.4.1
export LD_ASSUME_KERNEL

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

6. Configuring Kernel Parameters

See my previous post for the kernel configuration settings.
Kernel Settings

---------

7. If now you execute runInstaller from the Oracle 9iR2 (9.2.0) CD, you will get the following error message:

Error occurred during initialization of VM
Unable to load native library: /tmp/OraInstall2007-8-25_03-14-57PM/jre/lib/i386/libjava.so:
symbol __libc_wait, version GLIBC_2.0 not defined in file libc.so.6 with link time reference

To resolve the __libc_wait symbol issue, download the p3006854_9204 patch p3006854_9204_LINUX.zip from http://metalink.oracle.com.

To apply the patch, run
su - root
# unzip p3006854_9204_LINUX.zip
Archive: p3006854_9204_LINUX.zip
creating: 3006854/
inflating: 3006854/rhel3_pre_install.sh
inflating: 3006854/README.txt

# cd 3006854
# sh rhel3_pre_install.sh
Applying patch...
Patch successfully applied
#

Now runInstaller can be started from the CD:
su - oracle
$ echo $LD_ASSUME_KERNEL # it is important that this variable is set!
2.4.1
$ /mnt/cdrom/runInstaller

You may get the following errors:

Error in invoking target install of makefile /u01/app/oracle/product/9.2.0/network/lib/ins_oemagent.mk.

Click ignore.
This will be fixed by applying the patch 3119415 after the 9.2.0.4 patchset has been applied.
You won't be able to apply the patch 3119415 at this time since the file /u01/app/oracle/oraInventory/ContentsXML/comps.xml doesn't exist yet.

Error in invoking target install of makefile /u01/app/oracle/product/9.2.0/ctx/lib/ins_ctx.mk.

Click ignore.
This is fixed by applying the 9.2.0.4 patchset.


Patching Oracle9iR2 on RH AS 3

To patch Oracle9iR2, download the Oracle 9i Release 2 Patch Set 3 Version 9.2.0.4.0 for Linux x86 from http://metalink.oracle.com.

Copy the downloaded "p3095277_9204_LINUX.zip" file to e.g. /tmp and run the following command:
su - oracle
$ cp p3095277_9204_LINUX.zip /tmp
$ cd /tmp
$ unzip p3095277_9204_LINUX.zip
Archive: p3095277_9204_LINUX.zip
inflating: 9204_lnx32_release.cpio
inflating: README.html
inflating: patchnote.css
$
$ cpio -idmv < 9204_lnx32_release.cpio
Disk1/stage/locks
Disk1/stage/Patches/oracle.apache.isqlplus/9.2.0.4.0/1/DataFiles/bin.1.1.jar
Disk1/stage/Patches/oracle.apache.isqlplus/9.2.0.4.0/1/DataFiles/lib.1.1.jar
...

To patch the runInstaller, run:
su - oracle
$ echo $LD_ASSUME_KERNEL # it is important that this variable is set!
2.4.1
$ cd /tmp/Disk1/
$ ./runInstaller

- Welcome Screen: Click Next
- File Locations: Use default values
- Available Products: Select "Oracle Universial Installer 2.2.0.18.0 !"
- Components Locations: Accept default values and click Next
- Summary: Start the Install
- At the end of the installation, you must exit runInstaller!

To patch Oracle9iR2, run:
su - oracle
$ echo $LD_ASSUME_KERNEL # it is important that this variable is set!
2.4.1
$ cd $ORACLE_HOME/bin
$ ./runInstaller

- Welcome Screen: Click Next
- File Locations: Use default values
- Available Products: Select "Oracle9iR2 Patch Set 3 9.2.0.4.0 !"
- Summary: Start the Install
- At the end of the installation, exit runInstaller

You may get the following error:

Error in invoking target install of makefile /u01/app/oracle/product/9.2.0/network/lib/ins_oemagent.mk.

Click ignore.
This will be fixed by applying the patch 3119415 after the 9.2.0.4 patchset has been applied.
The patch 3119415 cannot be applied while the patch process for the 9.2.0.4 patchset is running.

After the 9.2.0.4 patchset has been applied, download the patch p3119415_9204_LINUX.zip. Also, download the opatch Release 2.2.0 utility from http://metalink.oracle.com.

To install opatch, run:
su - oracle
$ cp p2617419_210_GENERIC.zip /tmp
$ cd /tmp
$ unzip p2617419_210_GENERIC.zip
Before you apply the 3119415 patch, you need to make sure the fuser binary can be found by the oracle user, see the PATH environment variable below. Otherwise the patch can't be applied because the fuser binary is used by opatch.

To apply the 3119415 patch, run
su - oracle
$ unzip p3119415_9204_LINUX.zip
$ cd 3119415
$ export PATH=$PATH:/tmp/OPatch
$ export PATH=$PATH:/sbin # the patch needs "fuser" which is located in /sbin
$ which opatch
/tmp/OPatch/opatch
$ opatch apply

Installation of 9iR2 with all required patches is completed succesfully.

Wednesday, August 01, 2007

Oracle 10G Installation on Red Hat Linux

First Install Linux with all the rpms and packages required.

1. Create Groups oinstall & dba, and oracle user as follows:

#groupadd oinstall
#groupadd dba
#useradd -g oinstall -G dba oracle
#passwd oracle

give a new password

2. Edit the .bash_profile file of oracle user and add the following lines as follows:

#vi /home/oracle/.bash_profile

umask 022

PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib

ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1
ORACLE_SID='SERVICE_NAME'
PATH=$ORACLE_HOME/bin:$PATH

export PATH LD_LIBRARY_PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID

:wq(save and exit)

3. Then run the .bash_profile to make the current changes effect

#. .bash_profile

Create the directory for the software installation and assign ownership to oracle:oinstall. In the example, you use /u01/app/oracle.

#mkdir -p /u01/app/oracle
#mkdir -p /u01/app/oracle/product/10.1.0/db_1

Then change the permissions accordingly

#chown -R oracle:oinstall /u01/app
#chmod -R 775 /u01/app

4. Edit the /etc/inittab file and change the runlevel from 5 to 3.
Note: Not required if using Oracle's Enterprise Linux.

5. If your OS is greater than RHEL 3, then the Oracle Universal Installer does not recognize the OS, change the version to 3 as follows:

#cp /etc/redhat-release /etc/redhat-release.orig
#vi /etc/redhat-release

#And replace the line present in the file with
Red Hat Enterprise Linux AS release 3 (Taroon)
:wq

Once the installation is completed replace the orignal file back.

#cp /etc/redhat-release.orig /etc/redhat-release

overwrite:yes

6. Change the Kernel Parameters according to your Hardware:

#vi /etc/sysctl.conf

kernel.sem= 250 32000 100 128
kernel.shmmax = 2147483648
kernal.shmmni = 4096
kernel.shmall = 262144000
fs.file-max= 1024
net.ipv4.ip_local_port_range= 1024 65000

:wq

Note: If any of the value is more than the value given above don't change those values.

7. To make the changes effect immediately without reboot give the following command:

#/sbin/sysctl -p

8. REBOOT(init 6) the system and login as oracle User:

9. You need to install Oracle in the GUI mode so change the display mode to GUI by giving followinh command:

$startx

10. Mount the media disk which contains the Oracle 10G software:
Note: It is recommended that you copy the contents of the CD onto the Filesystem and start the installation:

$cp /mnt/disk1/*.* /home/oracle/oracle10g

Give total permissions on the newly created folder oracle10g to oracle user

$chmod -R 777 /home/oracle/oracle10g

11. Then Start the installation as follows:

$sh /home/oracle/oracle10g/runinstaller.sh

The OUI is started and continue Installation of Oracle same as in Windows:

next>next>next>.....................................Finish.

Inbetween it prompts you to run two scripts as root

DON'T close the current window until you run the respected script as root in a new terminal.

1st script:

#root>sh /u01/app/oracle/oraInventory/orainstall.sh

After executing this script as root go to the previous screen and press the continue tab

2nd script:

#root> sh /u01/app/oracle/product/10.1.0/db_1/root.sh

After executing this script as root go to the previous screen and press the OK tab.


Your Installation of Oracle 10G on Linux is completed successfully(hopefully).