Sunday, 1 February 2009

Installing Oracle XE on Ubuntu 8.10 - x86_64

Today my goal was to install Oracle XE on my Laptop. For those who don't know, Oracle XE is the free version of the Oracle 10g database, with some limitations.

This should be pretty straight forward since the installer comes in debian packaging format and the site even says it's supported on Ubuntu. Oh but did I mention I'm running the amd64 version of Ubuntu. This is how I managed to successfully install Oracle XE

First download the Oracle XE debian package from the official site (the x86 version)
http://www.oracle.com/technology/software/products/database/xe/index.html

Whether you need the universal or the western-europe version depends on the applications you intend to run.

While this file is downloading you can start looking for the libaio 32bit library which is required to install the database.
Download the appropriate deb file
wget -c http://oss.oracle.com/debian/dists/unstable/main/binary-i386/libaio_0.3.104-1_i386.deb

After downloading both the library and the database file you can continue to install them with the debian package manager
sudo dpkg -i --force-architecture libaio_0.3.104-1_i386.deb
sudo dpkg -i --force-architecture oracle-xe-universal_10.2.0.1-1.1_i386.deb

The --force-architecture argument should prevent the package manager from exiting with the incompatible architecture error.

When the installation is complete you'll have to run the /etc/init.d/oraclexe configure script. When you aren't sure what you are doing it's best to leave everything to it's default setting. Meaning http port 8080 and database listener port 1521.

Once the script has been executing the Oracle XE database will be up and running and you can surf to http://localhost:8080/ to see if it's working.

Now the installation of the database is complete you can start developing your own application.  But before doing this you should take a look at Oracle Application Express, which is pre-installed with the Oracle XE database. Go to http://localhost:8080/apex/ and log in using system and the password you supplied during the configuration script. For more information about this product point your browser to http://apex.oracle.com/

Note: Before you start developing using apex, upgrade to the latest version (3.1.2). Oracle XE comes with version 2.x and there are many new features available in the lastest version. Read the How to upgrade at the bottom of this page http://www.oracle.com/technology/products/database/application_express/html/3.1_and_xe.html

Any question ask away in the comments.