1 2 Previous Next 26 Replies Latest reply: Feb 7, 2012 6:20 PM by Catch_22 RSS

    Installing Oracle 11g R2 on Ubuntu 10 Howto

    Catch_22
      This is a of follow-up of my previous post: Installing Oracle 11g R2 on Ubuntu 10.04 (solved)
      Installing Oracle 11g R2 on Ubuntu 10.04 (solved)

      Revisited.

      Installing Oracle 11gR2 11.2.0.1 x86_64-bit in Ubuntu Linux 10.04 Intel x86_64-bit.
      (Please see the previous thread regarding feedback for 32-bit installations)


      Note: Tips and troubleshooting info are the end of this document



      h2. Oracle Installation:

      h3. Oracle Software Prerequisites

      h4. 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


      h3. Kernel Parameters

      sudo su -

      Make a backup of the original kernel configuration file:
      cp /etc/sysctl.conf /etc/sysctl.original


      h4. Modify the kernel parameter file

      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=2147483648" >> /etc/sysctl.conf

      Note: kernel.shmmax = max possible value, e.g. size of physical memory in bytes


      Load new kernel parameters
      sysctl -p



      h3. Oracle Groups and Accounts

      sudo su -

      groupadd oinstall
      groupadd dba
      useradd -m -g oinstall -G dba oracle
      usermod -s /bin/bash oracle

      passwd oracle

      groupadd nobody
      usermod -g nobody nobody

      id oracle
      uid=1001(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba)


      Make a backup of the original file:
      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



      h3. Oracle Directories

      i.e. /u01/app for Oracle software and /u02/oradata for database files

      mkdir -p /u01/app/oracle
      mkdir -p /u01/app/oraInventory
      mkdir -p /u02/oradata

      chown oracle:oinstall /u01/app/oracle
      chown oracle:oinstall /u01/app/oraInventory
      chown oracle:oinstall /u02/oradata

      chmod 750 /u01/app/oracle
      chmod 750 /u01/app/oraInventory
      chmod 750 /u02/oradata



      h3. Oracle Universal Installer

      +Login as the Oracle user - do not use 'su' command+
      ssh -Y oracle@server_address

      See Tips below for mounting the Oracle installation source
      /path_to_installer/runInstaller

      Note: Select the "Ignore All" button at the Prerequisite Checks dialog.



      h2. Tips:

      Fix backspace and arrow keys in the vi-editor:
      sudo apt-get install vim


      Allow the Oracle user to gain root access:
      Edit /etc/sudoers and add the following:
      # Members of the oinstall group may gain root privileges
      %oinstall ALL=(ALL) ALL


      Enable remote SSH connectivity:
      sudo apt-get install ssh
      Note: New accounts requires a password: passwd oracle


      Connect from a X-Windows enabled terminal with trusted X11 forwarding:
      Using 'su - oracle' will break X screen forwarding or proper display when using Oracle runInstaller

      You should either log out root and log in as user "oracle", or use SSH with X forwarding from a remote system or local terminal screen: e.g.
      # ssh -X oracle@localhost
      # ssh -X oracle@server_hostname_or_ip

      Then simply type "xclock" to see if X forwarding to your local X-server works.
      Typing 'xclock' in the terminal window should display a clock on your desktop.

      Note: When using SSH you should not manually configure DISPLAY variables and using 'xhost' is also not necessary.
      When making a remote connection, the program you use to connect to Linux need to be as an X-server to process the requests from the Linux client application.
      There are several free products availabe for windows, e.g. MobaXterm. MacOSX users can use Apple's X11 from optional install.

      Mount an iso disk image:
      mount -o loop /u02/oradata/oracle11gR2.iso /mnt/
      Note: For this to work the iso image needs to be copied to a Linux filesystem.


      Avoid Oracle runInstaller ".oui: No such file" / "bad interpreter: Permission denied:
      Logout your current X-session and login as user Oracle
      Insert the Oracle Installation DVD

      Or from a remote terminal session:
      Insert the Oracle Installation DVD
      sudo umount /dev/sr0
      Create a new session as user Oracle
      ssh -Y oracle@server_address
      sudo mount /dev/sr0 /media
      /media/database/runInstaller

      If you see "runinstaller" instead of "runInstaller" you can try the following:
      sudo mount -o loop,norock /dev/cdrom /media

      Note the OUI installer fails if there are spaces in the path to runInstaller

      Blank windows in the Oracle Database Creation Assistant (DBCA)
      Disable Visual Effects using System -> Preferences -> Appearance, Visual Effects

      Regards and best of luck.

      Edited by: Dude on Dec 17, 2010 3:56 PM
        • 1. Re: Installing Oracle 11g R2 on Ubuntu 10 Howto
          Helios-GunesEROL
          Hi Markus,

          Thanks for great sharing ;)

          Regard
          Helios
          • 2. Re: Installing Oracle 11g R2 on Ubuntu 10 Howto
            796356
            I have successfully installed the Oracle DB 11gR2 on Ubuntu 10.04 x86-64 but I'm having issues with EM dbconsole. it appears to start up and actually show running from "emctl status dbconsole", but I can't connect to it from a broswer.

            When I attempt access on browser I get:
            Secure Connection Failed!
            SSL received a record with an unknown content type.

            (Error code: ssl_error_rx_unknown_record_type)


            I have dropped the em configuration (emca -deconfig dbcontrol db -repos drop) and create it new as I've found suggested in several post (emca -config dbcontro db -repos create) with no luck. The errors I get in the logs are:

            emoms.log

            [OC4J Launcher] ERROR app.ContextInitializer contextInitialized.420 - Integration Class not found: oracle.sysman.pp.paf.sample.ui.intg.PAFDemoIntegration
            [OC4J Launcher] ERROR app.ContextInitializer contextInitialized.420 - Integration Class not found: oracle.sysman.pp.asprov.ui.intg.ASProvisioningIntegration
            [OC4J Launcher] ERROR app.ContextInitializer contextInitialized.420 - Integration Class not found: oracle.sysman.eml.target.slb.common.SLBIntegration

            . . . more of same type different path until . . .

            [XMLLoader0 00000000018.xml] ERROR eml.SMLLoader LoadFiles.696 - Error while processing 00000000018.xml: java.sql.SQLException: ORA-21001: Metric PhysAddress for target type netapp_filer not configured

            emdctl.trc

            WARN httpL nmehl_connect_internal: connect to (host.domain:1158): Connection refused (error = 111)


            I have seen post with this same log pattern but no solution and I was hoping that maybe someone on this forum could help. Thanks in advance.
            • 3. Re: Installing Oracle 11g R2 on Ubuntu 10 Howto
              Catch_22
              I can confirm that dbconsole works fine on a fresh install of Ubuntu 10.04, including recent updates.

              - Do you have a correct /etc/hosts file?
              - Do you have a firewall that needs to be configured?

              Btw, if you drop and recreate the EM repository it will be listening on TCP port 5550 and not 1158 anymore.

              Troubleshooting EM can be complex. Please start a new thread and update your message here with link to your thread.

              Thanks.
              • 4. Re: Installing Oracle 11g Release2 Client on Ubuntu 10.04 Server Howto
                806363
                Dear All,

                I am trying to install Oracle 11g R2 Client on Ubuntu server. Server has Ubuntu10.04 Server Edition. I am getting error as below :----

                Package: glibc-2.3.4-2.41: This is a prerequisite condition to test whether the package "glibc-2.3.4-2.41" is available on the system.
                INFO: Severity:CRITICAL
                INFO: OverallStatus:VERIFICATION_FAILED
                INFO: -----------------------------------------------
                INFO: Verification Result for Node:mlxcxpsmsg
                INFO: Expected Value:glibc-2.3.4-2.41 (x86_64)
                INFO: Actual Value:missing
                INFO: Error Message:PRVF-7532 : Package "glibc-2.3.4-2.41 (x86_64)" is missing on node "mlxcxpsmsg"
                INFO: Cause: A required package is either not installed or, if the package is a kernel module, is not loaded on the specified node.
                INFO: Action: Ensure that the required package is installed and available.


                I have installed all the packages availabe on the Ubuntu CD.When i searched for glibc in the Ubuntu Server CD I got following files which I had installed :

                libc6_2.11.1-0ubuntu7_amd64.deb
                libc6-dev_2.11.1-0ubuntu7_amd64.deb
                libc6-i386_2.11.1-0ubuntu7_amd64.deb
                libc6-udeb_2.11.1-0ubuntu7_amd64.udeb
                libc-bin_2.11.1-0ubuntu7_amd64.deb
                libc-dev-bin_2.11.1-0ubuntu7_amd64.deb
                libnss-files-udeb_2.11.1-0ubuntu7_amd64.udeb

                Please guide me for the above installation.
                • 5. Re: Installing Oracle 11g Release2 Client on Ubuntu 10.04 Server Howto
                  Catch_22
                  I have installed all the packages availabe on the Ubuntu CD
                  Installing all packages is not necessary, but you will need to install the packages as described above in "Install required packages".
                  Package: glibc-2.3.4-2.41: This is a prerequisite condition to test whether the package "glibc-2.3.4-2.41" is available on the system.
                  Oracle does not support Ubuntu, hence the prerequisite checks of the Oracle Universal Installer will not recognize debian based packages. You need to ignore the prereq failures as outlined.

                  Edited by: waldorfm on Oct 19, 2010 2:03 AM
                  • 6. Re: Installing Oracle 11g R2 on Ubuntu 10 Howto
                    rwsBertman
                    Thank you so very much for posting this walkthrough!

                    I encountered an error as the installer was copying files:

                    File not found
                    */oracle/app/product/11.2.0/dbhome_1/owb/external/oc4j_applications/applications/WFMLRSVCApp.ear*

                    Any idea why this is happening?

                    I have pored through the log files, and can't find any evidence of what would produce the above error.

                    My system config:
                    Ubuntu 10.04
                    kernel 2.6.32-25-generic
                    GNOME 2.30.2
                    installing Oracle 11gR2 database (32 bit)

                    Any help would be appreciated.
                    Thanks!

                    Edited by: user3992829 on Oct 28, 2010 1:35 AM
                    • 7. Re: Installing Oracle 11g R2 on Ubuntu 10 Howto
                      rwsBertman
                      I have pored through the log files, and can't find any evidence of what would produce the above error.

                      My system config:
                      Ubuntu 10.04
                      kernel 2.6.32-25-generic
                      GNOME 2.30.2
                      installing Oracle 11gR2 database (32 bit)

                      Any help would be appreciated.
                      Thanks!
                      • 8. Re: Installing Oracle 11g R2 on Ubuntu 10 Howto
                        Catch_22
                        These are instructions for installing 11gR2 x86_64.

                        Are you getting this error during installation? If yes, than the problem is most likely not Ubuntu and could be that you did not unzip all the installation zip files into the same directory. If this is not the right answer, please create a new thread in the Database Installation forum. Thanks.
                        • 9. Re: Installing Oracle 11g R2 on Ubuntu 10 Howto
                          809491
                          hello there

                          thank you for this tutorial but am using ubuntu 10.10 and am just new to linux world so i have some problems following your instructions.

                          I have done all the steps, installed all the packages and i stopped at step (5. Oracle Universal Installer)
                          i dont know how to use ssh -Y when i type this line tells me "ssh: Could not resolve hostname server_address: Name or service not known" i think (server_address should be replaced with something which is what i really dont know :( )

                          am sorry for the basic questions but take in consideration that this is my second week on linux.

                          another issue is that i downloaded db 11g from oracle website and i extracted it i dont have any iso or media dvd , if u can tell me how to run (runInstaller) i would be grateful though.

                          Thanks and sorry for my bad linux knowledge
                          • 10. Re: Installing Oracle 11g R2 on Ubuntu 10 Howto
                            Catch_22
                            server_address: Name or service not known
                            "server_address" is not to be taken literally, but should be replace with the hostname or IP address of your Oracle server. Please check the provided information from Oracle and search google for burning an ISO image or creating a DVD and using the Oracle installer. The process is too complex and client OS specific to explain.
                            • 11. Re: Installing Oracle 11g R2 on Ubuntu 10 Howto
                              810487
                              Thanks for a very informative post.

                              For my development workstation, I have previously been able to install and run Oracle 11R1 and 11R2 on Ubuntu Karmic 9 and Lucid 10.04. I have recently upgraded to Ubuntu Maverick 10.10 but noticed that Oracle seems to run very sluggishly.

                              I decided to wipe out and re-install Oracle and downloaded the newest i.e. Oracle 11.2.0.2 for linux x86_64, and relied on my previous installation notes and whatever I can find online - such as this thread - to help me thru the various quirks. Yes, I know Ubuntu/Debian is not an officially blessed Linux distro by Oracle, but due to my past successes, I went ahead anyway.

                              At this stage I can install the software by runInstaller, and run netca with no problem at all.

                              But running dbca I get stuck with ORA-12547 TNS lost contact and can't really proceed.

                              I can run tnsping and tnslistener is responding.

                              I also verified that libaio is installed.

                              But due to this I can't create a DB.

                              Did anyone experience the same problem? Any solution?

                              - Brian, stumped.
                              • 12. Re: Installing Oracle 11g R2 on Ubuntu 10 Howto
                                Catch_22
                                http://www.dba-oracle.com/t_ora_12547_tns_lost_contact.htm

                                If the above does not provide the answer, please create a separate post.
                                • 13. Re: Installing Oracle 11g R2 on Ubuntu 10 Howto
                                  823967
                                  Hi,

                                  Thanks for an excellent post. Appreciate the detail.

                                  I have a question on installing on a 32 bit machine. The fix for libstdc++5 you have listed I think is for 64 bit? Daniel Sol posted a reply for 32 bit machines and that covers the first lib fix, but I am not sure about the second one and how to alter it to apply to 32 bit.

                                  Daniel Sol's version for 32 bit - first lib fix
                                  wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_i386.deb
                                  dpkg-deb -x libstdc++5_3.3.6-17ubuntu1_i386.deb ia-libs
                                  cp ia-libs/usr/lib/libstdc++.so.5.0.7 /usr/lib
                                  cd /usr/lib
                                  ln -sf libstdc++.so.5.0.7 libstdc++.so.5


                                  Your (Dude's) 64 bit - second lib fix
                                  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



                                  Thanks
                                  Mike
                                  root@UBUNTU:~# uname -a
                                  Linux UBUNTU 2.6.32-26-generic #48-Ubuntu SMP Wed Nov 24 09:00:03 UTC 2010 i686 GNU/Linux
                                  • 14. Re: Installing Oracle 11g R2 on Ubuntu 10 Howto
                                    Catch_22
                                    Prior to Oracle version 11.2.0.2, Oracle requires the installation of 32-bit and 64-bit libraries on a x86_64 system. From what I understand you only need the 32-bit version (first lib fix), and you don't need to install the 32-bit of the libstdc++5 library for a 64-bit system.

                                    Btw, there is apparently a java problem on a 32-bit operating system and 32-bit Java software on newer 64-bit AMD processors, in which case you may have to install Oracle patch 8670579, or install on a x86_64 OS.
                                    1 2 Previous Next