Custom Search . . .

Thursday, March 12, 2009

Oracle Installation in Red Hat Linux 4 (Using VM Box)


Oracle Installation in Red Hat Linux 4

OS : Red Hat Linux 4 (Throw VM Box)
DB Version: 10.2.0.1

Pre-Installation:

Memory verification
To check RPM Package.

Memory Verification:


[root@localhost proc]# cat meminfo grep Free
MemFree: 45428 kB
HighFree: 0 kB
LowFree: 45428 kB
SwapFree: 1048408 kB
HugePages_Free: 0

[root@localhost proc]# cat meminfo grep Total
MemTotal: 515676 kB
HighTotal: 0 kB
LowTotal: 515676 kB
SwapTotal: 1048568 kB
VmallocTotal: 499704 kB
HugePages_Total: 0

PS: MemTotal & SwapTotal memory available

[root@localhost proc]# free
total used free shared buffers cached
Mem: 515676 471592 44084 0 33716 280136
-/+ buffers/cache: 157740 357936
Swap: 1048568 160 1048408

[root@localhost etc]# cat redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 2)

To find Kernel Version


[root@localhost etc]# uname -r
2.6.9-22.EL

[root@localhost etc]# uname
Linux

[root@localhost etc]# uname -a
Linux localhost.localdomain 2.6.9-22.EL #1 Mon Sep 19 18:20:28 EDT 2005 i686 i686 i386 GNU/Linux

PS: As per Kernel version; need to download rpm packages from
http://rpmfind.net


To Check RPM Packages

[root@localhost etc]# rpm -q make gcc
make-3.80-5
gcc-3.4.4-2

[root@localhost etc]# rpm -q glibc
glibc-2.3.4-2.13

[root@localhost etc]# rpm -q compat
package compat is not installed

[root@localhost etc]# rpm -q compat-db
compat-db-4.1.25-9

[root@localhost etc]# rpm -q compat-gcc
package compat-gcc is not installed

[root@localhost etc]# rpm -q compat-gcc-c++
package compat-gcc-c++ is not installed

[root@localhost etc]# rpm -q compat-libstdc
package compat-libstdc is not installed

[root@localhost etc]# rpm -q open
open-1.4-21

[root@localhost etc]# rpm -q setarch
setarch-1.6-1

From my environment there are four packages missing.

How to install RPM Package

I have downloaded missing package from
http://rpmfind.net

[root@localhost Desktop]# ls -lr
total 5604
-rw-r--r-- 1 root root 359948 Mar 7 14:36 compat-libstdc++-devel-7.3-2.96.118 .i386.rpm
-rw-r--r-- 1 root root 1054177 Mar 7 14:36 compat-libstdc++-7.3-2.96.118.i386. rpm
-rw-r--r-- 1 root root 1848405 Mar 7 14:35 compat-gcc-c++-7.3-2.96.118.i386.rp m
-rw-r--r-- 1 root root 2437064 Mar 7 14:33 compat-gcc-7.3-2.96.118.i386.rpm

[root@localhost Desktop]# rpm -ivh compat-gcc-7.3-2.96.118.i386.rpm –aid -force
warning: compat-gcc-7.3-2.96.118.i386.rpm: V3 DSA signature: NOKEY, key ID db42a 60e
Preparing... ########################################### [100%]
1:compat-gcc ########################################### [100%]

[root@localhost Desktop]# rpm -q compat-gcc
compat-gcc-7.3-2.96.118
[root@localhost Desktop]# rpm -ivh compat-gcc-c++-7.3-2.96.118.i386.rpm –aid -force
warning: compat-gcc-c++-7.3-2.96.118.i386.rpm: V3 DSA signature: NOKEY, key ID d b42a60e
error: Failed dependencies:
compat-libstdc++ = 7.3 is needed by compat-gcc-c++-7.3-2.96.118.i386
compat-libstdc++-devel = 7.3 is needed by compat-gcc-c++-7.3-2.96.118.i3 86
[root@localhost Desktop]# rpm -ivh compat-libstdc++-7.3-2.96.118.i386.rpm
warning: compat-libstdc++-7.3-2.96.118.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
file /usr/lib/libstdc++-2-libc6.1-1-2.9.0.so from install of compat-libs tdc++-7.3-2.96.118 conflicts with file from package compat-libstdc++-296-2.96-13 2.7.2
file /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so from install of compat-lib stdc++-7.3-2.96.118 conflicts with file from package compat-libstdc++-296-2.96-1 32.7.2

[root@localhost Desktop]# rpm -e compat-libstdc++-296-2.96-132.7.2

PS: Getting error; that’s the reason just removing package and then installing.

[root@localhost Desktop]#
[root@localhost Desktop]# rpm -ivh compat-libstdc++-7.3-2.96.118.i386.rpm –aid -force
warning: compat-libstdc++-7.3-2.96.118.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:compat-libstdc++ ########################################### [100%]
[root@localhost Desktop]#
[root@localhost Desktop]#
[root@localhost Desktop]# rpm -ivh compat-libstdc++-devel-7.3-2.96.118 –aid -force
error: open of compat-libstdc++-devel-7.3-2.96.118 failed: No such file or directory
[root@localhost Desktop]# ls -lr
total 5604
-rw-r--r-- 1 root root 359948 Mar 7 14:36 compat-libstdc++-devel-7.3-2.96.118.i386.rpm
-rw-r--r-- 1 root root 1054177 Mar 7 14:36 compat-libstdc++-7.3-2.96.118.i386.rpm
-rw-r--r-- 1 root root 1848405 Mar 7 14:35 compat-gcc-c++-7.3-2.96.118.i386.rpm
-rw-r--r-- 1 root root 2437064 Mar 7 14:33 compat-gcc-7.3-2.96.118.i386.rpm
[root@localhost Desktop]# rpm -ivh compat-libstdc++-devel-7.3-2.96.118.i386.rpm –aid -force
warning: compat-libstdc++-devel-7.3-2.96.118.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:compat-libstdc++-devel ########################################### [100%]
[root@localhost Desktop]#
[root@localhost Desktop]# rpm -ivh compat-gcc-c++-7.3-2.96.118.i386.rpm –aid -force
warning: compat-gcc-c++-7.3-2.96.118.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:compat-gcc-c++ ########################################### [100%]




From Operating System level user creation and modification

To Check Oracle User and DBA Group already exist or not.

[root@localhost etc]# grep dba /etc/group

[root@localhost etc]# grep dba /etc/group

[root@localhost etc]# grep oinstall /etc/group

[root@localhost sbin]# usermod -g oinstall -G dba oracle
usermod: user oracle does not exist



User and Group does’t available; so; I’m creating user and group

[root@localhost sbin]# groupadd dba
[root@localhost sbin]#
[root@localhost sbin]# groupadd oinstall

[root@localhost sbin]# id
uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) context=root:system_r:unconfined_t

[root@localhost sbin]#
[root@localhost sbin]# useradd -g oinstall -G dba oracle
[root@localhost sbin]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost sbin]# id nobody
uid=99(nobody) gid=99(nobody) groups=99(nobody)

Checking Kernel Parameters


For Oracle Installaion; Need to configure kernel parameter from SysCtl.conf

Just add the below parameter in /etc/sysctl.conf using vi editor

kernel.core_uses_pid = 1
#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
rmem_default = 262144
rmem_max = 262144
wmem_default = 262144
wmem_max = 262144

#/usr/bin/sysctl –p ( for effecting the kernel parameters-no need for reboot)
Once everything completed just re-boot your operating system because you have changed kernel parameter from sysctl.conf

After re-booting operating system try to login using “Oracle” User And try to install Oracle database using

[oracle@localhost dbback]$ ls
archive data software u01


[oracle@localhost dbback]$

[oracle@localhost /home/oracle]$ vi .bash_profile

export ORACLE_HOME=/u01/oracle/product/10.2.0.1
export ORACLE_BASE=/u01/oracle
export LD_LIBRARY_PATH=/u01/oracle/product/10.2.0.1/lib
export LD_ASSUNE_KERNEL=2.4.19
export PATH=$PATH:/u01/oracle/product/10.2.0.1/bin

:wq! (save and exit)
%s/oldvalue/newvlaue/g --- replace in vi



[oracle@localhost dbback]$ cd software/

[oracle@localhost software]$ ls
10201_database_linux32.zip database

[oracle@localhost software]$ cd database/

[oracle@localhost database]$ ls -lr
total 52
-rwxrwxr-x 1 oracle oinstall 5213 Jul 2 2005 welcome.html
drwxrwxr-x 9 oracle oinstall 4096 Jul 2 2005 stage
-rwxrwxr-x 1 oracle oinstall 1327 Jul 2 2005 runInstaller
drwxrwxr-x 2 oracle oinstall 4096 Jul 2 2005 response
drwxrwxr-x 5 oracle oinstall 4096 Jul 2 2005 install
drwxrwxr-x 9 oracle oinstall 4096 Jul 2 2005 doc

[oracle@localhost database]$ ./runInstaller
Starting Oracle Universal Installer...

Checking installer requirements...


Once successfully install oracle you many need configure two scripts from root user.

/home/oracle/oraInventory/orainstRoot.sh
/dbback/u01/app/oracle/product/10.2.0/db_1/root.sh

Like


[oracle@localhost ~]$ su - root
Password:

[root@localhost ~]# id

uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel) context=root:system_r:unconfined_t

[root@localhost ~]# /home/oracle/oraInventory/orainstRoot.sh
Changing permissions of /home/oracle/oraInventory to 770.
Changing groupname of /home/oracle/oraInventory to oinstall.
The execution of the script is complete
[root@localhost ~]# /dbback/u01/app/oracle/product/10.2.0/db_1/root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /dbback/u01/app/oracle/product/10.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.

Feel free to post your comments...


2 comments:

Anonymous said...

you have got warning when you want to install the packages.

if you chek you find that the packages was not installed.

to chek use this command:

rpm -q < package name>

i want to know how we can fix the warning

Babu B said...

Thanks for your comments

Try this

rpm -ivh rpm package name --aid --force

Thanks