Tinydns / DJBDNS on Ubuntu Hardy Heron
tonyn | March 15, 2009I have used tinydns/djbdns for hosting DNS for quite a while and installed it on a number of previous Ubuntu versions, but installing it on the latest Hardy Heron server edition didn’t go very smoothly. So, I thought I would try and capture my steps for anyone looking to use tinydns on Hardy. Good Luck!
PRE-INSTALL:
- sudo apt-get install build-essential
- Add to /etc/apt/sources.list: deb http://ftp2.de.debian.org/debian/ etch main contrib non-free
- sudo apt-get update
INSTALL ALL THE PACKAGES:
- ucspi-tcp-src:
- sudo apt-get install ucspi-tcp-src
- sudo build-ucspi-tcp
- Accept all the defaults
- daemontools
- sudo apt-get install daemontools-installer
- sudo build-daemontools
- Accept all the defaults
- sudo ln -s /etc/inittab{new} /etc/inittab
- DJBDNS
- sudo apt-get install djbdns-installer
- sudo build-djbdns
- Accept all the defaults
CONFIG PACKAGES:
- Create Users (if they aren’t created for you):
- sudo adduser –no-create-home –disabled-login -shell /bin/false dnscache
- sudo adduser –no-create-home –disabled-login -shell /bin/false dnslog
- sudo adduser –no-create-home –disabled-login -shell /bin/false tinydns
- Configure dnscache:
- sudo mkdir /var/lib/svscan
- sudo dnscache-conf dnscache dnslog /var/lib/svscan/dnscache
- sudo ln -sf /var/lib/svscan/dnscache /service
- Check that “supervise” directory was create in /service/dnscache - If it wasn’t something is wrong… See: http://www.troubleshooters.com/linux/djbdns/index.htm
- Configure tinydns:
- sudo tinydns-conf tinydns dnslog /var/lib/svscan/tinydns 10.0.0.105
- sudo ln -sf /var/lib/svscan/tinydns /service
- Check that “supervise” directory was create in /service/tinydns - If it wasn’t something is wrong. See: http://www.troubleshooters.com/linux/djbdns/index.htm
- Edit /etc/resolv.conf
- search revivehosting.com
- nameserver 127.0.0.1
START-UP CONFIGURATION:
- INIT:
- touch
/etc/event.d/svscan - update contents to:
start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5
stop on shutdown
respawn
exec /usr/bin/svscanboot
- touch
- sudo /etc/init.d/djbdns restart
Test Install:
- dnsip www.google.com (dnscache)
References:
- http://www.troubleshooters.com/linux/djbdns/index.htm
- http://www.fredshack.com/docs/djbdns.html
- http://www.howtoforge.com/install-djbdns-nameserver-on-debian-etch
- http://www.len.ro/work/tools/gutsy-on-a-ubuntu-server/dhcp-and-djbdns
- http://cr.yp.to/djbdns/run-server.html
- http://www.fredshack.com/docs/djbdns.html
- http://www.paralipsis.org/2008/04/configuring-daemontools-under-ubuntu-upstart/