Home / Featured / Installing Oracle 11gR2 on Ubuntu 12.04

Installing Oracle 11gR2 on Ubuntu 12.04

Check Also


Hazel: The Tireless Assistant for Mac OS X

I am both a photographer and computer service provider and often called on to solve …


  1. I dont undestand 8 step:

    “Add following lines to /var/lib/oracle/.profile”

    how can i open that .profile to add the following lines?

    if [ “$USER” = oracle ]; then
    if [ $SHELL = “/bin/ksh” ]; then
    ulimit -p 16384
    ulimit -n 65536
    ulimit -u 16384 -n 65536
    umask 022
    export ORACLE_BASE=/u01/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
    export ORACLE_SID=AL32UTF8
    export NLS_LANG=.AL32UTF8
    unset TNS_ADMIN
    if [ -d “$ORACLE_HOME/bin” ]; then

    • Hi,

      use the cat command:

      cat – >> /var/lib/oracle/.profile

      then copy and paste it all in there and finish by pressing CTRL+D

  2. Thanks for this great step guide. The screenshots help and the sed commands are awesome timesavers.

    I installed on 32-bit so I had some additional issues but was able to find solutions to them elsewhere.

    • great stuff Ken, I have not tried a 32bit installation yet but sure there are many still who run them. If you feel the need to combine your experience in one post because the other guides are all shattered over the net let me know maybe we can collaborate on it.

  3. First, excellent guide. But I have a problem that I can not solve, this is the point 11, after the judgment:

    cd / var / lib / oracle / database &&. / runInstaller

    Always get the same error, and I can not solve:

    / var / lib / oracle / database / install / .oui: 2: / var / lib / oracle / database / install / .oui: Syntax error: “)” unexpected

    I hope your help, thank you very much

    • Hello Marta,

      yea that is a formatting issue caused by wordpress. You see there “& a m p ; & a m p”
      and that is of course no Unix syntax. What it should say is “& &” (no spaces) so either replace it or
      just “cd” into the directory and execute the Installer:

      cd /var/lib/oracle/database

      The way I described is just a one liner for lazy geeks like myself :)

      • Hello,

        Thank you very much for answering so fast. I followed your steps, but I still have the same problem. I have done the following:

        oracle@marta-VirtualBox:/home/marta$ cd /var/lib/oracle/database
        oracle@marta-VirtualBox:~/database$ ./runInstaller
        /var/lib/oracle/database/install/.oui: 2: /var/lib/oracle/database/install/.oui: Syntax error: “)” unexpected

      • Hi,

        well if you have followed the Guide Step by Step you should not be getting this error, so this could be caused by one of the following reasons:

        1. you downloaded the wrong version
        did you download the 64bit version and your pc is 32bit?
        or vise versa?

        2. if the above is not the case, then re download it because
        the installer might have been corrupt, to be sure check the

        3. make sure the permissions are all good, it has to be
        executed by the User oracle.

        let me know how it goes

      • Hi,

        I’ve fixed the error, was installing the wrong version, ainsss
        But now I have a new bug to track back all the steps are as follows:

        Comprobando el monitor: debe estar configurado para mostrar al menos 256 colores
        >>> No se ha podido ejecutar la comprobación automática de colores de visualización con el comando /usr/bin/xdpyinfo. Compruebe si está definida la variable DISPLAY. Fallo


      • Hi,

        please read my previous Post that should help you explain what you need to do. It depends on what base system you are using.
        Check that you have done all this, and exporting the Display should work.


        Also remember to export the Display on the VM before you start the installer, and make sure you do that as “root”.

  4. Hello,

    Thank you very much for everything, finally I could install it!

    Now, I have a new problem. The next day I tried to access the manager of the database and gives me error.


    So I pulled back the oracle as follows:

    root@marta-VirtualBox:/home/marta# /etc/init.d/oracledb start
    Starting Oracle:
    LSNRCTL for Linux: Version – Production on 13-JUN-2012 22:22:40

    Copyright (c) 1991, 2009, Oracle. All rights reserved.

    TNS-01106: Listener using listener name LISTENER has already been started
    Processing Database instance “orcl”: log file /u01/app/oracle/product/11.2.0/dbhome_1/startup.log
    Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.

    Thank you very much

    • Hi,

      thats because you must have forgotten to check your hostname or host file entry. Log in as root and check the hosts file:
      vi /etc/hosts
      and it should look like this: localhost.localdomain localhost
      next check hostnames:
      vi /etc/hostname
      and that should look like this:
      if not the case, correct it. Also when you try to logon to the manager from another PC use the IP address instead of localhost.

  5. wow, thanks ..! its works

  6. Hi,
    this is an (almost) perfect step-by-step guide. I had to include a symlink

    ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib64/libgcc_s.so.1

    for making the build/link process run without errors.
    Thanks a lot.

  7. In [Specify Installation Location] – the default settings should be as below:

    I am getting error:
    [INS-32012] Unable to create directory:

    Kindly help

  8. Hi
    I don’t use a virtual machine. I just install ubuntu 12.10 as a second OS. And the second thing is I am not very familiar with linux. So I just want to install oracle 11gr2 enterprise edition on my ubuntu which is not on a virtual machine. could you help me pls?
    thank you

  9. In the section Special note for Ubuntu 12.04: If you face error during installation so update as below:” you say to click “Continue” after executing the sed commands. You should say click “Retry”. Clicking continue will not link the emagent correctly.

  10. Great post. I got Oracle installed and running quickly with the use of this post. I got the same issues that you posted along the way and was able to correct them with your solutions. Thank you for the great write-up.

  11. psychic readings online for free

    Nice nісhе site. Greаt blog short articlе regardіng Instаlling Oгаcle 11gR2 on Ubuntu 12.
    04 | gizmojunkее. You actually posseѕs thе strаtegy for fulfillment going оn at thіs ρoint.
    I mοst сeгtainlу ωill save yоur ρagе and cоmе once again аfterωаrdѕ.

  12. awsome work man, I followed the steps given and succeccfully installed oracle 11.2 on Ubuntu 12.04. Thanks a lot.

  13. I have been browsing on-line greater than 3 hours lately, but I never
    found any fascinating article like yours. It is lovely value
    enough for me. In my opinion, if all web owners
    and bloggers made just right content material as you did, the web can be
    much more helpful than ever before.

  14. Thanks so much . . :) . . i am very happy after fighting form last 2 days . .

    You did a great job here . :) . .

    Every thing is fine with my installations but my

    “Unable to connect
    Firefox can’t establish a connection to the server at ubuntu.ubuntu-domain:1158. ”

    But my SQLPLUS is working great .