Oracle Client / Server

This section describes how installing and configuring either a full Oracle Server (I used the free Express edition) or only the client. You only need to follow one of the two following subsections:

Installing Oracle Server

Install dependencies for Oracle Server:

# apt-get install libaio1

Go to  [1] and download either

  • Oracle Database Express Edition (Western European) or
  • Oracle Database Express Edition (Universal)

I downloaded the Universal version, in order to have full UTF8 support. Then:

# dpkg -i oracle-xe-universal_10.2.0.1-1.0_i386.deb

Then configure your server:

# /etc/init.d/oracle-xe configure

Note: I would suggest to keep the default port 1521 for the database listener unless you really have to do it another way. I found the trick to allow another non-default port to be used (see "Configuring TYPO3") but I would recommend to keep this default port anyway.

Update your environment variables (e.g., in ~/.bashrc):

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export NLS_LANG=.AL32UTF8

Then, of course, actually update your environment. For instance with:

# source ~/.bashrc

Create directory /etc/oracle that will be used to hold the well-known file tnsnames.ora:

# mkdir /etc/oracle

Update Apache2 environment variables by appending following lines to file /etc/apache2/envvars:

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:$LD_LIBRARY_PATH
export TNS_ADMIN=/etc/oracle
export NLS_LANG=.AL32UTF8

You may now connect to your Oracle Server either with sqlplus:

# sqlplus system@XE

SQL*Plus: Release 10.2.0.1.0 - Production on Sat May 2 03:45:22 2009

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Enter password: password

Connected to:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production

SQL>

or with a browser on  http://localhost:8080/apex/.

Creating a schema for TYPO3

  • Open  http://localhost:8080/apex/
  • Navigate to Administration > Database Users > Create User
  • Create a user, e.g. both TYPO3 as username and password

The service name will stay as XE and using this username/password will give you a schema dedicated to you, a bit like a database in MySQL.

That’s it!

Using an Existing Oracle Server

If you already have access to an Oracle Server somewhere on your network, you only need to install the Oracle Client.

Install dependencies for Oracle Express Client:

# apt-get install libaio1

I had to add the oracle user and dba group too:

# groupadd dba
# useradd oracle -g dba

Download latest Oracle Instant client from [2]. Then:

# dpkg -i oracle-xe-client_10.2.0.1-1.0_i386.deb

Update your environment variables (e.g., in ~/.bashrc):

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export NLS_LANG=.AL32UTF8

Then, of course, actually update your environment. For instance with:

# source ~/.bashrc

Update Apache2 environment variables by appending following lines to file /etc/apache2/envvars:

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:$LD_LIBRARY_PATH
export TNS_ADMIN=/etc/oracle
export NLS_LANG=.AL32UTF8

 

 

Causal Sàrl - Development, TYPO3, Consulting
Flattr