Installing TinyDNS on CentOS 5.5

Requirements of TinyDNS

Copied with permission from the author. Original site is at http://www.djbdnsrocks.org

1) At least 2 unused IP addresses. 1 is usually fine.
2) Daemontools - This was installed if you did my qmail install. If not, please install that step!
3) UCSPI-TCP - This was also installed if you did my qmail install. If not, please install that step too!
4) You will want ports 22 (SSH) and 53 (DNS) open. If you don't want anyone outside of your network using your DNS server (Personally, I don't pass this port either) don't forward port 53.


That is about it. When all those requirements have been met, You can now continue.

Installing TinyDNS

The first step is to install the daemon-tools:

 

# cd /opt

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

# gunzip daemontools-0.76.tar

# tar -xpf daemontools-0.76.tar

# rm -f daemontools-0.76.tar

# cd admin/daemontools-0.76

# vi src/conf-cc

Append the following line at the end of the gcc line: -include /usr/include/errno.h

 

# ./package/install


One other package we need to prepare for djbdns to be functional is ucspi:

# cd /opt

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

# gunzip ucspi-tcp-0.88.tar

# tar -xf ucspi-tcp-0.88.tar

# cd ucspi-tcp-0.88

# vi src/conf-cc


Append the following line at the end of the gcc line: -include /usr/include/errno.h

# make

# make setup check

 

The next step is the document publication:

# cd /opt

# wget http://cr.yp.to/djbdns/doc.tar.gz

Next we will unzip docs under /doc :

# gunzip < doc.tar.gz | (cd /; tar -xf -)

 

Use the following script to merge in system docs:

#!/bin/sh

for i in packages commands cfunctions fileformats

do

     sort -f /dev/null `find /doc/merge -name $i.html` > /doc/$i.new

     mv /doc/$i.new /doc/$i.html

done

 

Save script into a file: script.sh

# chmod +x script.sh

# ./script.sh

 

# cd /opt

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

# gunzip djbdns-1.05.tar

# tar -xf djbdns-1.05.tar

# cd djbdns-1.05

# vi src/conf-cc

Append the following line at the end of the gcc line: -include /usr/include/errno.h

# make

# make setup check

 

All compiling gets done.

The next step is the dns server configuration.

 

Configuring TinyDNS


We need two system user accounts:

#groupadd -g 200 nofiles
#useradd -g nofiles -u 201 -d /var/dnscache -c "tinydns" -s /sbin/nologin tinydns
#useradd -g nofiles -u 202 -d /var/dnscache -c "tinydns" -s /sbin/nologin tinylog

#tinydns-conf tinydns tinylog /var/tinydns <listened IP>

 

Starting TinyDNS


Now start the service with the following command:
#ln -sf /var/tinydns /service

 

You can verify it is running by typing:
#svstat /service/tinydns

 

Configuring TinyDNS


Once again, we need two system user accounts:

#useradd -g nofiles -u 203 -d /var/dnscache -c "axfrdns" -s /sbin/nologin axfrdns
#useradd -g nofiles -u 204 -d /var/dnscache -c "axfrdns" -s /sbin/nologin axfrlog
#axfrdns-conf axfrdns axfrlog /var/axfrdns /var/tinydns <listened IP>

Starting axfrDNS

Now start the service with the following command:

#ln -sf /var/axfrdns /service

You can verify it is running by typing:
#svstat /service/axfrdns

 

Stop TinyDNS & axfrDNS

svc -d /service/tinydns

svc -d /service/axfrdns

 

Start TinyDNS & axfrDNS

svc -u /service/tinydns

svc -u /service/axfrdns

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值