Oracle client

From ArchWiki
Revision as of 04:32, 22 March 2012 by Malvineous (talk | contribs) (Instructions for creating Oracle Instant Client packages from the AUR)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This document will explain how to install the Oracle database client under Arch Linux. The client is used to connect to Oracle databases running on other machines. If you want to host Oracle databases for others to use, see the instructions for setting up an Oracle database server.

Method 1: AUR

The easiest method is to use the build scripts in the AUR. Due to the way Oracle provides downloads of their software, the files cannot be retrieved automatically. You must download the necessary .zip files manually and place them in the same directory as the PKGBUILD from AUR, before running makepkg. You will need an Oracle account before you can log in and download the .zip files.

Relevant packages

The packages required from the AUR are:

Installing each package

Download the tarball from the AUR.

$ wget
$ tar zxvf oracle-instantclient-basic.tar.gz
$ cd oracle-instantclient-basic

Download the relevant .zip file from Oracle. You can run makepkg to find out what file you need and where to get it from.

$ makepkg
==> ERROR: You need to download

  -> This software cannot be downloaded automatically.  You will need to sign up
  -> for an Oracle account and download the software from Oracle directly.  Place
  -> the downloaded file in the same directory as the PKGBUILD and re-run makepkg.
  -> The source .zip files can be downloaded from:
  -> i686   -
  -> x86_64 -

Once the file has been downloaded from Oracle and placed in the same directory as the PKGBUILD, run makepkg again.

$ makepkg -ic

This will create the package and install it via sudo. After installing oracle-instantclient-basic you will need to re-source the profile script in any open shells, in order to pick up the newly added environment variables.

source /etc/profile

Without this, some programs will complain that they cannot find the Oracle client.

Installation paths

When using the packages in the AUR, the TNSNAMES file should be saved as /etc/tnsnames.ora. ORACLE_HOME should be set automatically to /usr in any new shells opened after the install, courtesy of /etc/profile.d/