Installing the Oracle Client on Ubuntu

29 Dec

Installing the Oracle Client on Ubuntu
1. Prepare Linux
ubs@ubs-desktop:~$ sudo lsb_release -a
LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:cxx-3.0- ia32:cxx-3.0-noarch:cxx-3.1-ia32:cxx-3.1-noarch:cxx-3.2-ia32:cxx-3.2-noarch:desktop-3.1-ia32:desktop-3.1-noarch:desktop-3.2-ia32:desktop-3.2-noarch:graphics-2.0-ia32:graphics-2.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch:graphics-3.1-ia32:graphics-3.1-noarch:graphics-3.2-ia32:graphics-3.2-noarch:qt4-3.1-ia32:qt4-3.1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 9.04
Release: 9.04
Codename: jaunty

2. download from oracle otn
ubs@ubs-desktop:~$ pwd
ubs@ubs-desktop:~$ mkdir oracle
ubs@ubs-desktop:~$ unzip -d /home/ubs/oracle/

3. create the ORACLE_BASE directory
ubs@ubs-desktop:~/oracle/client$ sudo su – root
[sudo] password for ubs:
root@ubs-desktop:~# mkdir -p /u01/app/oracle

4. create oracle user, dba and oinstall groups
root@ubs-desktop:~# addgroup oinstall
root@ubs-desktop:~# addgroup dba
root@ubs-desktop:~# addgroup nobody
root@ubs-desktop:~# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
root@ubs-desktop:~# usermod -g nobody nobody
root@ubs-desktop:~# mkdir /home/oracle
root@ubs-desktop:~# chown oracle.oinstall /home/oracle

5. change the owner of the target directory.
root@ubs-desktop:~# chown oracle:oinstall -R /u01/app/oracle

6. Simlnks:
root@ubs-desktop:~# ln -s /usr/bin/awk /bin/awk
root@ubs-desktop:~# ln -s /usr/bin/rpm /bin/rpm
root@ubs-desktop:~# ln -s /usr/bin/basename /bin/basename

7. add profile environment

root@ubs-desktop:~# vi /etc/profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/client_1
export PATH=$PATH:/u01/app/oracle/product/10.2.0/client_1/bin

root@ubs-desktop:~# exit

8. Run the installer, login as the oracle user
ubs@ubs-desktop:~$ whoami
ubs@ubs-desktop:~$ xhost +
access control disabled, clients can connect from any host

ubs@ubs-desktop:~$ sudo su –
root@ubs-desktop:~# su – oracle
oracle@ubs-desktop:~$ DISPLAY=:0.0; export DISPLAY
oracle@ubs-desktop:~$ xclock
oracle@ubs-desktop:~$ whoami

oracle@ubs-desktop:/$ cd /home/ubs/oracle/client/
oracle@ubs-desktop:/home/ubs/oracle/client$ ./runInstaller -ignoreSysPrereqs

9. configure the $ORACLE_HOME/network/admin/tnsnames.ora

10. if you want a different user other than oracle to use the tools you’ll need to add them to the oinstall and dba groups.
ubs@ubs-desktop:~$ nano /etc/group

11. testing
ubs@ubs-desktop:~$ whoami
ubs@ubs-desktop:~$ sqlplus scott/tiger@ppc

SQL*Plus: Release – Production on Mon Dec 28 15:57:17 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release – Production
With the Partitioning, OLAP and Data Mining options

SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release – Production
With the Partitioning, OLAP and Data Mining options

12. copy for lazarus + zeos + oracle connection
root@ubs-desktop:~# cp /u01/app/oracle/product/10.2.0/client_1/lib/ /usr/lib
root@ubs-desktop:~# cp /u01/app/oracle/product/10.2.0/client_1/lib/ /usr/local/lib

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: