This is a bit boring for non-techies, but useful for me as reference when I install a new server.
Sets up a a DNS caching server for the computer in question in order to speed up apache lookup, mail resolving etc.
Below assumes that server has no daemontools yadda yadda installed.
Setup in a shell script, and run as root. (If you trust me.)
Note, mostly filched from here – http://hydra.geht.net/tino/howto/linux/djbdns/ (Thanks!)
mkdir -p /downloads cd /downloads wget http://cr.yp.to/djbdns/djbdns-1.05.tar.gz wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz # Unpack patches wget http://www.qmail.org/netqmail-1.05.tar.gz tar xfz netqmail-1.05.tar.gz # Compile the easy stuff rm -rf djbdns-1.05 tar xfz djbdns-1.05.tar.gz ( cd djbdns-1.05; patch < ../netqmail-1.05/other-patches/daemontools-0.76.errno.patch; ) ( cd djbdns-1.05; make; ) rm -rf ucspi-tcp-0.88 tar xfz ucspi-tcp-0.88.tar.gz patch -p0 < netqmail-1.05/other-patches/ucspi-tcp-0.88.errno.patch ( cd ucspi-tcp-0.88; make; ) # Install the easy stuff ( cd djbdns-1.05; make setup check; ) ( cd ucspi-tcp-0.88; make setup check; ) # Now compile and install daemontools. # As this is run from /sbin/init this must live in root / HERE="`pwd`" mkdir -p /package chmod 1755 /package cd /package rm -rf admin/daemontools-0.76 tar xfz "$HERE"/daemontools-0.76.tar.gz ( cd admin; patch -p0 <"$HERE"/netqmail-1.05/other-patches/daemontools-0.76.errno.patch; ) cd admin/daemontools-0.76 package/install # Restart init to let init execute svscanboot init q # Add the resolver groupadd dnscache useradd -g dnscache dnscache useradd -g dnscache dnslog /usr/local/bin/dnscache-conf dnscache dnslog /var/dnscache ln -s /var/dnscache /service svc -u /service/dnscache # Fix the nameservers to point to current ICANN structure # This assumes you have dig installed { echo "nameserver 127.0.0.1" cat /etc/resolv.conf } >/etc/resolv.conf.new mv --backup=t /etc/resolv.conf.new /etc/resolv.conf # Patch in the current list of root servers for a in a b c d e f g h i j k l m do dig +short $a.root-servers.net. done > /var/dnscache/root/servers/\@ svc -d /service/dnscache svc -u /service/dnscache
2 Comments to “Crib notes for setting up DJBDNS on Debian Lenny”
Post comment
Archives
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
Categories
- Apple
- Badges
- China Related
- Cool Hunting
- Exploits
- Food
- General Talk
- IP Cam
- iPhone
- MySQL
- Service Issues
- Tao Bao
- Technical Mumbo Jumbo
- Things that will get me censored
- Travel
- Uncategorized
- Useful Info
Most Popular Posts
- Samsung N310 (Samsung Go) Hackintosh Installation on Snow Leopard (20842)
- T60 screen upgrade (they just don't make things like they used to...) (9558)
- Hacker attacks on the rise (Its those damn American's mostly, attacking us poor Chinese users) (5987)
- CSR (Corporate Social Responsibility) (5158)
- How to make biltong (1685)
Tags
Apache
Apple
Apple Mail
arm7
biltong
china
china telecom
Chinese Spyware Removal Howto
coffee
cool
debian
dns
dvd
firmware
foscam
Google
hacking
how to
howto
icp
Image
ipcam
Kitto
lg dv340
licence
Mac
Moganshan
nc745
nuvoton
outage
Picture
problem
region free hack
Resize
Search Engine Optimization
SEO
shanghai
south africa
spam
taobao
Thoughts
Time Machine
Tuning
uclinux
video
Recent Comments
-
jocc: finally. I done the installation properly. I made a USB drive (at less 8GB) formatted wih GUID labelled...
-
Lawrence Sheed: It gets an ip address via DHCP, so you need to provide DHCP service on something like a router or...
-
Denis: I Can noit connected to cam after RESET! What is my ip by factory ?
-
Lawrence Sheed: Yes, you need to have had a license for at least one year. Thats correct. When I’m back...
-
Lawrence Sheed: First off, do a list of your partitions. in the boot loader – ls If you really have erased...



ICP Permit
Webmail
Newsletters
Support


















Lenny includes package djbdns (permitted by the license change).
You still have to manually create the group and users though.
And you don’t get the handy init scripts that djbdns-installer installed.
Package dbndns (DeBiaN DNS) is a fork that includes the IPv6 patch.
I’ve looked, but its not packaged as an easy replacement, it has other services and bit and bobs attached it wants to install, and those will fight with my existing setup.
My way is slightly harder, but infinitely more customizable for my needs, so I consider the extra 10 minutes spent worth it.
I usually build new servers every now and then with different methods just to see if I can improve.
Quite happy with my software choices though from a security and maintenance perspective. From an install perspective, not great, but not too onerous. Automation is the issue though, and I have been looking at solutions. eg Puppet, although also with the aim of giving myself a project with that for the experience.
Phew, long answer!