what distro are u using? in most cases, for an rpm based distro, u can:
rpm --redhatprovides libdb3-2.so
which will give u the rpm package providing that file. Or, try to look for the 'libdb3' package.
if u are using redhat and u r running X, try this:
and select the web server components. This way, the dependencies will be handled automatically.