Installing TinyDNS on CentOS 5.5

來源:互聯網
上載者:User

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.