域名行业新闻 域名应用/周边 抢注/争议报道 成功交易报道 拍卖叫价新闻 域名时事评析 域名商家动态 域名人物档案
返回首页

Linux: Create Your Own Domain Name Server (DNS)(3)

时间:2007-12-03 03:39   来源:Linux Today
# dig @localhost +short MX example.com 10 mail.example.com. # dig @localhost +short NS example.com ns2.example.com. ns1.example.com. # dig @localhost +short mail.example.com 192.168.1.4 # dig @localho


# dig @localhost +short MX example.com
10 mail.example.com.


# dig @localhost +short NS example.com
ns2.example.com.
ns1.example.com.


# dig @localhost +short mail.example.com
192.168.1.4


# dig @localhost +short ns1.example.com
192.168.1.2


# dig @localhost +short ns2.example.com
192.168.1.3


# dig @localhost +short -x 192.168.1.1
example.com.


# dig @localhost +short -x 192.168.1.2
ns1.example.com.


# dig @localhost +short -x 192.168.1.3
ns2.example.com.


# dig @localhost +short -x 192.168.1.4
mail.example.com.


Configuring the Slave Nameserver

Configuring the slave nameserver is fairly simple once you have your master nameserver set up correctly.


/var/named/chroot/etc/named.confDownload This File

options{
        directory       "/var/named/";
};
 
zone "example.com" IN {
        type    slave;
        masters { 192.168.1.2; };
        file    "slaves/example.com.zone";
};
As you can see all we did was set up our example.com zone as type slave and pointed to the master server and where we want to store the zone files (we don’t manually create them).



Now start the service and make sure it comes up on a reboot.

# service named start
# chkconfig named on



Soon you will see the zone file(s) created in /var/named/chroot/var/named/slaves/.
If they do not you can check your /var/log/messages file for errors.

责任编辑:米尊 

顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------


推荐内容
  • Domain name disputes

    Disputes involving domain names happen everyday, including ones involving .vn dom...

赞助商广告