Following is the how to for installing Oracle Database 11g R2 on Ubuntu 12.10 / 12.04


If you want to install Oracle 12c Enterprise Edition Database Release 1 on Ubuntu 15.04 then check How to Install Oracle 12c release 1 on Ubuntu 15.04

In case you want to install Oracle Database Express edition on Ubuntu 12.10 follow below post
How to install Oracle Database Express Edition on Ubuntu

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

Installing Dependencies
To install dependencies, run

sudo apt-get update
sudo apt-get install gcc make binutils gawk x11-utils rpm build-essential libaio1 libaio-dev libmotif4 libtool expat alien ksh pdksh unixODBC unixODBC-dev sysstat elfutils libelf-dev binutils lesstif2 lsb-cxx libstdc++5

We need to create some softlinks to start the installation. To do so run the following commands,

sudo ln -sf /bin/bash /bin/sh
sudo ln -s /usr/bin/awk /bin/awk
sudo ln -s /usr/bin/rpm /bin/rpm
sudo ln -s /usr/bin/basename /bin/basename
sudo ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib/libpthread_nonshared.a
sudo ln -s /usr/lib/i386-linux-gnu/libc_nonshared.a /usr/lib/libc_nonshared.a
sudo ln -s /lib/i386-linux-gnu/ /lib/
sudo ln -s /usr/lib/i386-linux-gnu/ /usr/lib/

Also we need to add oracle user and oinstall, dba, nobody group. Run following commands,

sudo addgroup oinstall
sudo addgroup dba
sudo addgroup nobody
sudo usermod -g nobody nobody
sudo useradd -g oinstall -G dba -p password -d /home/oracle -s /bin/bash oracle
sudo mkdir /home/oracle
sudo chown -R oracle:dba /home/oracle

We need to do changes in start-up script, run following commands as root

mkdir /etc/rc.d
for i in 0 1 2 3 4 5 6 S
do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d 

Now we will create the directory for installation, and changes it owner to oracle. Run following commands to do the same

sudo mkdir -p /u01/app/oracle
sudo chown -R oracle:dba /u01

We also need to modify the kernel parameter, to do so run following commands as root

echo "#">> /etc/sysctl.conf
echo "# Oracle 11gR2 entries">> /etc/sysctl.conf
echo "fs.aio-max-nr=1048576" >> /etc/sysctl.conf
echo "fs.file-max=6815744" >> /etc/sysctl.conf
echo "kernel.shmall=2097152" >> /etc/sysctl.conf
echo "kernel.shmmni=4096" >> /etc/sysctl.conf
echo "kernel.sem=250 32000 100 128" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range=9000 65500" >> /etc/sysctl.conf
echo "net.core.rmem_default=262144" >> /etc/sysctl.conf
echo "net.core.rmem_max=4194304" >> /etc/sysctl.conf
echo "net.core.wmem_default=262144" >> /etc/sysctl.conf
echo "net.core.wmem_max=1048586" >> /etc/sysctl.conf
echo "kernel.shmmax=1073741824" >> /etc/sysctl.conf

Note: kernel.shmmax = max possible value, e.g. size of physical memory in bytes. In my case machine is having 2GB so we are specifying 1GB. Adjust the parameter as per your configuration

Load new kernel parameters, by running following,

sudo sysctl -p

We have to change shell configuration, to do the same run following commands as root user,

cp /etc/security/limits.conf /etc/security/limits.conf.original
echo "#Oracle 11gR2 shell limits:">>/etc/security/limits.conf
echo "oracle soft nproc 2048">>/etc/security/limits.conf
echo "oracle hard nproc 16384">>/etc/security/limits.conf
echo "oracle soft nofile 1024">>/etc/security/limits.conf
echo "oracle hard nofile 65536">>/etc/security/limits.conf

Download Oracle 11g R2 database from Oracle Download Center for linux.

I have downloaded both the zip in /home/oracle. We need to extract both the zip to start the installation. To unzip run,

cd /home/oracle

Now we will start the installation. You can start the installation from /home/oracle/database.
Login as a oracle user.

su oracle

Go to the binaries and start the installation as a oracle user,

cd /home/oracle
chmod 777 -R database
cd database
./runInstaller -ignoreSysPrereqs


Next we go though the installation (I don’t have the “Oracle Support Password” so just skip in here):


In “Selection Installation Option”, choose “Create and configure a database”:

In “System Class”, choose “Server Class” (we hope to give a full control during installation):

In “Node Selection”, choose “Single instance database installation”:

In “Select Install Type”, choose “Advanced install”:

In “Select Product Languages”, I choose to install “English” language:

In “Select Database Edition”, I choose “Enterprise Edition”:

In “Specify Installation Location”, it should default as below:

Oracle Base: /u01/app/oracle
Sofeware Location: /u01/app/oracle/product/11.2.0/dbhome_1


In “Create Inventory”, it should default as below:

Inventory Directory: /u01/app/oraInventory
oraInventory Group Name: oinstall


In “Select Configure Type”, choose “General Purpose / Transaction Processing”:

(IMPORTANT!) In “Specify Database Identifiers”, configure as below:

Global database name:
Oracle Service Identifier (SID): orcl


In “Specify Configuration Options”, configure as below:

Memory -> Enable Automatic Memory Management: TRUE
Character sets: Use Unicode (AL32UTF8)



In “Specify Management Options”, choose “Use Database Control for database management” but keep other else empty:

In “Specify Database Storage Options”, choose “File System” where:

Specify database file location: /u01/app/oracle/oradata


In “Specify Recovery Options”, choose “Do not enable automated backups”:

In “Specify Schema Passwords”, I am a bit lazy so choose “Use the same password for all accounts” (don’t do this in production server!):


In “Privileged Operating System Groups”, confirm as below:

Database Administrator (OSDBA) Group: dba
Database Operator (OSOPER) Group: oinstall



In “Preform Prerequisite Checks”, just simply ignore all warning message (since we are using Debian but not Oracle officially supported OS):

So just confirm everything in “Summary”:

And now let’s go for a coffee break 😉







Now following the instructions and run the following commands with “root” user:





Ok you get it!

Confirm with installation progress

In previous screen the installer mentioned that we can access “Enterprise Manager Database Control URL” from https://localhost:1158/em, so now let’s open the browser and test it with following account:

User Name: SYS
Password: your_secret_password
Connect As: SYSDBA


Once login it should show as below:

Error which I faced at the time of installation :
Error No 1 :

INFO: Building Client Shared Libraries
INFO: Building Client Shared Libraries
INFO: The output of this make operation is also available at: '/u01/app/oracle/product/11.2.0/dbhome_1/install/make.log'
INFO: Start output from spawned process:
INFO: ----------------------------------
INFO: /u01/app/oracle/product/11.2.0/dbhome_1/bin/genclntsh
INFO: usr
INFO: bin/ld: cannot find /usr/lib/libpthread_nonshared.a
INFO:  inside
INFO: ld returned 1 exit status
INFO: genclntsh: Failed to link
INFO: make:
INFO: *** [client_sharedlib] Error 1
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'client_sharedlib' of makefile '/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/'. See '/u01/app/oraInventory/logs/installActions2012-05-08_10-11-08PM.log' for details.
Exception Severity: 1
Solution for problem 1 is as follows :
dpkg-deb -x ia32-libs_2.2ubuntu10_amd64.deb ia32-libs
cp ia32-libs/usr/lib32/ /usr/lib/
cd /usr/lib
ln -s
ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib/libpthread_nonshared.a

Error No 2 :

INFO: usr
INFO: bin
INFO: /ld: warning: -z lazyload ignored.
INFO: warning
INFO: : -z nolazyload ignored.
/usr/bin/ld: /u01/app/oracle/product
INFO: /11.2.0/dbhome_1/sysman/lib//libnmectl.a(nmectlt.o): undefined reference to symbol 'B_DestroyKeyObject'
INFO: /usr/bin/ld: note: 'B_DestroyKeyObject' is defined in DSO /u01
INFO: /app/oracle/product/11.2.0/dbhome_1/lib/ so try adding it to the
INFO: linker
INFO: command line
/u01/app/oracle/product/11.2.0/dbhome_1/lib/ could
INFO: not read symbols: Invalid operation
INFO: ld returned 1 exit status
INFO: make[1]: Leaving directory `/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib'
INFO: make[1]: *** [/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/emdctl] Error 1
make: *** [emdctl] Error 2
INFO: End output from spawned process.
INFO: ----------------------------------
INFO: Exception thrown from action: make
Exception Name: MakefileException
Exception String: Error in invoking target 'agent nmhs' of makefile '/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/'. See '/u01/app/oraInventory/logs/installActions2012-05-08_10-11-08PM.log' for details.
Exception Severity: 1

Solution for problem 2 is as follows :

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1/
sed -i 's/^\(\s*\$(MK_EMAGENT_NMECTL)\)\s*$/\1 -lnnz11/g' $ORACLE_HOME/sysman/lib/
sed -i 's/^\(\$LD \$LD_RUNTIME\) \(\$LD_OPT\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/bin/genorasdksh
sed -i 's/^\(\s*\)\(\$(OCRLIBS_DEFAULT)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/srvm/lib/
sed -i 's/^\(TNSLSNR_LINKLINE.*\$(TNSLSNR_OFILES)\) \(\$(LINKTTLIBS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/network/lib/
sed -i 's/^\(ORACLE_LINKLINE.*\$(ORACLE_LINKER)\) \(\$(PL_FLAGS)\)/\1 -Wl,--no-as-needed \2/g' $ORACLE_HOME/rdbms/lib/
How to Install Oracle 11G R2 Enterprise Edition Database Ubuntu 12.10 / 12.04

28 thoughts on “How to Install Oracle 11G R2 Enterprise Edition Database Ubuntu 12.10 / 12.04

  • June 28, 2012 at 9:23 pm

    Thanks a lot !!!

    Your solution for a problem 2 was the thing I needed!

    This is the best for installing Oracle 11gR2 on Ubuntu 12.04 as fast as possible.

  • July 22, 2012 at 2:34 pm

    “ln: failed to create symbolic link `/etc/rc.d/rc0.d’: Permission denied
    ln: failed to create symbolic link `/etc/rc.d/rc1.d’: Permission denied
    ln: failed to create symbolic link `/etc/rc.d/rc2.d’: Permission denied
    ln: failed to create symbolic link `/etc/rc.d/rc3.d’: Permission denied
    ln: failed to create symbolic link `/etc/rc.d/rc4.d’: Permission denied
    ln: failed to create symbolic link `/etc/rc.d/rc5.d’: Permission denied
    ln: failed to create symbolic link `/etc/rc.d/rc6.d’: Permission denied
    ln: failed to create symbolic link `/etc/rc.d/rcS.d’: Permission denied”

    this is the error i am getting when i run the commands
    “for i in 0 1 2 3 4 5 6 S
    do ln -s /etc/rc$i.d /etc/rc.d/rc$i.d

    so please help me out

  • August 6, 2012 at 2:13 pm

    Hi Vidyadhar,

    I am exactly facing the first error and I followed your steps but no luck.I assure that installing the 32 bit version of the oracle in Ubunuu 32 bit version.

    Any suggestion?


  • Pingback: How to solve shared library problem in oracle installation on Ubuntu 12.04? | MoVn - Linux Ubuntu Center

    • September 9, 2012 at 9:58 am

      Hi, when i try the command “chmod 777 -R database” it says operation not permitted. when i sudo it, it asks for a password for oracle, but i havnt set one. anyone know what to do?

      • September 9, 2012 at 10:15 am

        i tried “password” but thats not working either

        • September 10, 2012 at 11:26 pm

          you can try by resetting oracle user password

    • October 20, 2012 at 2:35 am

      Vidyadhar you only wirte how to create soft link only on 32-bits operation system.
      Write please this information for wich system is this instruction or add soft links for 64-bit system!!! I spend a lot of time to found what is wrong in this instructions.
      If you have 64-bit system you should remember to create correct soft links.

      • October 20, 2012 at 6:51 pm

        Rafal I never tried on 64bit system. Let me try to install it on 64bit system and get back to you.

  • August 8, 2012 at 11:19 pm

    during installation …
    Error in invoking target ‘all_no_orcl’ of makefile ‘/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/’. See ‘/u01/app/oraInventory/logs/installActions2012-08-09_12-18-53AM.log’ for details

    • August 9, 2012 at 12:03 am

      During the install there were a handful of errors about linking such as:
      “Error in invoking target ‘idg4odbc’ of makefile ‘/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/’.”
      “Error in invoking target ‘idg4odbc’ of makefile ‘/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/’.”
      “Error in invoking target ‘install’ of makefile ‘/u01/app/oracle/product/11.2.0/dbhome_1/ctx/lib/’.”
      “Error in invoking target ‘all_no_orcl’ of makefile ‘/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/’.
      “Error in invoking target ‘utilities’ of makefile ‘/u01/app/oracle/product/11.2.0/dbhome_1/rdbms/lib/’.”

      I was able to “Continue” past these errors and complete the installation and creation of database without anymore issues. I read a little bit online about some people having these errors and their GUI tools such as DBCA and Universal Installer not working normally, but I have tested the tools that I use and they seem to be fine.
      After the install I placed the following lines in the /etc/profile to ensure the ORACLE_* environment variables get set properly after login for any local users:

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

      At this point, I moved some known *.ora files into the $ORACLE_HOME/network/admin directory to skip the tns setup
      From here you should be able to use the oracle client tools to connect to existing databases on your network. Also, I was able to create an 11gR2 database instance locally without any more system changes, besides the normal instructions for creating an instance from the Oracle documentation.

      • October 19, 2012 at 11:56 pm

        both the solutions din’t work for me .
        any tips what I could be doing wrong ? or what I should look for ?
        I am using Ubuntu12.04 and trying to install .

        • October 20, 2012 at 12:25 am

          Are you trying to install 32bit or 64bit database?

          • October 20, 2012 at 1:00 am


  • August 14, 2012 at 1:04 am

    Hi Vidyadhar,

    First of all, thanks for the post! I hope I finally get it working. As far as I have seen all steps until starting up the Oracle install went well. But the Oracle Installer won start up. I see the jars loading, but then it remains in terminal session and the installer does not show. Any ideas?
    Thanks in advance.

    • August 14, 2012 at 1:46 am

      Corerection: I got an error “No protocol specified”. Any ideas?

      • August 15, 2012 at 2:13 am

        This is often an indication of doing things in the wrong order.

        Step 1: Log on to the computer that has an XWindows screen
        Step 2: Tell that screen to accept remote requests by issuing “xhost +”
        Step 3: Log on to the computer / user that is to use the XWindows
        Step 4: Tell that to display on the computer that is to be used for display using export DISPLAY=(host):display.screen
        Step 5: Run the program that needs a display

        Many people log in to root on the computer and then su to oracle to do the installs. While this is fundamentally a stupid thing to do, because using root unnecessarily increases potential security risks and is it NOT good practice and will it NOT be allowed in any self-respecting business, the following would be the sequence

        1) Log on to XWindows as root
        2) Open a terminal
        3) enter ‘xhost +’
        4) enter ‘su – oracle’
        5) enter ‘export DISPLAY=:0.0’
        6) runInstaller (or use whatever installer is required)

        The most common mistake is running xhost after su. This will not work. The xhost must be issued by the first user – the one that owns the screen

        • August 24, 2012 at 9:30 pm

          Vidyadhar, you may to read up on xauth. It allows you to grant access to the oracle user without allowing just anyone open windows on your screen as ‘xhost +’ does.

  • August 29, 2012 at 7:25 pm

    I had error:
    Exception String: Error in invoking target ‘agent nmhs’ of makefile ‘/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/’. See ‘/u01/app/oraInventory/logs/installActions2012-05-08_10-11-08PM.log’ for details.

    solution above worked, thanks

  • September 8, 2012 at 9:03 pm

    Excellent post. This saved me hours. I had to apply the fix for Error 2, but not Error 1.

    • October 3, 2012 at 11:00 pm

      I am able to download it. Any particular error?

  • October 7, 2012 at 4:40 pm

    Error in invoking target 'mkldflags ntcontab.o nnfgt.o' of makefile '/u01/app/oracle/product/11.2.0/dbhome_2/network/lib/'. See '/u01/app/oraInventory/logs/installActions2012-10-07_12-40-50PM.log' for details.

    at oracle.sysman.oii.oiin.OiinNetOps.addNICInfo(
    at oracle.sysman.oii.oiin.OiinNetOps.computeNICList(
    at oracle.sysman.oii.oiin.OiinNetOps.(
    at oracle.sysman.oii.oiin.OiinNetOps.getNetOps(
    at oracle.sysman.oii.oiix.OiixNetOps.getFullHostName(
    at oracle.install.library.util.MachineInfo.getFullHostName(
    at oracle.install.ivw.db.action.SystemClassAction.transition(
    at oracle.install.commons.flow.AbstractFlowExecutor.stopAction(
    at oracle.install.commons.flow.AbstractFlowExecutor.leaveVertex(
    at oracle.install.commons.flow.AbstractFlowExecutor.transition(
    at oracle.install.commons.flow.AbstractFlowExecutor.nextState(
    at oracle.install.commons.flow.AbstractFlowExecutor.nextViewState(
    at oracle.install.commons.flow.DefaultFlowNavigator.goForward(
    at oracle.install.commons.flow.jewt.FlowWizard$
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
    at java.util.concurrent.ThreadPoolExecutor$
    at /u01/app/oracle/product/11.2.0/dbhome_2/oc4j/j2ee/home/config/ (Permission denied)
    at Method)
    at oracle.sysman.oii.oiij.OiijFastJarExtracter.copyFileFromJar(
    at oracle.sysman.oii.oiij.OiijFastJarExtracter.copyJarContents(
    at oracle.sysman.oii.oiij.OiijFastJarExtracter.extract(
    at oracle.sysman.oii.oiij.OiijFastCopyPhase.processCompInfo(
    at oracle.sysman.oii.oiij.OiijFastCopyPhase.readAndExtract(
    at oracle.sysman.oii.oiij.OiijFastCopyPhase.doFileOperations(
    at oracle.sysman.oii.oiij.OiijFastCopyPhase.doFastModeOperations(
    at oracle.sysman.oii.oiif.oiifw.OiifwInstallPhaseWCCE$OiifwComponentIP1WCCE.doOperation(
    at oracle.sysman.oii.oiif.oiifb.OiifbCondIterator.iterate(
    at oracle.sysman.oii.oiif.oiifw.OiifwInstallPhaseWCCE.doOperation(
    at oracle.sysman.oii.oiif.oiifb.OiifbCondIterator.iterate(
    at oracle.sysman.oii.oiif.oiifw.OiifwActionsPhaseWCDE.doOperation(
    at oracle.sysman.oii.oiif.oiifb.OiifbLinearIterator.iterate(
    at oracle.sysman.oii.oiic.OiicInstallAPISession$OiicAPISelCompsInstall.doOperation(
    at oracle.sysman.oii.oiif.oiifb.OiifbCondIterator.iterate(
    at oracle.sysman.oii.oiic.OiicInstallAPISession.doInstallAction(
    at oracle.sysman.oii.oiic.OiicInstallAPISession.access$000(
    at oracle.sysman.oii.oiic.OiicInstallAPISession$

    a run chmod 775 on config/ but it doesn't help, any idea?

  • October 27, 2012 at 12:35 am

    I can not log in whit commands “su oracle”,what the password?

    • October 27, 2012 at 12:37 am

      You have to set the password using following command
      sudo passwd oracle


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