Installing Oracle 10g Express Edition on Ubuntu

This was a bit tricky... So here it goes, in case anybody else in the world would like to do it. Full installation instructions can be found here, however I hope that these steps will help:

0. Downlad the Debian pacakge (oracle-xe-universal_10.2.0.1-1.0_i386.deb) from

0. First of all, you need to su as root, and unfortunatelly sudo is not enough! Oracle will not install properly unless you do that:

sudo -s

You might want to add 1GB of swap space space. Use these commands:

mkdir /swap
dd if=/dev/zero of=/swap/swapfile_1gb bs=1024 count=1048576
mkswap /swap/swapfile_1gb
swapon /swap/swapfile_1gb

To make the swap file stick add the following lines to /etc/fstab:

/swapfile swap swap defaults 0 0

To check that the swap file is used, type:

swapon -s

1. Install libaio1 if you don't have it:

apt-get install libaio1

2. Start the installation:

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

3. Configure your instance, remember to write down the password:

/etc/init.d/oracle-xe configure

4. Add the Oracle environment shell script in your .bashrc. Edit the file with vi and add the following line at the bottom:

. /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/

Oracle 10g XE is now installed and running on your Ubuntu system. In order to be able to use its graphical UI remotely, do the following:

5. Using sqlplus log in as SYSTEM. At the prompt, type:

exec DBMS_XDB.SetListenerLocalAccess(false);

That's it. To SQL*Plus from a remote system use this TNSNAMES.ORA entry:

(ADDRESS = (PROTOCOL = TCP)(HOST = ubuntu)(PORT = 1521))

From any Oracle 10 client system, type:

tnsping ubuntu_xe

... to check it your Ubuntu-based XE is accessible. To connect to it use:

sqlplus system@ubuntu_xe

Hope this helps.

When things go wrong
I have had a few problems, which I have sorted by ensuring that:
- I had enough swap
- I had done everything as root
- I chose the right port numbers


Popular posts from this blog

GetDIBits vs. Scanline vs. Pixels[] in Delphi Bitmaps

Installation of Ubuntu 17.04 (Zesty Zapus) on VMWare Workstation

CyLog Raster Fonts for Linux