To set a hostname just su to root and type 'hostname blah.com' (without quotes).
Setting the hostname has nothing to do with domain resolution through. You need a DNS server that your machine can query. You can use your provider's or run you own locally. I recommend
dnscache.