您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 销售管理 > RHEL5_DNS服务器配置详解
RHEL5DNS服务器配置详解RHEL5DNS服务器配置详解DNS主机的设置前准备Master-------192.168.1.102-------linux.online.com(FQDN)Slave-------192.168.1.105-------slave.online.com(FQDN)客户端测试---192.168.1.108-------abc注意:DNS主机的IP地址必须为静态IP更改主机名(FQDN):Master:Hostnamelinux.online.com在/etc/hosts配置文件中增加192.168.1.102linux.online.com在/etc/sysconfig/network配置文中增加192.168.1.102=linux.online.comSlave:Hostnameslave.online.com在/etc/hosts配置文件中增加192.168.1.105slave.online.com在/etc/sysconfig/network配置文中增加192.168.1.102=slave.online.com架设DNS所需要的软件:bind-utils-9.3.3-7.el5=========客户端搜索主机名称的相关指令bind-9.3.3-7.el5=========DNS服务器主程序bind-chroot-9.3.3-7.el5========bind主程序笼环境bind-libs-9.3.3-7.el5========DNS库文件caching-nameserver-9.3.3-7.el5.i386.rpm========配置文件模板设置DNS配置文件:Master设置RHEL5中的DNS配置文件分为options和Zone二部份OPTIONSVi/etc/named.caching-nameserver////为注释//named.caching-nameserver.conf////ProvidedbyRedHatcaching-nameserverpackagetoconfigurethe//ISCBINDnamed(8)DNSserverasacachingonlynameserver//(asalocalhostDNSresolveronly).////See/usr/share/doc/bind*/sample/forexamplenamedconfigurationfiles.////DONOTEDITTHISFILE-usesystem-config-bindoraneditor//tocreatenamed.conf-editstothisfilewillbeloston//caching-nameserverpackageupgrade.//options{//listen-onport53{127.0.0.1;};//listen-on-v6port53{::1;};directory/var/named;//ZoneFile放置的目录dump-file/var/named/data/cache_dump.db;//缓存文件存放区statistics-file/var/named/data/named_stats.txt;//DNS统计数据存放点memstatistics-file/var/named/data/named_mem_stats.txt;query-sourceport53;//源端口//query-source-v6port53;allow-query{any;};//是否允许客户端的查询(此处为允许任何客户端查询)};logging{channeldefault_debug{filedata/named.run;severitydynamic;};};viewlocalhost_resolver{//match-clients{localhost;};match-destinations{localhost;};recursionyes;include/etc/named.rfc1912.zones;};Zone配置Vi/etc/named.rfc1912//named.rfc1912.zones:////ProvidedbyRedHatcaching-nameserverpackage////ISCBINDnamedzoneconfigurationforzonesrecommendedby//RFC1912section4.1:localhostTLDsandaddresszones////See/usr/share/doc/bind*/sample/forexamplenamedconfigurationfiles.//zone.IN{typehint;filenamed.ca;//根域部份(不用修改)};zoneonline.comIN{typemaster;filenamed.online.com;//online.com正解文件allow-update{none;};allow-transfer{192.168.1.105;};//online.com正解部份};zone1.168.192.in-addr.arpaIN{typemaster;filenamed.192.168.1;//online.com反解文件allow-update{none;};allow-transfer{192.168.1.105;};//online.com反解部份};online.com正解部份配置vi/var/named/chroot/var/named/named.online.com$TTL600@INSOAlinux.online.com.root.linux(2008081501;Serial:更新序列号28800;RefreshSlave:服务器更新时间14400;Retry:当Slave主机更新失败,多久再重新更新一次720000;Expire:重复Retry多久后就宣告失败,不再更新86400);Minimum:可视为TTL,尤其是您没有设置$TTL时@INNSlinux.online.com.//MasterDNS主机名@INNSslave.online.com.//SlaveDNS主机名linuxINA192.168.1.102//MasterDNS主机名正向解析slaveINA192.168.1.105//SlaveDNS主机名正向解析online.com反解部份配置vi/var/named/chroot/var/named/named.192.168.1$TTL600@INSOAlinux.online.com.root.linux(2008081501288001440072000086400)@INNSlinux.online.com.@INNSslave.online.com.102INPTRlinux.online.com.//MasterDNS主机名反向解析105INPTRslave.online.com.//SlaveDNS主机名反向解析最后修改/etc/resolv.conf,增加以下内容:Nameserver192.168.1.102Nameserver192.168.1.105到此Master的设置已完成Slave配置基本上SlaveDNS的配置文件与MasterDNS一模一样,唯一不同的地方在于Zone的类型(TYPE)不同zoneonline.comIN{typeslave;//此处改为Slave;filenamed.online.com;masters{192.168.1.102;};//更新DNS用到,注意masters中多了一个S};zone1.168.192.in-addr.arpaINtypeslave;//此处改为Slave;filenamed.192.168.1;masters{192.168.1.102;};//更新DNS用到,注意masters中多了一个Sallow-update{none;};};最后修改/etc/resolv.conf,增加以下内容:Nameserver192.168.1.102Nameserver192.168.1.105Slave配置完成客户端测试:客户端作如下修改:修改/etc/resolv.conf,增加以下内容:Nameserver192.168.1.102Nameserver192.168.1.105测试Nslookup192.168.1.102Nslookup192.168.1.105Nslookup是否解析成功;Linux下的dnsnamed.conf改变named.caching-nameserver.conf和named.rfc1912.zones默认分类2009-07-2817:41:06阅读181评论0字号:大中小订阅1.在系统安装过程中,将DNS服务选项选中,系统中将会安装好Bind安装包。-------------------------------------------------------------------------------------------------------------------------------------2.系统安装完成后,用:rpm–qa|grepbind命令检验Bind的安装情况,正常情况下会有如下安装包:ypbind-1.19-8.el5bind-9.3.4-6.P1.el5bind-chroot-9.3.4-6.P1.el5bind-libs-9.3.4-6.P1.el5bind-utils-9.3.4-6.P1.el5-------------------------------------------------------------------------------------------------------------------------------------3.看到如上安装包时,named服务是不会运行的,此时还要安装caching-nameserver-9.3.3-7.el5.i386.rpm(安装文件在附件中)安装方法:#yuminstallcaching-nameserver-9.3.4-6.P1.el5.i386.rpm提示安装完成后,查看,正常情况会有如下安装包:#rpm-qa|grepcachingcaching-nameserver-9.3.4-6.P1.el5安装成功-------------------------------------------------------------------------------------------------------------------------------------4.启动named服务:#servicenamedstart-------------------------------------------------------------------------------------------------------------------------------------5.查看系统进程:#ps-aux|grepnamedWarning:badsyntax,perhapsabogus'-'?See/usr/share/doc/procps-3.2.7/FAQnamed116150.50.3383162980?Ssl16:480:00/usr/sbin/named-unamed-c/etc/named.caching-nameserver.conf-t/var/named/chrootroot116250.00.03928668pts/2R+16:490:00grepnamed-------------
本文标题:RHEL5_DNS服务器配置详解
链接地址:https://www.777doc.com/doc-4994541 .html