Yeah you can. You just need a server running a name server such as bind or nsd.
Check out http://www.nlnetlabs.nl/projects/nsd/, http://en.wikipedia.org/wiki/BIND, http://www.isc.org/software/bind, and http://en.wikipedia.org/wiki/NSD if you're curious to read more about it.