日期:2014-05-16  浏览次数:20714 次

ubuntu11.04下安装oracle10g


Installing Oracle 10g On Ubuntu Karmic 64 Bit or Otherwise PDF Print E-mail
Written by Josh B  
Thursday, 07 January 2010 18:31

Tags: oracle | ubuntu
Why Oracle 10g on Ubuntu...?

Oracle doesn't officially currently support its database on Ubuntu. However, I think that Ubuntu, especially the current release (09.10 : Karmic) is a great development platform. At my place of work there is a small development dept all busily developing and all using Ubuntu as the development platform of choice. The system we support uses Oracle 10g as its database. It followed that if we are to work productively then we needed some way of installing Oracle on Ubuntu. This guide is the result of lots of trial, error and spending time figuring out the best way to install Oracle 10g on Ubuntu.

Since Oracle doesn't support Ubuntu, installing Oracle in this way on a Production machine is very unwise. Its also even more unwise if you notice that I leave many of the defaults alone and use easily guessable passwords. However, when we deploy onto Production systems these defaults are close enough that we can deliver meaningful work without having to get a Sun server for the office. It also means we can all have our our installation of Oracle on our machines. Since its local the response time is very fast. And since no-one else is using the same Oracle install we can restart as many times as we want to...

Obviously if you think differently and install Oracle based Ubuntu into a production environment and it all goes horribly wrong you have only yourself to blame. I will not accept liability for your company going out of business because of this guide...! NB: If you are running 64-bit Ubuntu then you will need to follow the sections marked out for 64-bit Users.

Disclaimer: This has been adapted from many blogs, forums and other websites. If you see a bit of text that you think has been lifted from your blog entry, forum post or other waffling it probably might of. Please let me know and I will change. However no stealing of copyright is meant...!

This guide will take about two hours to complete, not including the time to download the file from Oracle. To fully install Oracle budget at least a morning or afternoon. The install is usually straight forward, but can throw up unexpected problems...!


Download

You will first need to download the installation file from Oracle. For 32-bit Ubuntu use "10g Release 2 Enteprise Edition for the Linux x86 architecture" and for 64-bit Ubuntu use "Oracle Database 10g Release 2 (10.2.0.1.0) for Linux x86-64". You will then either get 10201_database_linux32.zip or 10201_database_linux_x86_64.cpio.gz depending on your choice. Put this somewhere handy...


Install Libs

sudo apt-get install gcc libaio1 lesstif2 lesstif2-dev make rpm libc6 sun-java6-jre

For 64 Bit Ubuntu...

sudo apt-get install gcc-multilib libc6-dev-i386 libc6-dev-i386 libc6-i386 ia32-libs

(This avoids an compilation error because Oracle has mixed and matched 32-bit and 64-bit libraries. The Exception is "Error in invoking target 'install' of makefile '/oracle/10g/ctx/lib/ins_ctx.mk" and the compiler will have the following error :

/usr/bin/ld: skipping incompatible /lib/libpthread.so.0 when searching for /lib/libpthread.so.0

/usr/bin/ld: cannot find /lib/libpthread.so.0

Installing gcc-multilib, etc appears to avoid this)


Install libstdc++5

With Ubuntu 09.10 this is no longer included in the Packages. (If you are not on Karmic, install it via Synaptic.) Install as follows:

wget "http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_i386.deb"
ar vx libstdc++5_3.3.6-17ubuntu1_i386.deb
tar zxvf data.tar.gz
file usr/lib/libstdc++