Sunday, May 25, 2008

Oracle on Ubuntu Hardy Haron

I had hard time installing oracle on my brother's sony vaio laptop. Not because of linux but because of windows i was out of space on ubuntu and wanted to shrink windows partition. i had strage expeprice with it. Windows does not let me to shring below 1 GB. Why? may be some technical difficuly. huh! then i started with ubuntu 8.0 live cd, opened Gparted i could resize my NTFS partition. Wow! why windows wouldnt allow then? Does it know that i had ubuntu installed on this laptop and user of this laptop dosent prefer windows. Only reson that i went to windows to resize is because vista is very particular of stratup files and my exprience with NTFS on linux is bad. lost lot of data once.
Within 2 hour gparted moved my 50 gb partition. freed 16 gb for linux and 2gb for swap.

Very first thing i noticed is that oracle doesnt support ubuntu as officially supported linux distribution but i could manange to find installation guide for debian. Its recommended to go with RHEL/SUSE Enterprise if you are using for commercial purpose.

Here are some of links for pre-setup tasks :
  • http://linux.togaware.com/survivor/Oracle_10g.html
  • http://www.akshaymehta.com/2006/12/10/installing-oracle-10g-r2-on-ubuntu-edgy/
  • http://rossov.com/2006/02/08/oracle-10g-ubuntu-linux-vmware-part-ii/
  • http://www.oracle.com/technology/pub/articles/smiley_10gdb_install.html

Even oracle's Installation Guide is also helpful.

Follow all the steps correctly. This actually helps you in case you come across some problem, Since you know what is installed where?
So here we go start terminal with oracle users

su oracle
./runInstaller -ignoreSysPrereqs

-ignoreSysPrereqs is flag that allows oracle to proceed without check. Alternative is to create file /etc/release and pretend that i am rhel.

Installlation went more or less smooth but i faced some problem which are faced by many people. I has faced similar problems on RHEL too!. Little bit of googling will solve most of them.

  • Linking phase fails for 10gR2 on Ubuntu 6.06: undefined ref to 'nnfyboot'
Solution : Create following sysmlinks and relink
ln -s $ORACLE_HOME/lib/libclient10.a $ORACLE_HOME/lib/libagtsh.a
$ORACLE_HOME/bin/genagtsh $ORACLE_HOME/lib/libagtsh.so 1.0

This problme is discussed here and worked on ubuntu 8 too:

  • Right version libstc++ library on my ubuntu 8.04 version was 6.x. So i created following symlink

libstdc++.so.6 -> libstdc++.so.1 ( Present)
libstdc++.so.5 -> libstdc++.so.1 ( Oracle tries to find it, so i added)


  • "ORA-12547: TNS:lost contact" when creating database in Oracle 10g. Lib AIO Error This is very annoying.After installation oracle starts configuration assistant DBCA. After googling a bit around i found out libaio was required. In ubunntu it is called libaio1.


So do apt-get install libaio1


This problm is discussed in this thread for Fedora.



Most of the problems were in linking phase hence i did $ORACLE_HOME/bin/relink all again to make sure that all changes have been affected.

Now oracle is working fine on ubuntu 8.04 beta.

1 comment:

mightymax said...

had the same problem on ubuntu server. I loaded another ubuuntu server on another hardrive, slaved my original server hdd, and booted witht he new server, and used nautilus to copy the lib files and symlink to the original server hdd... rebooted with the old server and prob solved