LINUX DNS服务的配置(一)

DNS(Domain Name System)作用管理主机的 “户籍”—主机名:IP 是一个分布式数据库系统,DNS服务器的起源,最 早的主机解析,依靠hosts文件,有NIC(Network Information Center)维护,后来主机数量变得非常庞大,网络越来越复杂,就产生了DNS服务器。DNS服务器:提供域名解析服务的主机。DNS客户机:需要查询主机域名信息的主机,任何联网的主机都需要查询域名,所以任意主机都是DNS客户机。DNS客户机需要知道DNS服务器在那里,linux靠/etc/resolv.conf制定。正向解析:根据主机名称解析IP地 址。反向解析:根据IP地址解析主机名称。Linux与windows搭建DNS服务器,原理都是一致的。

DNS服 务器配置大致分为三种:(1)主DNS服务 器。(2)辅DNS服务器。(3)缓存DNS服务器。DNS系统的结构650) this.width=650;” onclick=’window.open(“http://blog.51cto.com/viewpic.php?refimg=” + this.src)’ border=”0″ src=”http://cdn.verydemo.com/upload/2013_04_03/13649581888410.jpg” alt=”” onclick=”window.open("http://blog.51cto.com/viewpic.php?refimg=" +”http://blog.51cto.com/viewpic.php?refimg=” + this.src)” />DNS查询的的工作原理650) this.width=650;” onclick=’window.open(“http://blog.51cto.com/viewpic.php?refimg=” + this.src)’ border=”0″ src=”http://cdn.verydemo.com/upload/2013_04_03/13649581889821.jpg” alt=”” onclick=”window.open("http://blog.51cto.com/viewpic.php?refimg=" +”http://blog.51cto.com/viewpic.php?refimg=” + this.src)” />如果在chen.com域中直接查询www.chen.com,查询结果将直接输出。如果在www.isc.org服务器查找www.chen.com ,对于一个毫不相关的www.chen.com DNS服务名称,首先将客服端请求发送到根域,再查到二级域.com,最后查询到管www.chen.com 的域名chen.com.,在由chen.com查找是否有注册的www.chen.com,最后将结果返回到www.isc.org 服务器再输出客户端。650) this.width=650;” onclick=’window.open(“http://blog.51cto.com/viewpic.php?refimg=” + this.src)’ border=”0″ src=”http://cdn.verydemo.com/upload/2013_04_03/13649581891232.jpg” alt=”” onclick=”window.open("http://blog.51cto.com/viewpic.php?refimg=" +”http://blog.51cto.com/viewpic.php?refimg=” + this.src)” />可以到官方网站:http://www.isc.org,下载最新bind软件包bind-9.7.0-P1.tar.gz[root@localhost root]#cd /mnt/hgfs/share//切换到共享目录/mnt/hgfs/share[root@localhost share]#ls//显示目录的内容[root@localhost share]#cp bind-9.7.0-P1.tar.gz /usr/local//拷贝文件bind-9.7.0-P1.tar.gz文件到/usr/local目录下[root@localhost local]#cd /usr/local//切换到/usr/local[root@localhost local]#tar –zxvf bind-9.7.0-P1.tar.gz//解压bind-9.7.0-P1.tar.gz安装包650) this.width=650;” onclick=’window.open(“http://blog.51cto.com/viewpic.php?refimg=” + this.src)’ border=”0″ src=”http://cdn.verydemo.com/upload/2013_04_03/13649581892633.jpg” alt=”” onclick=”window.open("http://blog.51cto.com/viewpic.php?refimg=" +”http://blog.51cto.com/viewpic.php?refimg=” + this.src)” />[root@localhost local]# cd bind-9.7.0-P1//切换到解压生成的bind-9.7.0-P1目录[root@localhost bind-9.7.0-P1]# ls//显示目录文件内容[root@localhost bind-9.7.0-P1]# ./configure –help|more//用configure查询编译所有的头文件和库文件,帮助加管道显示更多的650) this.width=650;” onclick=’window.open(“http://blog.51cto.com/viewpic.php?refimg=” + this.src)’ border=”0″ src=”http://cdn.verydemo.com/upload/2013_04_03/13649581894044.jpg” alt=”” onclick=”window.open("http://blog.51cto.com/viewpic.php?refimg=" +”http://blog.51cto.com/viewpic.php?refimg=” + this.src)” />[root@localhost bind-9.7.0-P1]# ./configure –sysconfdir=/etc检查编译代码所需的各种头文件和库文件是否存在。并指定主配置文件默认安装在/etc目录,并生成Makefile文件650) this.width=650;” onclick=’window.open(“http://blog.51cto.com/viewpic.php?refimg=” + this.src)’ border=”0″ src=”http://cdn.verydemo.com/upload/2013_04_03/13649581895455.jpg” alt=”” onclick=”window.open("http://blog.51cto.com/viewpic.php?refimg=" +”http://blog.51cto.com/viewpic.php?refimg=” + this.src)” />[root@localhost bind-9.7.0-P1]# make//编译源代码650) this.width=650;” onclick=’window.open(“http://blog.51cto.com/viewpic.php?refimg=” + this.src)’ border=”0″ src=”http://cdn.verydemo.com/upload/2013_04_03/13649581896856.jpg” alt=”” onclick=”window.open("http://blog.51cto.com/viewpic.php?refimg=" +”http://blog.51cto.com/viewpic.php?refimg=” + this.src)” />[root@localhost bind-9.7.0-P1]# make install//安装bind软件包650) this.width=650;” onclick=’window.open(“http://blog.51cto.com/viewpic.php?refimg=” + this.src)’ border=”0″ src=”http://cdn.verydemo.com/upload/2013_04_03/13649581898267.jpg” alt=”” onclick=”window.open("http://blog.51cto.com/viewpic.php?refimg=" +”http://blog.51cto.com/viewpic.php?refimg=” + this.src)” />[root@localhost bind-9.7.0-P1]# ls /usr/local/bin//显示安装bind软件时生成的dig \host\nslookup检测dns工具[root@localhost bind-9.7.0-P1]# ls /usr/local/sbin//管理员用的管理工具rndc\named,可以直接输入named命令来启动服务,用rndc控制服务器,用rndc-configen>/etc/rndc.conf导出文件650) this.width=650;” onclick=’window.open(“http://blog.51cto.com/viewpic.php?refimg=” + this.src)’ border=”0″ src=”http://cdn.verydemo.com/upload/2013_04_03/13649581899668.jpg” alt=”” onclick=”window.open("http://blog.51cto.com/viewpic.php?refimg=" +”http://blog.51cto.com/viewpic.php?refimg=” + this.src)” />如果安装caching-nameserver-7.2-7.noarch.rpm,生成一个named.conf主配置文件模板.caching-nameserver-7.2-7.noarch.rpm在red hat linux 9.0第二个镜像盘。[root@localhost root]# mount /dev/cdrom /mnt/cdrom//挂在设备光盘到/mnt/cdrom目录中mount: block device /dev/cdrom is write-protected, mounting read-only//mount命令挂载块设备光盘有写 保护;mounting挂载只能用读的权限[root@localhost root]# cd /mnt/cdrom/RedHat/RPMS////切换到安装包的目录/mnt/cdrom/RedHat/RPMS/[root@localhost RPMS]# rpm -ivh caching-nameserver-7.2-7.noarch.rpm//安装caching-nameserver-7.2-7.noarch.rpm软件包,在/etc/目录生成一个named.conf模板配置文件。如果不想安装可以自己建一个named.conf主配置文件 还未写完。。。

本 文出自 “嵌入式技术–TOP-E

而不去欣赏今天就开在我们窗口的玫瑰。

LINUX DNS服务的配置(一)

相关文章:

你感兴趣的文章:

标签云: