lost and found ( for me ? )

install NSD 3.2.15 on CentOS6



# cat /etc/centos-release
CentOS release 6.4 (Final)
# uname -ri
2.6.32-358.2.1.el6.x86_64 x86_64

install epel repo to install pdns via yum.
# rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm

# yum install nsd -y

# nsd -v
NSD version 3.2.15
Written by NLnet Labs.

Copyright (C) 2001-2011 NLnet Labs.  This is free software.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

/etc/nsd/nsd.conf
# egrep -v "#" nsd.conf | egrep -v ^$
server:
        ip6-only: no

        database: "/var/lib/nsd/nsd.db"
        server-count: 1
        zonesdir: "/etc/nsd"
zone:
       name: foo.com
       zonefile: foo.com.db

sotre zone file ( foo.com.db ) under /etc/nsd directory
# ls /etc/nsd/
foo.com.db  nsd.conf

start nsd
# /etc/init.d/nsd restart

# dig @127.1 www.foo.com +norec +short
127.0.0.1

restart nsd
# nsdc rebuild
zonec: reading zone "foo.com".
zonec: processed 4000 RRs in "foo.com".
global_region: 8053 objects (8052 small/1 large), 113920 bytes allocated (4087 wasted) in 28 chunks, 2030 cleanups, 0 in recyclebin
db->region: 4076 objects (4076 small/0 large), 273624 bytes allocated (5129 wasted) in 67 chunks, 66 cleanups, 1056 in recyclebin 0 66 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

zonec: done with no errors.

To serve multiple zones , add zones like this:

nsd.conf
zone:
       name: "foo.com"
       zonefile: "foo.com.db"

       name: "bar.com"
       zonefile: "bar.com.db"

# /etc/init.d/nsd restart

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.