This article clearly describes installation of Oracle 11g release 2 on Ubuntu 10.10 desktop
Pre-requisites
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
1. Go 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.
Steps
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 xxx.xxx.x.x format )
Say, ip address is 192.120.1.1
4. run below command
root@ubuntu$ xhost + 192.120.1.1
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/pam_limits.so
session required pam_limits.so
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
Password:
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
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
/u01/app/oracle/product/11.2.0/dbhome_1
oracle@ubuntu$ echo $ORACLE_SID
orcl
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 >
SQL> connect sys as sysdba
Enter password:
Connected.
SQL> startup
SQL> select count(*) from all_objects;
COUNT(*)
————–
70778
Congratulations ! You have successfully installed Oracle 11g on Ubuntu.
Related posts
Install Oracle 11g on Windows 7
Oracle interview questions and answers
I am unable to create the database ? Please help
go to Oracle home directory
Run below commands as oracle user
$ su – oracle
Password:
$ cd $ORACLE_HOME/bin
$ dbca
Hello! Thank you for this post, it is very useful!
But i have a problem:
I installed software, and then i want to create database, but I have exception:
oracle@server:
cd $ORACLE_HOME/bin
dbca
An unexpected error has been detected by HotSpot Virtual Machine:
#
# SIGSEGV (0xb) at pc=0x9cfe935e, pid=1778, tid=3076716224
#
# Java VM: Java HotSpot(TM) Server VM (1.5.0_17-b02 mixed mode)
# Problematic frame:
# C [libnnz11.so+0x3c35e]
#
# An error report file with more information is saved as hs_err_pid1778.log
I don’t have need experience for fix it, please help me.
please post your log file. did your installation was successful ?
Sorry, I don’t save this file. I found on forum reason of trouble: I installed 32-bit software on 64-bit hardware
Hi,
Everything works well for me till 6) Oracle Installation step. After that i login as a oracle user i am not able to setup x server setup for oracle user, i try step 3 as a oracle user, but i am not able to do ifconfig it tells me permission denied (infact none of the command runs as were running as root user) It says that the oracle user needs administrative access. Hence i added oracle user to the group of admin users. Need help what to do? I desperately need to setup oracle on my ubuntu system. I am not the admin of my system, but i am a 2nd user who has root access.
Hi,
I’m having the same problem at step 6 with x server permissions – please help.
Will you please share the error ?
Hi,
The error is below:
$ xclock
No protocol specified
Error: Can’t open display: :0
The oracle use has no permission to run the xhost command. I got around this by running the below from root:
$ xhost +
access control disabled, clients can connect from any host
am unable to log in into root
You can reset your root password.
Hi, I got the error – “semmi does not the correct – estimated:128 real:0”, but I now that this value i had in the /etc/sysctl.conf with “kernel.sem = 250 32000 100 128”.
I got this value with #ipcs -ls
I don’t understand why or where is the error..
Could you help me?