In this second part of a three-part series on the different ways to interact with Oracle Database XE, you'll learn how to install a Linux client and use the SQL command line. This article is excerpted from chapter 29 of the book Beginning PHP and Oracle: From Novice to Professional, written by W. Jason Gilmore and Bob Bryla (Apress; ISBN: 1590597702).
Installing the Linux Client
Navigate to the Oracle Web site download area for Oracle Database XE, http://www.oracle.com/ technology/software/products/database/xe/ index.html, and follow the links to download the Linux version of Oracle Database XE. Registration for OTN is required but free and gives you access to many other resources onhttp://otn.oracle.com. The Linux version will run fine on the distributions mentioned in Chapter 26. The installation may work on other Linux distributions, but proceed at your own risk.
There are two installation files available,oracle-xe-client-10.2.0.1-1.0.i386.rpmandoracle-xe-client_10.2.0.1-1.0_i386.deb. As you might expect, the first one works with all Linux distributions except for Debian, and the second one is packaged specifically for the Debian package manager.
To begin the installation process, locate therpmfile you just downloaded, and run therpmcommand as follows:
The installation for a Debian environment is similar:
$ dpkg -i oracle-xe-client_10.2.0.1-1.0_i386.deb
A Linux client installation provides many of the same features as a Windows client installation, such as ODBC drivers. In addition, a client installation provides the shell scriptsoracle_env.csh(for C shell or tcsh shell) andoracle_env.sh(for Bourne, Bash, or Korn shell) to set up the Oracle-related environment variables. You can run these scripts on an as-needed basis or incorporate them into your login or profile files.
The Linux client requires approximately 70MB of disk space.