Oracle Database Express Edition 11gR2 is free for download and is available for variety of platforms including various distros of Linux and Microsoft Windows without needing a license. in this this guide will show you how to install Oracle Database Express Edition 11gR2 on Ubuntu 12.10. Note that this method will also work on Ubuntu 12.04 and 11.10

If you want to install Enterprise Edition of Oracle Database on Ubuntu then follow below post
How to install Oracle Database 11g R2 on Ubuntu 12.04

If you want to install Oracle 12C Enterprise Edition Database on Ubuntu then follow below post
How to Install Oracle 12C Enterprise Edition Database Ubuntu 13.10

So lets start now.

Step 1. Managing Swap partition. Oracle Database Express Edition 11gR2 may require up to a 2GB (2095100 KB) swap partition, Enter the following command in terminal to verify your swap space:

cat /proc/meminfo | grep -i swap

If you don’t have enough swap space, you can increase available swap space by the following guide to create and enable swap partiton, in this case I’ll create 1 GB swap file and loaded at startup, located in the /home directory

Login as root:

sudo -i

Create swap file on /home directory with following commands:

dd if=/dev/zero of=/home/swapfile bs=1024 count=1048576
mkswap /home/swapfile
swapon /home/swapfile
swapon -a

Create a backup of the original “fstab” file and add the new swap file:

cp /etc/fstab /etc/fstab.backup_`date +%N`
echo '/home/swapfile swap swap defaults 0 0' >> /etc/fstab

Logout from root and verify the new swap space:

swapon -s

Step 2. Install additional software thats require Oracle 11g Express Edition

sudo apt-get install alien libaio1

Step 3. Download Oracle Database Express Edition 11gR2 via Oracle Official website, it require registration before downloading.

Step 4. unzip the downloaded file, then convert the Oracle Database Express Edition 11gR2 package installer to debian package

cd Disk1/
sudo alien --to-deb --scripts oracle-xe-11.2.0-1.0.x86_64.rpm

Step 5. Configure Awk and Chkconfig, The following needs to be set for compatibility:

sudo ln -s /usr/bin/awk /bin/awk
sudo mkdir /var/lock/subsys

Ubuntu uses different tools to manage services and system startup scripts. The “chkconfig” tool required by the Oracle installer is not available in Ubuntu. The following will create a file to simulate the “chkconfig” tool.

Login as root:

sudo -i

Copy and paste the following Script directly into the terminal to create a file chkconfig:

cat > /sbin/chkconfig <> /etc/init.d/oracle-xe

Logout form root:


Set the file /sbin/chkconfig executable :

sudo chmod 755 /sbin/chkconfig

Step 6. Install Oracle Database Express Edition 11gR2 with the following commands:

cd ~/Downloads/Disk1
sudo dpkg -i oracle-xe-11.2.0-1.0.x86_64.deb

Run the following configuration script to create (clone) the database. Accept the default answers, including “y” to startup the database automatically, or modify as required.

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

To verify success, the procedure should end showing:

Starting Oracle Net Listener...
Done Configuring database...
Done Starting Oracle Database 11g Express Edition instance...
Done Installation completed successfully.

Step 7. Set a password for the Oracle account:

sudo passwd oracle

Step 8. Post-Installation, In order to use sqlplus and other tools, the Oracle account requires specific environment variables. The following will set these variables automatically at every Oracle login:

Login as the Oracle user:

su - oracle

Copy the default account skeleton files and add the Oracle env script to .profile:

cp /etc/skel/.bash_logout ./ 
cp /etc/skel/.bash_logout ./ 
cp /etc/skel/.bashrc ./ 
cp /etc/skel/.profile ./ 
echo "" >>./.profile
echo '. /u01/app/oracle/product/11.2.0/xe/bin/' >>./.profile

Step 9. Configure remote login. By default, the Oracle Database XE graphical user interface is only available at the local server, but not remotely. The following will enable remote logins:

Login as the Oracle user, then login as SYSDBA and run the following commands:

su - oracle
sqlplus / as sysdba
Step By Step Guide to Install Oracle Database Express Edition 11GR2 On Ubuntu 12.10 / 12.04 / 11.10
Tagged on:                                                                 

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Recommend on Google