标签 ‘OpenDNS’ 归档文章

安装 djbdns DNS 缓冲服务器

A DNS recursor consults three nameservers to r...
Image via Wikipedia

服务器使用 OpenDNS 的时候解析有些网站比较慢,想到用 DNS 缓冲服务。自然就想到了 djbdns 。

首先安装 djbdns。需要先安装 daemontoolsucspi-tcp

在 RHEL 上编译以上三个软件包时,必须先运行

echo gcc -O2 -include /usr/include/errno.h > conf-cc

然后配置为内部转发服务器。

echo 208.67.222.222 > /etc/dnscache/root/servers/@
echo 1 > /etc/dnscache/env/FORWARDONLY

查看服务状态:
     svstat /service/dnscache

查看 DNS 日志:
tail -f /service/dnscache/log/main/current

启停服务:
  • svc -h /service/yourdaemon: sends HUP
  • svc -t /service/yourdaemon: sends TERM, and automatically restarts the daemon after it dies
  • svc -d /service/yourdaemon: sends TERM, and leaves the service down
  • svc -u /service/yourdaemon: brings the service back up
  • svc -o /service/yourdaemon: runs the service once

Reblog this post [with Zemanta]
Google+