Search This Blog

Total Pageviews

Monday 13 June 2011

How to install Oracle Client 11g on Red Hat Enterprise Linux 5 / centos 5

How to install Oracle Client 11g on Red Hat Enterprise Linux 5/centos 5
Oracle 11gr2 client installation on unix - 32 bit

linux_11gR2_client.zip



oinstall:x:1004:oracle,jtime79
dba:x:1003:oracle
oper:x:1005:oracle
jtime79:x:1006:



make a home dir

[root@apt-jtime-01 tmp]# mkdir -p /aptus/oracle/home


create group

[root@apt-jtime-01 tmp]# groupadd oinstall
[root@apt-jtime-01 tmp]# groupadd dba




[root@apt-jtime-01 tmp]# useradd -c "Oracle Software Owner" -g oinstall -G dba -d /aptus/oracle/home oracle
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.

[root@apt-jtime-01 tmp]# 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.



change the oracle owership

chown -R oracle:oinstall /aptus/oracle/home



[root@apt-jtime-01 tmp]# mkdir -p /opt/app/oracle

[root@apt-jtime-01 tmp]# chown -R oracle:oinstall /opt/app/oracle


install rpm <<<<<<<<<<<

yum install libXp gcc make setarch libaio glibc-devel


yum install gcc make setarch libaio glibc-devel
[root@apt-jtime-01 ~]# yum install libaio-devel
[root@apt-jtime-01 ~]# yum install elfutils-libelf-devel
[root@apt-jtime-01 ~]# yum install libstdc++-devel
[root@apt-jtime-01 ~]# yum install unixODBC
[root@apt-jtime-01 ~]# yum install unixODBC-devel
[root@apt-jtime-01 ~]# yum install pdksh



http://rpm.pbone.net/index.php3/stat/4/idpl/4423756/dir/whitebox/com/sysstat-5.0.5-15.0.1.el4.i386.rpm.html

[root@apt-jtime-01 ~]# ls -ltr
total 172
-rw-r--r-- 1 root root 5388 Jun 9 14:51 install.log.syslog
-rw-r--r-- 1 root root 30202 Jun 9 14:51 install.log
-rw------- 1 root root 1189 Jun 9 14:51 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 Jun 9 15:20 Desktop
-rw-r--r-- 1 root root 106868 Jun 13 12:24 sysstat-5.0.5-15.0.1.el4.i386.rpm




[root@apt-jtime-01 ~]# rpm -ivh sysstat-5.0.5-15.0.1.el4.i386.rpm
warning: sysstat-5.0.5-15.0.1.el4.i386.rpm: Header V3 DSA signature: NOKEY, key ID 73307de6
Preparing... ########################################### [100%]
1:sysstat ########################################### [100%]


[root@apt-jtime-01 tmp]# yum install gcc-c++
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.sov.uk.goscomb.net
* extras: mirror.sov.uk.goscomb.net
* updates: mirror.sov.uk.goscomb.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.i386 0:4.1.2-50.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================================================================
Installing:
gcc-c++ i386 4.1.2-50.el5 base 3.4 M

Transaction Summary
====================================================================================================================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)

Total download size: 3.4 M
Is this ok [y/N]: y
Downloading Packages:
gcc-c++-4.1.2-50.el5.i386.rpm | 3.4 MB 00:04
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : gcc-c++ 1/1

Installed:
gcc-c++.i386 0:4.1.2-50.el5

Complete!





yum list available "compat*" \
"elfutils*" \
"glibc*" \
"gcc*" \
"libaio*" \
"sysstat*" \
"unixODBC*"


then install

[root@apt-jtime-01 tmp]# yum install compat-libstdc++-33.i386

[root@apt-jtime-01 tmp]# yum install gcc44-c++.i386



[root@apt-jtime-01 tmp]# yum install unixODBC-kde.i386 ?????????



yum -y install compat-libstdc++-296.i386 \
compat-libstdc++-33.i386 \
elfutils-libelf-devel.i386 \
glibc-devel.i386 \
glibc-headers.i386 \
gcc.i386 \
gcc-c++.i386 \
libaio-devel.i386 \
sysstat.i386 \
unixODBC.i386 \
unixODBC-devel.i386






-bash-3.2$ unzip linux_11gR2_client.zip





-bash-3.2$ ls -ltr
total 627596
drwxr-xr-x 6 oracle oinstall 4096 Aug 18 2009 client
-rw-r--r-- 1 oracle oinstall 642016988 Jun 13 10:30 linux_11gR2_client.zip




to forword display use -Y

[anujs@apt-kvmsvr-01 ~]$ ssh -Y oracle@192.168.0.11
oracle@192.168.0.11's password:
/usr/bin/xauth: creating new authority file /aptus/oracle/home/.Xauthority




vi .bash_profile


/opt/app/oracle/product/11.2.0/db_1

[root@apt-jtime-01 oracle]# mkdir -p /opt/app/oracle/product/11.2.0/db_1
[root@apt-jtime-01 oracle]# /sbin/sysctl -a | grep net.ipv4.ip_local_port_range
[root@apt-jtime-01 oracle]# chown -R oracle:oinstall /opt/app/oracle/product/11.2.0/db_1




[root@apt-jtime-01 etc]# vi /etc/sysctl.conf


net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 2147483648
kernel.shmall = 2097152
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576


[root@apt-jtime-01 tmp]# /sbin/sysctl -p



Change /etc/pam.d/login file and add the followingn line:

session required pam_limits.so



[root@apt-jtime-01 tmp]# vi /etc/security/limits.conf


oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536



mkdir -p /opt/app/oracle/product/11.2.0/db_1

chown -R oracle:oinstall /opt/app/oracle/product/11.2.0/db_1







export ORACLE_HOME=/opt/app/oracle/product/11.2.0/db_1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH



[root@apt-jtime-01 11.2.0]# chown -R oracle:oinstall /opt/app/oracle/product/11.2.0/db_1
[root@apt-jtime-01 11.2.0]# chown -R oracle:oinstall /opt/app/oracle/product/11.2.0/db_1
[root@apt-jtime-01 11.2.0]# chown -R oracle:oinstall /opt/app/oracle/product/11.2.0/db_2
chown: cannot access `/opt/app/oracle/product/11.2.0/db_2': No such file or directory

[root@apt-jtime-01 11.2.0]# mkdir db_2
[root@apt-jtime-01 11.2.0]# chown -R oracle:oinstall /opt/app/oracle/product/11.2.0/db_2
[root@apt-jtime-01 11.2.0]# /opt/app/oracle/product/11.2.0/db_2/root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /opt/app/oracle/product/11.2.0/db_2

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.

Another app is currently holding the yum lock; waiting for it to exit

yum Another app is currently holding the yum lock; waiting for it to exit
Another app is currently holding the yum lock; waiting for it to exit
Another app is currently holding the yum lock; waiting for it to exit...

not able to install rpm on centos


[root@apt-jtime-01 tmp]# yum install libXp

Loaded plugins: fastestmirror
Existing lock /var/run/yum.pid: another copy is running as pid 2455.
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 38 M RSS ( 80 MB VSZ)
Started: Thu Jun 9 15:32:06 2011 - 3 day(s) 19:31:05 ago
State : Sleeping, pid: 2455

Another app is currently holding the yum lock; waiting for it to exit...




Exiting on user cancel.

check the process

[root@apt-jtime-01 tmp]# ps aux | grep yum
root 2383 0.0 1.0 25908 10404 ? SN Jun09 0:00 /usr/bin/python -tt /usr/sbin/yum-updatesd
root 2455 0.0 3.8 81496 39036 tty1 S+ Jun09 0:35 /usr/bin/python /usr/bin/yum upgrade
root 31788 0.0 0.0 4016 708 pts/0 S+ 11:04 0:00 grep yum

[root@apt-jtime-01 tmp]# kill -9 2383 2455


then try again

Oracle DBA

anuj blog Archive