Brian’s Stuff

Stuff I don’t want to forget (again!)

How to install Oracle Database 10g Express Edition on Ubuntu

I needed to install Oracle Database 10g Express Edition (XE) on a VMware Workstation virtual machine (VM) running Ubuntu 8.04 as the guest operating system today. It wasn’t as straightforward as I would have expected compared to my previous experience of installing XE on Windows-based platforms.

My first attempt to install XE failed miserably because I had insufficient swap space. The following series of commands rectified that:

sudo dd if=/dev/zero of=/swapfile bs=1M count=600
sudo mkswap /swapfile
sudo swapon /swapfile

Then I tried to unsuccessfully install from using the .deb package I had previously downloaded from the Oracle site. Maybe it was just my fat fingers. But I just couldn’t get it going.

So I decided to try with the APT package instead. I started with a fresh VM and increased the swap space as described above.

Then I had to edit /etc/apt/sources.list to add a source repository:

deb http://oss.oracle.com/debian unstable main non-free

And I then executed the following commands to indicate that I trusted the new source repository, update my package cache and initiate the installation:

sudo wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle  -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install oracle-xe

After completing the installation it is necessary to run the configuration script as to specify the HTTP and listener ports, the initial password for the SYS and SYSTEM accounts, and whether or not Oracle XE should be started during the boot process.

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

I then had to manually start the database using sqlplus:

sqlplus /nolog

And executing the following instructions, replacing [password] with the initial password I selected during the configuration above:

conn system/[password] as sysdba
startup

Finally I added the following settings to my ~/.bash_aliases file:

export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=XE

Sources:


Tagged as , , + Categorized as Tools

1 Comments

Trackbacks & Pingbacks

  1. Installing Oracle XE on Ubuntu 9.10 « The World as a Karma Machine

    [...] How to install Oracle DB 10G XE on Ubuntu Possibly related posts: (automatically generated)Folder sharing on VirtualBox in Ubuntu guestOracle XE installation on Ubuntu JauntyCreating program DB use ZEOSDBO & Oracle in Linux Ubuntu [4]Getting Started [...]

Leave a Reply