One of the small advantages of running MacOS X is the ability to refer to machines that aren’t represented in (a static) DNS and have dynamic IP address by a simple name. Now that we are moving away from a FreeBSD/Solaris server setup to a MacOS X one, there is still some advantage to using cheap disposable Linux servers. So how about Zeroconf names for Linux?
It turns out to be easier than I feared. I was expecting the usual Linux mess of inconsistent standard support with the resulting incomprehensible configuration script, but the Apple team have done a great job.
If you want to install Bonjour on your Linux (or BSD) server, read on.
I downloaded to my PowerBook, and used scp to copy the tarball over to my Asterix (Linux) server. Open the tarball, and cd into the Posix directory (cd mDNSResponder-107.1/mDNSPosix).
make os=linux install
End of story. Reboot to make it active, although you could start it without rebooting (I like to confirm that the boot process still works correctly when adding a service). There are a couple of man pages: libnss_mdns, nss_mdns.conf, but there is nothing that you need to configure if all you want is the hostname support.
Going any deeper into zeroconf means that you need to add some support code into your apps, so refer to the documentation pages for that.