Regards installing Oracle/Berkeley BD, I did this only yesterday on Solaris. I unpacked the tar file and did the following:
cd build_unix
sh -c "CC=gcc ../dist/configure --prefix=/you/install/path/here"
make
make install
Oracle have documentation for building on
Win32 and
OS X platforms also.
dragonchild has
advised you of an alternative if you do not have your heart set on Berkeley DB.
Hope this helps.
Martin