Quick Guide to DJBDNS on Cent0S 6 (15 minutes or less)

DJBDNS authoritative nameserver (tinydns) on public IP, with dnscache providing lookup for localhost on the loopback.

This installation requires a single public IP, and is based on CentOS 6.3 (minimal) on either i386 and x64.

preparation
1. yum install gcc make wget
2. yum update

daemontools
1. cd /usr/local/src
2. wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
3. gunzip daemontools-0.76.tar
4. tar -xpf daemontools-0.76.tar
5. cd admin/daemontools-0.76
6. vi src/conf-cc

add to the end of the gcc line:
-include /usr/include/errno.h

7. ./package/install

ucspi
1. cd /usr/local/src
2. wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
3. gunzip ucspi-tcp-0.88.tar
4. tar -xf ucspi-tcp-0.88.tar
5. cd ucspi-tcp-0.88
6. vi conf-cc

add to the end of the gcc line:
-include /usr/include/errno.h

7. make
8. make setup check

dnscache
1. cd /usr/local/src
2. wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
3. gunzip djbdns-1.05.tar
4. tar -xf djbdns-1.05.tar
5. cd djbdns-1.05
6. vi conf-cc

add to the end of the gcc line:
-include /usr/include/errno.h

7. make
8. make setup check
9. useradd -d /var/dnscache -s /bin/false dnscache
10. useradd -d /var/dnscache -s /bin/false dnslog
11. dnscache-conf dnscache dnslog /var/dnscache/dnscache 127.0.0.1
12. ln -sf /var/dnscache/dnscache /service/

tinydns
1. useradd -d /var/dnscache -s /bin/false tinydns
2. useradd -d /var/dnscache -s /bin/false tinylog
3. tinydns-conf tinydns tinylog /var/dnscache/tinydns your.public.ip.address
4. add some records:
cd /var/dnscache/tinydns/root
./add-ns ns.yourdomain.com your.public.ip.address
./add-ns ip.public.your.in-addr.arpa your.public.ip.address
./add-mx yourdomain.com your.mx.ip.address
./add-host ns.yourdomain.com your.public.ip.address
./add-host mail.yourdomain.com your.mx.ip.address
5. make
6. ln -sf /var/dnscache/tinydns /service

init
1. vi /etc/init/daemontools.conf

# daemontools
start on runlevel [2345]
stop on runlevel [016]
respawn
exec /command/svscanboot

2. vi /etc/inittab
remove the following line:
SV:123456:respawn:/command/svscanboot

3. reboot

-Instructions provided by guest writer "Beef Supreme".



 
Google Search