文档详情

《Redhat5 配置DNS服务器详解》.pdf

发布:2015-12-30约7.04千字共20页下载文档
文本预览下载声明
Redhat5 下配置DNS 服务器详解 (1).安装bind 需要的原件 bind-9.3.4-6.P1.el5.i386.rpm bind-libbind-devel-9.3.4-6.P1.el5.i386.rpm bind-sdb-9.3.4-6.P1.el5.i386.rpm bind-devel-9.3.4-6.P1.el5.i386.rpm caching-nameserver-9.3.4-6.P1.el5.i386.rpm bind-chroot-9.3.4-6.P1.el5.i386.rpm (这个要最后安装) (2).本机的相关配置 设置静态IP,设置防火墙,DNS,主机名 在终端里面输入setup,如下图: 如上步骤设置静态ip 为:6 这就是DNS 服务器的ip, 接下来要配置防火墙: 选中定制并进入:其它端口里输入:53:tcp 53:udp 输完后会变成 domain:tcp doman:udp 这一步是开放DNS 端口,53 号端口 修改主机名,也可以不修改,修改了便于管理和记忆: [root@localhost ~]# vi /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no HOSTNAME= (修改后保存退出) [root@localhost ~]# cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. redhat5 ::1 localhost6.localdomain6 localhost6 (修改后保存退出) 修改后的主机名为:redhat5 域名为: 这些可以按自己的需 要随便设置。 设置DNS 服务器为本机: [root@redhat5 ~]# vi /etc/resolv.conf nameserver 6 nameserver 5 (保存修改后退出) 主服务器的IP 为6,要确保是本机IP 地址 5 为从DNS 服务器,可以不要的。 (3).配置DNS 服务器主文件、区域文件、正向和反向区域文件 Red Hat Enterprise 由于安装了bind-chroot-9.3.4-6.P1.el5.i386.rpm 包, 所有的配置文件在/var/named/chroot 这个目录里面的子目录: 主配置文件放在在目录的etc 目录里面;区域文件放在var/named 目 录里面: 修改DNS 主配置文件 etc 目录下复制named.caching-nameserver.conf 并命名为named.conf [root@redhat5 etc]#cp -p named.caching-nameserver.conf named.conf 修改named.conf 文件: // // named.caching-nameserver.conf // // Provided by Red Hat caching-nameserver package to configure the // ISC BIND named(8) DNS server as a caching only nameserver // (as a localhost DNS resolver only). // // See /usr/share/doc/bind*/sample/ for example named configuration files. // // DO NOT EDIT THIS FILE - use system-config-bind or an editor // to create named.conf - edits to this file will be lost on // caching-nameserver package upgrade. // optio
显示全部
相似文档