Following is the how to for installing Oracle Database 11gR2 on Ubuntu 11.04

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 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 lsb-rpm libstdc++5

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

ln -sf /bin/bash /bin/sh
ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/rpm /bin/rpm
ln -s /usr/bin/basename /bin/basename
ln -s /usr/lib/i386-linux-gnu/libpthread_nonshared.a /usr/lib/libpthread_nonshared.a
ln -s /usr/lib/i386-linux-gnu/libc_nonshared.a /usr/lib/libc_nonshared.a
ln -s /lib/i386-linux-gnu/libgcc_s.so.1 /lib/libgcc_s.so.1
ln -s /usr/lib/i386-linux-gnu/libstdc++.so.6 /usr/lib/libstdc++.so.6

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

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

We need to do changes in start-up script, run following 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 
done

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

mkdir -p /u01/app/oracle
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 as root user,

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
unzip linux_11gR2_database_1of2.zip 
unzip linux_11gR2_database_2of2.zip

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

Now you will see the Welcome screen. As per my requirement we do not need email update so I am disabling the same.

Now in the step 2 we will choose “Create and configure database”

In step 3 as our machine is desktop call, I choose “Desktop class”

In step 4 you need to specify oracle_home, database file location, database name options. Adjust the parameter as per your setup. For reference see below screenshot,

In step 5 click on “Ignore all” option and select Next

In step 6 installation will show you the summary page.

Now it will start the installation

While in the process of Database Configuration Assistant, I got error saying oracle is not available. We select Ignore option

Now it will show “Database Control has been brought up in non-secure mode. Just click on OK.

It will show you the Enterprise Manager URL. Note it down for future reference.

We need to run root.sh script as a root user. Do the same and click on OK button.

It will show you successful installation message, just click close.

Now we need to login to Enterprise Manager to check the status.
Open browser and type http://server_ip:1158/em/

Enter SYS as username, choose Connect as sysdba and enter password which we specified at step 4

We will create init stop / start script to manage listener.

vi /etc/init.d/oracledb
#!/bin/bash
 
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
export ORACLE_OWNR=oracle
export PATH=$PATH:$ORACLE_HOME/bin
 
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
echo "Oracle startup: cannot start"
exit 1
fi
 
case "$1" in
start)
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
touch /var/lock/oracle
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
rm -f /var/lock/oracle
echo "OK"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` start|stop|restart|reload"
exit 1
esac
 
exit 0

Change the permission of the script as a root

chmod a+x /etc/init.d/oracledb
update-rc.d oracledb defaults 99
Oracle Database 11g R2 on Ubuntu 11.04

54 thoughts on “Oracle Database 11g R2 on Ubuntu 11.04

    • October 18, 2011 at 11:23 am
      Permalink

      Thanks for the reply. But I am getting webpage via http not https:)

      Reply
      • February 16, 2012 at 11:16 am
        Permalink

        i have installed oracle 11gr2 on ubutu 11.04 and it installed without any error as i followed all the above steps. first time oem opened but when i tried after that it is not opening. and also i am not able to open sqlplus
        it is showing me sqlplus : command not found error

        what should i do pls help me out in this its very urgent

        Reply
        • February 18, 2012 at 12:43 am
          Permalink

          Have u restarted the machine?
          At the end of the post there is one script to start/stop services. Have you tried that one.

          Reply
  • October 19, 2011 at 11:25 am
    Permalink

    I’m trying to install Oracle 11gR2 on Ubuntu 11.10.

    lsb-rsm is missing, i installed it from maverick. libmotif4 is gone also.

    At the linking binaries part of the install I get at least 10 of the following

    Error in invoking target ‘X’ of makefile ‘/u01/app/oracle/product/11.2.0/dbhome_1/sqlplus/lib/Y’. See ‘/u01/app/oraInventory/logs/installActions2011-10-18_10-27-37PM.log’ for details.

    Where X and Y are different each time. I’ve tried linking and relinking based on other install tutorials, but at beast I get 4 errors and some seem to be critical, as it seems to break the listener.

    I have no idea what I can do to fix it at this point.

    Reply
    • October 23, 2011 at 12:05 am
      Permalink

      Can you start from the scratch?

      Reply
      • October 24, 2011 at 3:34 am
        Permalink

        I tried a few more times, reinstalling ubuntu 11.10 and i still seem to get stuck at the exact same part.

        i just VM’d a centos install and installed oracle 11gr2 there with little problems.

        id still prefer for it to work straight under ubuntu 11.10 but unforunately i dont have the time to try to get it working at the moment.

        Reply
        • October 24, 2011 at 10:53 pm
          Permalink

          Are you trying on 32 bit or 64 bit?

          Reply
          • October 31, 2011 at 2:23 pm
            Permalink

            64bit.

          • November 1, 2011 at 12:43 pm
            Permalink

            Ok. The mentioned howto is for 32bit. For 64 bit can you follow below procedures:

            Install required packages

            sudo su –
            apt-get install build-essential
            apt-get install libaio1
            apt-get install libaio-dev
            apt-get install unixODBC
            apt-get install unixODBC-dev
            apt-get install pdksh
            apt-get install expat
            apt-get install sysstat
            apt-get install libelf-dev
            apt-get install elfutils
            apt-get install lsb-cxx

            To avoid error “linking ctx/lib/ins_ctx.mk…”:
            cd /tmp
            wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_amd64.deb
            dpkg-deb -x libstdc++5_3.3.6-17ubuntu1_amd64.deb ia64-libs
            cp ia64-libs/usr/lib/libstdc++.so.5.0.7 /usr/lib64/
            cd /usr/lib64/
            ln -s libstdc++.so.5.0.7 libstdc++.so.5

            cd /tmp
            wget http://mirrors.kernel.org/ubuntu/pool/universe/i/ia32-libs/ia32-libs_2.7ubuntu6.1_amd64.deb
            dpkg-deb -x ia32-libs_2.7ubuntu6.1_amd64.deb ia32-libs
            cp ia32-libs/usr/lib32/libstdc++.so.5.0.7 /usr/lib32/
            cd /usr/lib32
            ln -s libstdc++.so.5.0.7 libstdc++.so.5

            cd /tmp
            rm *.deb
            rm -r ia64-libs
            rm -r ia32-libs

            To avoid error invoking target ‘idg4odbc’ of makefile:
            ln -s /usr/bin/basename /bin/basename

            To avoid errors when executing the post-install root.sh script:
            ln -s /usr/bin/awk /bin/awk

  • October 23, 2011 at 11:18 pm
    Permalink

    please before starting the installation do not forget to input this too:

    xhost local:oracle

    otherwise the installation will not start.

    Reply
  • October 24, 2011 at 7:42 pm
    Permalink

    I had to disable access control (“xhost +” in terminal) in order to be able to start the installer in Oneiric.

    Reply
  • November 8, 2011 at 9:33 am
    Permalink

    hi and thank you ,
    I did everything as it is but in the last I got this :
    no protocol found and gave me an exception handling error despite i am work with ubunto 11.10 64 bit
    have you any solution for this error?
    tanks

    Reply
    • November 10, 2011 at 12:53 am
      Permalink

      Sorry but never try it on Ubuntu 64bit.

      Reply
      • November 10, 2011 at 10:52 pm
        Permalink

        the problem was solve but now when i try to install give an error said not enough memory in the disk need 4GB
        despite i did everything

        Reply
        • November 12, 2011 at 6:40 pm
          Permalink

          If you post your entire steps it will be helpful to other members.

          Reply
  • December 8, 2011 at 3:53 pm
    Permalink

    i am getting this errro and it does not open installer.

    >>> Ignoring required pre-requisite failures. Continuing…
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-12-08_02-19-20AM. Please wait …oracle@ubuntu:~/database$ No protocol specified
    Exception in thread “main” java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at java.awt.Toolkit$2.run(Toolkit.java:821)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
    at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
    at com.jgoodies.looks.LookUtils.(Unknown Source)
    at com.jgoodies.looks.plastic.PlasticLookAndFeel.(PlasticLookAndFeel.java:122)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
    at oracle.install.commons.util.Application.startup(Application.java:758)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
    at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
    at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
    at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

    Reply
    • December 8, 2011 at 11:16 pm
      Permalink

      Run
      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 lsb-rpm libstdc++5

      Reply
  • December 16, 2011 at 7:36 pm
    Permalink

    Hello everybody! I installed Oracle 11g Release 2 on Ubuntu 11.04 but what i want now is to know how to we use the ‘netca’ and the ‘dbca’ commands. Can somebody help me?

    Best things to you!

    Reply
  • January 5, 2012 at 4:21 pm
    Permalink

    i am getting this errro and it does not open installer.

    >>> Ignoring required pre-requisite failures. Continuing…
    Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-12-08_02-19-20AM. Please wait …oracle@ubuntu:~/database$ No protocol specified
    Exception in thread “main” java.lang.NoClassDefFoundError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at java.awt.Toolkit$2.run(Toolkit.java:821)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:804)
    at com.jgoodies.looks.LookUtils.isLowResolution(Unknown Source)
    at com.jgoodies.looks.LookUtils.(Unknown Source)
    at com.jgoodies.looks.plastic.PlasticLookAndFeel.(PlasticLookAndFeel.java:122)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at javax.swing.SwingUtilities.loadSystemClass(SwingUtilities.java:1783)
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:480)
    at oracle.install.commons.util.Application.startup(Application.java:758)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:164)
    at oracle.install.commons.flow.FlowApplication.startup(FlowApplication.java:181)
    at oracle.install.commons.base.driver.common.Installer.startup(Installer.java:265)
    at oracle.install.ivw.db.driver.DBInstaller.startup(DBInstaller.java:114)
    at oracle.install.ivw.db.driver.DBInstaller.main(DBInstaller.java:132)

    Reply
    • January 6, 2012 at 12:42 am
      Permalink

      Open a new terminal, change the user to Oracle

      Open an xterm session
      #xterm

      Disable the access control using
      # xhost _+

      check if this works
      # xclock

      If it does, you are ready to run the installer.

      #./runInstaller

      Reply
      • January 6, 2012 at 1:21 am
        Permalink

        well, when I login as oracle(ie. su oracle), I’m asked of password. what is the password for the oracle user?

        Reply
        • January 6, 2012 at 10:56 pm
          Permalink

          if you have created oracle user and you dont know the password, you can reset the same through root

          Reply
  • January 6, 2012 at 11:52 pm
    Permalink

    ok!, when I log as oracle I can’t open the xterm session. I get these error message:No protocol specified
    xterm Xt error: Can’t open display: :0.0

    Reply
    • January 7, 2012 at 10:05 am
      Permalink

      Are you on the physical box or you are connecting through ssh? From which OS you are firing SSH? Windows?

      Reply
          • January 10, 2012 at 4:30 pm
            Permalink

            EM is started or not?

          • January 10, 2012 at 8:39 pm
            Permalink

            How do I start EM?

          • January 12, 2012 at 12:19 am
            Permalink

            I have created init stop / start script to manage listener.

            vi /etc/init.d/oracledb

            #!/bin/bash
             
            export ORACLE_BASE=/u01/app/oracle
            export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
            export ORACLE_OWNR=oracle
            export PATH=$PATH:$ORACLE_HOME/bin
             
            if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
            then
            echo "Oracle startup: cannot start"
            exit 1
            fi
             
            case "$1" in
            start)
            # Oracle listener and instance startup
            echo -n "Starting Oracle: "
            su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
            su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
            touch /var/lock/oracle
            echo "OK"
            ;;
            stop)
            # Oracle listener and instance shutdown
            echo -n "Shutdown Oracle: "
            su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
            su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
            rm -f /var/lock/oracle
            echo "OK"
            ;;
            reload|restart)
            $0 stop
            $0 start
            ;;
            *)
            echo "Usage: `basename $0` start|stop|restart|reload"
            exit 1
            esac
             
            exit 0

            Change the permission of the script as a root

            chmod a+x /etc/init.d/oracledb
            update-rc.d oracledb defaults 99

            to start the service just run
            /etc/init.d/oracledb restart

          • January 12, 2012 at 2:30 am
            Permalink

            ok! I’ve restarted it. From the terminal , I have “starting oracle: Ok”, but I still can’t load http://localhost:1158/em. I already have apache web server installed, could be the problem?

          • January 12, 2012 at 9:58 am
            Permalink

            Are you sure your em console running on 1158.
            What is the output of netstat -an | grep 1158?
            Can you able to telnet it?

          • January 12, 2012 at 2:26 pm
            Permalink

            em console is not running on 1158. How do I know the port it is running on?

          • January 12, 2012 at 9:40 pm
            Permalink

            export ORACLE_BASE=/u01/app/oracle
            export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
            export ORACLE_OWNR=oracle
            export PATH=$PATH:$ORACLE_HOME/bin
            emctl status dbconsole

            You will get following output
            Oracle Enterprise Manager 11g Database Control Release 11.2.X.X.X
            Copyright (c) 1996, 2009 Oracle Corporation. All rights reserved.
            https://node1.com:1158/em/console/aboutApplication
            Oracle Enterprise Manager 11g is running.

          • January 12, 2012 at 9:59 pm
            Permalink

            Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name.

          • January 12, 2012 at 10:16 pm
            Permalink

            export ORACLE_UNQNAME=orcl

          • January 14, 2012 at 1:16 pm
            Permalink

            OC4J Configuration issue. /u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_scylla_orcl not found.

          • January 14, 2012 at 1:27 pm
            Permalink

            please pate $ORACLE_HOME/host_sid/sysman/config/emd.properties

    • January 14, 2012 at 1:32 pm
      Permalink

      where should I paste it?

      Reply
        • January 14, 2012 at 1:38 pm
          Permalink

          I guess I’ve to do another installation

          Reply
          • January 14, 2012 at 1:43 pm
            Permalink

            Any reason for doing so? Try to paste emd.properties else you can do the another installation.

          • January 14, 2012 at 1:43 pm
            Permalink

            Any reason for doing so? Try to paste emd.properties else you can do the another installation.

          • January 14, 2012 at 2:12 pm
            Permalink

            which file?

          • January 14, 2012 at 2:15 pm
            Permalink

            $ORACLE_HOME/host_sid/sysman/config/emd.properties

  • January 31, 2012 at 6:37 am
    Permalink

    Чтение списков пакетов… Готово
    the first step:

    Построение дерева зависимостей
    Чтение информации о состоянии… Готово
    Пакет lsb-rpm недоступен, но упомянут в списке зависимостей другого пакета.
    Это может означать, что пакет отсутствует, устарел, или доступен из источников, не упомянутых в sources.list

    E: Для пакета lsb-rpm не найден кандидат на установку

    Help me! Ubuntu 11.10 x32

    Reply
  • January 31, 2012 at 10:26 am
    Permalink

    On first stage error:
    >>Reading package lists … Finish
    Building dependency tree
    Reading state information … Finish
    Lsb-rpm package is not available, but is referred to by another package.
    This could mean that the package is missing, obsolete, or is available from sources other than those listed in sources.list

    Why? Help me please!

    Reply
  • Pingback: Oracle Database 11g Release 2 στο Ubuntu Server 11.10 64-bit « FTD Team @Tech

  • March 21, 2012 at 8:27 pm
    Permalink

    i have the same problem with oracle like Pfieffer i need some help here please and thank u

    Reply
  • September 12, 2012 at 10:55 pm
    Permalink

    Please need help , email me back asap . I got as far as the installation but it started erroring out and it left this king off error in the log


    kdzu.c:(text.unlikely+0x58e2): undefined reference to `lbivffs’
    kdzu.c:(
    INFO: text.unlikely+0x591b): undefined reference to `lbivffs’
    /home/rob1/oracle/product/11.2.0/dbhome_1/lib/libgeneric11.a(slcpu.o): In function `slgcsms’:
    slcpu.c:(text.hot+0x1d): undefined reference to `sltrgftime64′
    /home/rob1/oracle/product/11.2.0/dbhome_1/lib/libgeneric11.a(slcpu.o): In function `slgcs’:
    slcpu.c:(text.hot+0x45): undefined reference to `sltrgatime64′
    /home/rob1/oracle/product/11.2.0/dbhome_1/lib/libnl11.a(nlba.o): In function `nlbamsg’:
    nlba.c:(text.hot+0x99): undefined reference to `lstprint
    INFO: f’
    /home/rob1/oracle/product/11.2.0/dbhome_1/lib/libnl11.a(nlnvlet.o): In function `nlnvlet’:
    nlnvlet.c:(text.hot+0xe0): undefined reference to `lstmclo’
    /home/rob1/oracle/product/11.2.0/dbhome_1/lib/libcommon11.a(ttcoac.o): In function `ttcoac’:
    ttcoac.c:(text.hot+0xad5): undefined reference to `lxhci2h’
    ttcoac.c:(text.hot+0xae4): undefined reference to
    INFO:
    INFO: `
    INFO: lxhnsize
    INFO: ‘
    INFO:
    ttcoac.c:(text.hot+0xafe): undefined reference to `lxhci2h’
    ttcoac.c:(text.hot+0xb0d): undefined reference to `lxhnsize’
    collect2: ld returned 1 exit status
    /home/rob1/oracle/product/11.2.0/dbhome_1/bin/genorasdksh: Failed to link liborasdk.so.11.1
    make: *** [liborasdksh] Error 1

    Reply

Leave a Reply to Cyrille BLUNT Cancel 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