linux RedHat as5 下DNS安装于配置
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-05-01
*****************DNS安装*******************
[root@yan ~]# mount /dev/cdrom /media/ --加在光盘 mount: block device /dev/cdrom is write-protected, mounting read-only [root@yan Server]# rpm -ivh bind-9.3.3-10.el5.i386.rpm [root@yan Server]# rpm -ivh bind-libs-9.3.3-10.el5.i386.rpm [root@yan Server]# rpm -ivh bind-libbind-devel-9.3.3-10.el5.i386.rpm [root@yan Server]# rpm -ivh bind-utils-9.3.3-10.el5.i386.rpm [root@yan Server]# rpm -ivh bind-devel-9.3.3-10.el5.i386.rpm [root@yan Server]# rpm -ivh caching-nameserver-9.3.3-10.el5.i386.rpm [root@yan Server]# rpm -ivh bind-sdb-9.3.3-10.el5.i386.rpm [root@yan Server]# rpm -ivh bind-chroot-9.3.3-10.el5.i386.rpm *****************DNS配置******************* 本机ip为192.168.10.100 @@@@@@@@@@@@@@@@@一个ip对应一个域名@@@@@@@@ 如www.yan.com对应ip为192.168.10.101 指定本机DNS解析服务器为自己 [root@yan named]# vi /etc/resolv.conf nameserver 192.168.10.100 修改主配置文件 [root@yan /]# vi /var/named/chroot/etc/named.caching-nameserver.conf options { listen-on port 53 { any; }; //改为any listen-on-v6 port 53 { ::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"; query-source port 53; query-source-v6 port 53; allow-query { any; }; //改为any }; logging { channel default_debug { file "data/named.run"; severity dynamic; }; }; view localhost_resolver { match-clients { any; }; //改为any match-destinations { any; }; //改为any recursion yes; include "/etc/named.rfc1912.zones"; } 修改域配置文件 [root@yan /]# vi /var/named/chroot/etc/named.rfc1912.zones--加入两条记录 zone "yan.com" IN { //正向记录 type master; file "yan.com"; allow-update { none;}; }; zone "10.168.192.in-addr.arpa" IN { //反向记录 type master; file "yan.com1"; allow-update { none;}; }; 创建正反向域配置文件 [root@yan /]# cd /var/named/chroot/var/named/ [root@yan named]# cp localhost.zone yan.com [root@yan named]# cp named.local yan.com1 [root@yan named]# vi yan.com $TTL 86400 @ IN SOA @ root ( 42 ; serial (d. adams) 3H ; refresh 15M ; retry 1W ; expiry 1D ) ; minimum IN NS @ www IN A 192.168.10.101 yan.com. IN MX 10 www.yan.com. [root@yan named]# vi yan.com1 $TTL 86400 @ IN SOA www.yan.com. root.www.yan.com. ( 1997022700 ; Serial 28800 ; Refresh 14400 |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于linux RedHat as5 下DNS安装于配置的所有评论