After getting a domain name for your site you’ll need a DNS server. You can use free services such as Zonedit, however why not make use of your VPS to host your DNS as well.
You’ll want to make sure bind is installed, once that is done you’ll need to create a zone file for your domain in /etc/bind:
; /etc/bind/db.example.com $TTL 600 @ IN SOA example.com. marc.exmaple.com. ( 20120507 ; Serial 3600 ; Refresh 600 ; Retry 86400 ; Expire 600 ) ; Negative Cache TTL ; @ IN NS exmaple.com. @ IN A 10.20.21.1 www IN A 10.20.21.1 @ IN MX 10 mail.example.com. @ IN TXT "v=spf1 mx -all"
The MX and TXT records are only necessary if setting up a mail server for your domain as well.
Next edit /etc/bind/named.conf.local and add your zone file:
zone "example.com" { type master; file "/etc/bind/db.example.com"; };
Next restart bind for the changes to take effect:
/etc/init.d/bind9 restart