Ubuntu 关于DNS Server的安装及配置简单笔记

我一直以为DNS的软件应该是包含dns这三个字母的软件。。。。没有想到竟然是bind。。。孤陋寡闻了。。。
安装,很简单。貌似Ubuntu安装什么东东都很简单。。。呵呵
sudo apt-get install bind9    #ubuntu 8.10 是bind9,别的不确定。你可以键入到bind时候按tab,会有提示的。

下面添加一个fss的域名。。。
1.在/etc/bind/named.conf.local中添加记录
sudo gedit /etc/bind/named.conf.local

zone "fss" {
    type master;
    file "/etc/bind/db.fss";
};

这里有一个file "/etc/bind/db.fss",是fss域名的详细配置。也有说放入/var/cache/bind目录中。其实无所谓了,我是小东东,随便一个地方放一下就OK了。。呵呵

既然要用到他,就把这个文件建立好吧。

sudo gedit /etc/bind/db.fss

输入以下的内容:

$TTL    604800
@    IN    SOA    localhost. root.localhost. (
                  2        ; Serial
             604800        ; Refresh
              86400        ; Retry
            2419200        ; Expire
             604800 )    ; Negative Cache TTL
;
@    IN    NS    localhost.
pc11      IN      A     192.123.1.194
pc115      IN      A     192.123.1.115

不要问我为什么。。。我也不懂。。。呵呵,照葫芦画瓢。。。

PS:修改完配置后,服务器要重新起动bind生效,客户端也要更新DNS才行。像XP的修复网络连接



原文地址:https://www.cnblogs.com/shengshuai/p/1400416.html