How to install tinydns / dnscache on Ubuntu Server 64 bit Version
Jimmy Brake Mar 31, 2008

Installing djbdns on ubuntu linux server can be rather difficult if you are not familiar with the exact procedure. Here is how to apply the needed patches and install all the gcc stuff, The documentation at http://cr.yp.to/djbdns/install.html is very good and we are borrowing heavily from it and a previous article we wrote about installing daemontools on suse,

 

To start open a terminal on the ubuntu linux server you are planning to install tinydns on(we are assuming you have none of the djb software installed).

 

Become the root user.

 

sudo su -

 

Get the patches:

 

mkdir -p /usr/local/djb/patches

cd /usr/local/djb/patches

wget http://www.thedjbway.org/patches/djb_errno_patches.tgz

tar xfvz djb_errno_patches.tgz

Install daemontools:

Create a /package directory:

     mkdir -p /package
chmod 1755 /package
cd /package

Install the things you will need to patch and compile daemontools


apt-get install build-essential

 

Download daemontools-0.76.tar.gz into /package. Unpack the daemontools package:

wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz

     gunzip daemontools-0.76.tar
tar -xpf daemontools-0.76.tar
rm daemontools-0.76.tar
cd admin/daemontools-0.76

Patch Daemontools

touch /etc/inittab

patch -p1 < /usr/local/djb/patches/daemontools-0.76.errno.patch

 

Compile and set up the daemontools programs:

package/install
vim /etc/event.d/svscan

then insert:

-------------

# svscan - daemontools

# https://bugs.launchpad.net/ubuntu/+source/daemontools-installer/+bug/66615

#

start on runlevel 2
start on runlevel 3
start on runlevel 4
start on runlevel 5

stop on runlevel 0
stop on runlevel 1
stop on runlevel 6

respawn
exec /command/svscanboot

--------

then (you might need to reboot)

initctl start svscan

 

To report success: (you cannot do this yet since there is no mail command on ubuntu)

mail djb-sysdeps@cr.yp.to < /package/admin/daemontools/compile/sysdeps

 

Install UCSPI-TCP

move to the /user/src dir(this is just where I always do all the building and compiling that I need to do)

 

cd /usr/src

 

Download the ucspi-tcp package. The latest published ucspi-tcp package is ucspi-tcp-0.88.tar.gz.

Unpack the ucspi-tcp package:

wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
     tar xfvz ucspi-tcp-0.88.tar.gz
cd ucspi-tcp-0.88

Patch UCSPI-TCP

patch -p1 < /usr/local/djb/patches/ucspi-tcp-0.88.errno.patch

Compile the ucspi-tcp programs:

     make

As root, install the ucspi-tcp programs under /usr/local:

     make setup check

To report success: (we still have no mail program)

( echo 'First M. Last'; cat `cat SYSDEPS` ) | mail djb-sysdeps@cr.yp.to

Replace First M. Last with your name.

 

Install DJBDNS

 

move back to your /usr/src

 

cd /usr/src

 

Download the djbdns package. The latest published djbdns package is djbdns-1.05.tar.gz.

 

wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz

Unpack the djbdns package:

     gunzip djbdns-1.05.tar.gz
tar -xf djbdns-1.05.tar
cd djbdns-1.05

Compile the djbdns programs:

 echo gcc -O2 -include /usr/include/errno.h > conf-cc 
 make
 As root, install the djbdns programs under /usr/local:

make setup check

 

At this point you should be able to configure it many different ways, oh and don't forget to open your firewall.

 

The link below will bring you back to the djb site for configuring djbdns ..

http://cr.yp.to/djbdns.html

 

For configuring a name server ... (note don't install both servers on the same hardware)

http://cr.yp.to/djbdns/run-server.html

useradd -r Gtinydns

useradd -r Gdnscache

useradd -r Gdnslog

For tinydns

tinydns-conf Gtinydns Gdnslog /etc/tinydns 1.2.3.4

ln -s /etc/tinydns /service

For dnscache http://cr.yp.to/djbdns/run-cache-x.html

dnscache-conf Gdnscache Gdnslog /etc/dnscache 10.53.0.1
ln -s /etc/dnscache /service
touch /etc/dnscache/root/ip/10
Change 10.53.0.1 (10) to your servers ip address ... then test(either tinydns or dnscache) 
dig @10.53.0.1 dwalliance.com
   

For configuring walldns

useradd -r Gwalldns
useradd -r Gdnslog
walldns-conf Gwalldns Gdnslog /etc/walldns 1.2.3.4
cd /service/
ln -s /etc/walldns .
svc -u /service/*


test .... dig @1.2.3.4 -x 1.2.3.4

 


Page 1 of 1

create discussion Create Discussion