First of all, collect the oracle 10G express edition debian installer from oracle.
then at first install the debian library called libaio1_0.3.107-3ubuntu2_i386
then, install the oracle 10G express edition by double clicking on it.

1. Configuring Oracle
open terminal(you can open it directly by pressing ctrl+ alt + T), and type
- Code:
sudo /etc/init.d/oracle-xe configure
press enter.
it will ask for ports, first enter 8080 and then enter 1521
then, it will ask for password. We are going to use iit123
you will not be able to see the password when you type it.
It will again ask you for the password for confirmation.
Input iit123 again.
It will ask for whether to start Oracle on boot. Type n and press enter.

After configuring it will show that Installation completes successfully.

2. Configuring Oracle permission For your user:
Lets assume your username in Ubuntu is lordamit. open terminal and type:
- Code:
sudo usermod -a -G dba lordamit
3. Enable the listener mood for your user by typing in terminal:
- Code:
sudo chmod g+w /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
4. Set the Environment variables set for everyone by typing in terminal:
- Code:
sudo ln -s /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh /etc/profile.d/oracle_env.sh
5. open nls_lang.sh by typing this in terminal:
- Code:
sudo gedit /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/nls_lang.sh
Change #!/bin/sh to #!/bin/bash in nls_lang.sh like this screenshot

6. set your username oracle active and give it password by typing in terminal:
sudo passwd oracle
We are going to use iit123 as password here too.

7. Final configurations:
open terminal, and type
- Code:
sudo gedit ~/.bashrc
go to the end of file and paste the following lines just like this:
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server PATH=$PATH:$ORACLE_HOME/bin export ORACLE_HOME export ORACLE_SID=XE export PATH

MAKE SURE THAT THE TEXT YOU PASTED LOOKS LIKE THE TEXT FILE IMAGE HERE. NO extra lines or Spaces!!
save and close it.
8. finally, give the permission to listener by giving this command in terminal:
- Code:
sudo chmod 777 /var/tmp/.oracle/

And start the listener by this command in terminal:
- Code:
lsnrctl start
http://127.0.0.1:8080/apex
from browser
Input System as username, and iit123 as password
You are now all set up

Thanks a lot!!!
ReplyDeleteI have successfully installed Oracle 10G XE in my UBUNTU 10.10 :D
You have given a very easy and clear guideline to install this...it really seemed very easy and took short time to install oracle in UBUNTU then windows :)
But when I gave the command
"lsnrctl start" at last, it says command not found :S But I can log in to oracle as sys.Can't understand whats the problem!
I've installed Oracle by watching this wonderful post!! But I'm not clear about the step 6. You said to put username oracle, what does this oracle indicate ? an account name on oracle??
ReplyDeleteand I've typed
lsnrctl start
and it says it cannot find the command.
but everything else seems working fine.
an account name on oracle, yes :)
ReplyDeleteYou need to reboot after step 7, it needs to recognize the changes you made in your bashrc file :)
YOU ARE MY HERO!!!!
ReplyDeleteIve been looking for days for a solution to my oracle setup. Even when did all the steps mentioned in thousads of blogs and tutorials, Listener never started. I had to either log in as oracle (even after adding myself to dba group) or comment out the EXTPROC_FOR_XE in listener.ora file (most common "solution" found on web). None of them were aceptable for me.
Your last step, sudo chmod 777 /var/tmp/.oracle/, was the key!!! It turns out that by default that folder is +t (sticky), preventing my user to start the listener for EXTPROC_FOR_XE
No more disabling features or enter passwords to start database! it runs SO great!!!!
YOU ARE MY PERSONAL HERO!!!
As a way to say THANK YOU, here are some humble hints to help you improve this tutorial even further:
ReplyDeleteStep 7 is redundant: since you already added oracle_env.sh to profile.d in Step 4, you already have the necessary enviromental variables. No need to edit ~/.bashrc
Step 6 is unnecessary: since you will never login as oracle user (it is only used by install to create the folders and files), it doesnt need a password to be set. On my PC the oracle account is still disabled, and everything works.
I would also add another (cosmetic) step: remove the oracle account from the gdm login list (truly annoying, since its not a "real" user). This happen because its UID > 1000 (in an ideal world it shouldnt, since its a "service" account)
Do this:
sudo gedit /etc/gdm/custom.conf &
Add these lines:
[greeter]
Exclude=oracle,
And replace for the full list found in /etc/gdm/gdm.schemas (greeter/Exclude section), since this entry will override (not append) the schemas Exclude
Hope that helps!
Hey Rodrigo ^_^
ReplyDeleteComments like this always keep me motivated to continue sharing whatever I learn. Thanks for the tips! :D
can anyone help me with oracle XE on Ubuntu ( i know this is late coming)?
ReplyDeletewill these steps above could be followed on mint11?
ReplyDeleteit's done in linuxmint, i did in linuxmint12, all steps run well.
DeleteI can not answer that because I have never used Linux Mint. However, the steps should be similar anyway. at least, the bashrc and other configuration files.
ReplyDeletevery helpful procedure man...this is the complete explanation.... thanks a lot
ReplyDeleteThank you Venkatesh for dropping by and leaving the message.
DeleteYou are most, most welcome. :)
THANKS A LOT...THANK YOU SO MUCH....
ReplyDelete