|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
小知识:Linux可安装在各种计算机硬件设备中,比如手机、平板电脑、路由器、视频游戏控制台、台式计算机、大型机和超级计算机。
[root@wwwnamed]yum-yinstallbind//晋级安装的包
[root@wwwnamed]#vim/etc/named.conf
//
//named.conf
//
//ProvidedbyRedHatbindpackagetoconfiguretheISCBINDnamed(8)DNS
//serverasacachingonlynameserver(asalocalhostDNSresolveronly).
//
//See/usr/share/doc/bind*/sample/forexamplenamedconfigurationfiles.
//
options{
listen-onport53{any;};//改成any
//listen-on-v6port53{::1;};//刊出这行
directory"/var/named";
dump-file"/var/named/data/cache_dump.db";
statistics-file"/var/named/data/named_stats.txt";
memstatistics-file"/var/named/data/named_mem_stats.txt";
allow-query{any;};//改成any
recursionyes;
dnssec-enableyes;
dnssec-validationyes;
dnssec-lookasideauto;
/*PathtoISCDLVkey*/
bindkeys-file"/etc/named.iscdlv.key";
};
logging{
channeldefault_debug{
file"data/named.run";
severitydynamic;
};
};
zone"."IN{
typehint;
file"named.ca";
};
include"/etc/named.rfc1912.zones";
=========================================================
==================================
[root@wwwnamed]#vim/etc/named.rfc1912.zones//增加正反向地区
//named.rfc1912.zones:
//
//ProvidedbyRedHatcaching-nameserverpackage
//
//ISCBINDnamedzoneconfigurationforzonesrecommendedby
//RFC1912section4.1:localhostTLDsandaddresszones
//andhttp://www.ietf.org/internet-drafts/draft-ietf-dnsop-default-local-zones-02.txt
//(c)2007RWFranks
//
//See/usr/share/doc/bind*/sample/forexamplenamedconfigurationfiles.
//
zone"localhost.localdomain"IN{
typemaster;
file"named.localhost";
allow-update{none;};
};
zone"localhost"IN{
typemaster;
file"named.localhost";
allow-update{none;};
};
//刊出蓝色这几行
//zone"1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa"IN{
//typemaster;
//file"named.loopback";
//allow-update{none;};
//};
//zone"1.0.0.127.in-addr.arpa"IN{
//typemaster;
//file"named.loopback";
//allow-update{none;};
//};//刊出这几行
zone"0.in-addr.arpa"IN{
typemaster;
file"named.empty";
allow-update{none;};
};
//增加正反向
zone"linuxidc.com"IN{
typemaster;
file"linuxidc.com.zone";
};
zone"1.168.192.in-addr.arpa"IN{
typemaster;
file"1.168.192.zone";
};
===========================================================================================
[root@wwwnamed]#pwd
/var/named/chroot/var/named
[root@wwwnamed]#
[root@wwwnamed]#touchlinuxidc.com.zone(创立正向数据文件)
[root@wwwnamed]#touch1.168.192.zone(创立反向数据文件)
[root@wwwnamed]#vimlinuxidc.com.zone
===========================================================================================
$TTL86400
@INSOAns.linuxidc.com.root.linuxidc.com.(
42;serial(d.adams)
3H;refresh
15M;retry
1W;expiry
1D);minimum
@INNSns.linuxidc.com.
nsINA192.168.1.8
wwwINA192.168.1.8
===========================================================================================
[root@wwwnamed]#vim1.168.192.zone
===========================================================================================
$TTL86400
@INSOAns.linuxidc.com.root.linuxidc.com.(
1997022700;Serial
28800;Refresh
14400;Retry
3600000;Expire
86400);Minimum
@INNSns.linuxidc.com.
8INPTRns.linuxidc.com.
8INPTRwww.ckuyun.com.
本篇文章来历于Linux公社网站原文链接:http://www.ckuyun.com/Linux/2012-08/67145.htm
小知识:CentOS从来就不是一个人的独角戏,也许CentOS会有分叉或名称变更的危险,但决不能说它接近死亡。 |
|