DNS cache

I try to go on the djb way ;-)

cd /usr/local/src/

mkdir patches
cd patches/
wget http://www.thedjbway.org/patches/djb_errno_patches.tgz
gunzip djb_errno_patches.tgz
tar xvf djb_errno_patches.tar
cd ..

wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
gunzip ucspi-tcp-0.88.tar.gz
tar xvf ucspi-tcp-0.88.tar
cd ucspi-tcp-0.88/
patch -p1 < ../patches/ucspi-tcp-0.88.errno.patch
make
make setup check
cd ..

wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz
gunzip daemontools-0.76.tar.gz
tar xvf daemontools-0.76.tar
cd admin/daemontools-0.76/
touch /etc/inittab
patch -p1 < ../../patches/daemontools-0.76.errno.patch
package/install
cd ../..

wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz
gunzip djbdns-1.05.tar.gz
tar xvf djbdns-1.05.tar
cd djbdns-1.05/
echo gcc -O2 -include /usr/include/errno.h > conf-cc
make
make setup check

/etc/event.d/svscan

# svscan - daemontools

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
addgroup --system dnscache
addgroup --system dnslog
adduser --no-create-home --disabled-login --shell /bin/false --system --ingroup dnscache dnscache
adduser --no-create-home --disabled-login --shell /bin/false --system --ingroup dnslog dnslog

mkdir /etc/djbdns
dnscache-conf dnscache dnslog /etc/djbdns/dnscache 127.0.0.1
mkdir /var/log/djbdns
mkdir /var/log/djbdns/dnscache
chown dnslog:dnslog /var/log/djbdns/dnscache
chmod 02755 /var/log/djbdns/dnscache
ln -s /etc/djbdns/dnscache/ /service

echo 100000000 > /service/dnscache/env/CACHESIZE
echo 104857600 > /service/dnscache/env/DATALIMIT

/etc/djbdns/dnscache/log/run

exec setuidgid dnslog multilog t n10 s5000000 /var/log/djbdns/dnscache
initctl start svscan
svc -t /service/dnscache

Add the below line into /etc/resolv.conf. This line have to be a first nameserver line.

nameserver 127.0.0.1

The other lines put into the /etc/djbdns/dnscache/root/servers/@ files beginig.



 
Logged in as: Oszkár Kmetti
other/dnscache.txt · Last modified: 2009.01.14 16:43 by oszi
 
Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki