Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:freebsd:installing_avahi [2019/04/18 10:09]
alex removed
— (current)
Line 1: Line 1:
-====== Installing Avahi on FreeBSD ====== 
  
-From searching around on google, apparently either nobody installs the multicast DNS/​Zeroconf module Avahi on FreeBSD or it’s so easy to install it warrants no easy to follow documentation. ​ Unfortunately,​ neither of the above are true, so I will do my best to provide an easy-to-follow tutorial for getting Avahi working on FreeBSD. ​ Specifically,​ getting Avahi set up to allow for .local domain support locally as well as broadcasts of the computer’s own information over multicast dns. 
- 
-First, install avahi and nss-mdns. Please note that avahi requires dbus which, in turn, requires glib, so if you don’t have these packages installed already, it could take some time. Also, since nss-mdns requires avahi, all you have to do is install nss-mdns and it will grab everything else automatically. 
- 
-<​code>​ 
-# cd /​usr/​ports/​net/​avahi && make install clean 
-# cd /​usr/​ports/​dns/​nss_mdns && make install clean 
-</​code>​ 
- 
-Make sure the service starts by adding 
- 
-<​code>​ 
-dbus_enable="​YES"​ 
-avahi_daemon_enable="​YES"​ 
-</​code>​ 
- 
-to ''/​etc/​rc.conf''​. 
- 
-Finally, edit ''/​etc/​nsswitch.conf''​ and change 
- 
-<​code>​ 
-hosts: files dns 
-</​code>​ 
- 
-to 
- 
-<​code>​ 
-hosts: files dns mdns 
-</​code>​ 
- 
-. 
- 
-Now reboot. When everything comes back up, try pinging something that you know broadcasts mDNS. Try pinging ''​hostname.local''​ from another computer that supports mDNS as well. If all went well, it should work perfectly and the IP address with get looked up without issue and other computers on the network will pick up the mDNS information. Done! 
- 
-[BTW, the only not-so-obvious part of the whole thing is editing ''​nsswitch.conf''​. ​ Unfortunately,​ there are multiple sites that have information on it and most of the information available simply doesn'​t work.  Maybe it's just my computer or maybe they'​re for a different version of nss-mdns. ​ Regardless, after quite a bit of searching and trial-and-error,​ I found the change listed here to work perfectly.]