How to install Oracle10g in Ubuntu

Students of computer science normally use oracle in there practicals of DBMS. Oracle is available in Linux to but it is not Open Source. For open source database software look at MySQL, PostgreSQL, etc…

To install Oracle 10g in Ubuntu :
Add deb unstable main non-free to your /etc/apt/sources.list file. This can be done by typing in the terminal :
sudo gedit /etc/apt/sources.list
Then add the deb… line on a new line at the end of the file.

After this add the GPG key by typing the following line in the terminal
wget -O- | sudo apt-key add -

Now type :
sudo apt-get update
sudo apt-get install oracle-xe
sudo /etc/init.d/oracle-xe configure

When it asks if you want to launch oracle database at startup press y(it worked for me in 8.10 like this)

Then edit your .bashrc file by typing in the terminal:
gedit .bashrc
and add the following lines:

export PATH

Now open a new terminal and log into the database as administrator by typing :
sqlplus sys as sysdba

Now the default user HR to play around with the dummy database of oracle by typing :
alter user HR account unlock ;
alter user HR identified by $password ;

Here $password is the password that you choose.

Now try to login to the database by typing:
sqlplus HR/$password
In the terminal.

Play around with the database now. :)
If there are any questions please leave a comment.
This article has being made by looking at the Ubuntu Documentation.