Installing Oracle 11g on Ubuntu

This article clearly describes installation of Oracle 11g release 2 on Ubuntu 10.10 desktop

1. Operating system – Ubuntu 10.10 32 bit operating system (Maverick Meerkat)
2. Hard disk space – 2 GB free space
3. System RAM – At least 512 MB

1) How to install Ubuntu 10.10
Go to Ubuntu Home page Ubuntu and download Ubuntu 10.10 desktop and install.

2) Download Oracle 11g release 2
1Go to Oracle website 
2. Log in. You need to have an oracle account to download
3. Make sure you are downloading Oracle 11g release 2 for 32 bit operating system.
(Direct link – Oracle 11g R2 linux 32 bit opertaing system )
4. Extract both zip files into one folder
E:- Create a Oracle11g folder in desktop and copy both folders into it.

Now we have Ubuntu operating system and Oracle installations files ready.

3) X Server configuration
For Oracle installation in Linux machines need X server configuration.

1. Open a terminal
2. Connect as root ( You need to have root account )
root@ubuntu$ su – root
3. run ifconfig
root@ubuntu$ ifconfig
Find the ip address. (find for inet addr looks like format )
Say,  ip address is
4. run  below command
root@ubuntu$ xhost +
5. To verify X Server configuration you can use xclock command
root@ubuntu$ xclock
If a clock pop ups server configuration is fine.

4)  Updating packages
If you ave the fresh install of Ubuntu you can skip this step.
Otherwise run below commands

root@ubuntu$ apt-get update
root@ubuntu$ apt-get dist-upgradeRestart
root@ubuntu$ reboot

Install missing libraries
root@ubuntu$ apt-get install build-essential libaio1 gawk ksh libmotif3 alien libtool lsb-rpm

5) Updating shell and system configurations
Run below commands in sequential order and enter password for your oracle user

root@ubuntu$ cd /bin

root@ubuntu$ ls -l /bin/sh
root@ubuntu$ ln -sf bash /bin/sh
root@ubuntu$ ls -l /bin/sh
root@ubuntu$ lrwxrwxrwx 1 root root 4 2008-05-01 22:51 /bin/sh -> bash
root@ubuntu$ cd /root
root@ubuntu$ addgroup oinstall
root@ubuntu$ addgroup dba
root@ubuntu$ addgroup nobody
root@ubuntu$ usermod -g nobody nobody
root@ubuntu$ useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
root@ubuntu$ passwd oracle
root@ubuntu$ mkdir /home/oracle
root@ubuntu$ chown -R oracle:dba /home/oracle

root@ubuntu$ ln -s /usr/bin/awk /bin/awk
root@ubuntu$ ln -s /usr/bin/rpm /bin/rpm
root@ubuntu$ ln -s /usr/bin/basename /bin/basename
root@ubuntu$ mkdir /etc/rc.d
root@ubuntu$ for i in 0 1 2 3 4 5 6 S ; do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d ; done

root@ubuntu$ mkdir -p /u01/app/oracle
root@ubuntu$ chown -R oracle:dba /u01

Change the run level if it is 2 or 3 (It should be 5 for oracle install)
root@ubuntu$ telinit 5

Now we need to update few configuration files

1. /etc/sysctl.conf
Run below command and add the following entries at the end of the file.
root@ubuntu$ gedit /etc/sysctl.conf

fs.file-max = 65535
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

2. /etc/security/limits.conf
Run below command and add the following entries at the end of the file.
root@ubuntu$ gedit /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16383
oracle soft nofile 1023
oracle hard nofile 65535

3. /etc/pam.d/login

Run below command and add the following entries at the end of the file.
root@ubuntu$ gedit  /etc/pam.d/login

session required /lib/security/
session required
Run below command or re-start
root@ubuntu$ sysctl -p

6) Oracle Installation
Now we are almost ready for Oracle Installation.
Log in as oracle user.

user@ubuntu$ su – oracle

For oracle user also need x server setup. Try to run xclock command. If it pop ups we are fine. Otherwise go to step 3)

oracle@ubuntu$ xclock

Go to the folder we have extracted the Oracle 11g.
oracle@ubuntu$ cd /home/user/Desktop/Oracle11g
oracle@ubuntu$ cd database1
oracle@ubuntu$ ./runInstaller

Wait few seconds. It will launch Oracle 11g installation wizard.

Starting Oracle Universal Installer…

Checking Temp space: must be greater than 80 MB.   Actual 80115 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 3917 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall

Click Next. Chose custom installation. Enter database configuration parameters while prompting. In pre-requisite check it will show there are some library files are missing. Just ignore those and continue installation.

6) Setting environment variables

First make sure
1) /u01/app/oracle/product/11.2.0/dbhome_1 is exists
2) /u01/app/oracle/product/11.2.0/dbhome_1/bin exists
3) orcl is the tnsname specified at installation.
Add the below entries in /etc/profile as root user

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export PATH=$PATH:/u01/app/oracle/product/11.2.0/dbhome_1/bin
export ORACLE_SID=orcl

7) Running Oracle 11g first time
Log in as oracle

oracle@ubuntu$ echo $ORACLE_HOME

oracle@ubuntu$ echo $ORACLE_SID

oracle@ubuntu$ sqlplus /nolog
It connect to SQL as idle instance. Execute below commands. Enter password created for sys at installation. Start database using startup command


SQL> connect sys as sysdba
Enter password:
SQL> startup

SQL> select count(*) from all_objects;


Congratulations ! You have successfully installed Oracle 11g on Ubuntu.

Related posts

Install Oracle 11g on Windows 7
Oracle interview questions and answers

Please post your comments below, share this link and click like button.