Oracle 10g Client Tools on Ubuntu 7.10

Hey all, Having been using Ubuntu on my home PC for about 18 months I’ve finally switched my work PC too, There’s a load of stuff I need from Windows so I have a VM of XP running too but I want as much as possible in the host Ubuntu system. I looked high and low for a how-to for the Oracle client tools to no avail so I adapted this how-to on installing the Oracle Database 10g on Ubuntu 5.10. Note that I’m using the 10g r2 Oracle tools as I’m only working on 10g r2 databases for the moment:

Activate the root account:

First off, as the installer and other steps are required to be done as root I suggest you unlock the root account. You can just use sudo but I found it easier this way

$ sudo passwd root

Install required packages:

You’ll need all of these to get the installer to work properly:

# apt-get install gcc make binutils lesstif2 libc6 libc6-dev rpm libmotif3 libaio libstdc++5 gawk alien libg++ ksh gcc-3.3 g++-3.3 libstdc++5

You’ll also need to add the /etc/redhat-release file to trick the installer into thinking that you’re running a supported OS.

echo "Red Hat Linux release 4" > /etc/redhat-release

Directories, users and groups:

create the ORACLE_BASE directory where you want the installation to go

# mkdir -p /u01/app/oracle

then create the oracle user, the dba and oinstall groups and change the owner of the target directory. We’ll also need to add the nobody group because Ubuntu sets the nobody user as a member of nogroup but the installer expects it to be a member of the nobody group.

# addgroup oinstall
# addgroup dba
# addgroup nobody
# useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
# usermod -g nobody nobody
# chown oracle:oinstall -R /u01/app/oracle


The Oracle installer apparently uses absolute paths for some of the binaries which are stored in a different place in Ubuntu to where Oracle expects so we need to create simlinks so it can find them

# ln -s /usr/bin/awk /bin/awk
# ln -s /usr/bin/rpm /bin/rpm
# ln -s /usr/bin/basename /bin/basename

Run the installer:

Now, logged into gnome as the oracle user download the Oracle client tools and unpack to a staging directory then start the Oracle installer.

$ mkdir ~/stage
$ unzip ~/stage

Once the install is completed you need to add the appropriate environment variables, I added the following lines to /etc/profile so that all users on the system get them:
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

and finally configure the $ORACLE_HOME/network/admin/tnsnames.ora file for your environment. 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.


10 thoughts on “Oracle 10g Client Tools on Ubuntu 7.10

  1. Hello,
    I followed the tutorial to install 10g Client to my Ubuntu box, but i get the following error while the installer installing the selected packages:
    Error in invoking target “irman utilities” of makefile.

    What can be the reason?

  2. Hi Bahadir,
    Congratulations on having the first comment on this blog! It’s kind of a milestone that tells me that somebody out there finds what I write useful so thanks for that.
    Anyway, to your problem. I think ‘irman’ is the rman installation routine. I would guess that the makefile involved is called ‘’, if that is the case you may need to add the ORACLE_HOME variable before starting the Oracle installer. If that doesn’t work it would be useful to see the contents of the log file generated by the error, that should tell us exactly where the failure is occurring.

  3. These instructions are great! It worked exactly as described. I wasn’t quite clear what the oracle user was for. It didn’t seem to get used. Also, it installed everything under my username, not oracle or oinstall. But it worked anyway, and it’s a local dev install so I don’t really care.


  4. I have installed Oracle-xe via the package manager in Ubuntu 8.10. But I now have one problem it never asked me for a admin passwd so I try to the ‘sqlplus sys as sysdba’ but it asks for pass I never set. Can anyone help how do I reset this of if I have to reinstall how can I specify this on install.

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