共计 2824 个字符,预计需要花费 8 分钟才能阅读完成。
RHEL 6.4 安装 DNS 服务(bind-9.8)
首先安装 yum,使用 yum 安装 bind
yum install bind*
不同的操作系统 rpm 包有可能会不同
bind-9.8.2-0.17.rc1.el6.x86_64
bind-utils-9.8.2-0.17.rc1.el6.x86_64
bind-chroot-9.8.2-0.17.rc1.el6.x86_64
bind-dyndb-ldap-2.3-2.el6.x86_64
bind-libs-9.8.2-0.17.rc1.el6.x86_64
几个 rpm 包安装之后,编辑 named.conf
vim /etc/named.conf
options {
listen-on port 53 {127.0.0.1;};
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”;
allow-query {localhost;};
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file “/etc/named.iscdlv.key”;
managed-keys-directory “/var/named/dynamic”;
};
logging {
channel default_debug {
file “data/named.run”;
severity dynamic;
};
};
zone “.” IN {
type hint;
file “named.ca”;
};
; 此处为自定义的域名
zone “linuxidc.com” IN {
type master;
file “named.linuxidc.com”;
};
zone “1.168.192.in-addr.arpa” IN {
type master;
file “named.192.168.1”;
};
include “/etc/named.rfc1912.zones”;
include “/etc/named.root.key”;
:wq 保存退出
cd /var/named/
vim named.linuxidc.com
$TTL 3600
@ IN SOA demo.linuxidc.com. root.linuxidc.com. (
2014102401
1H
5M
1W
1D )
@ IN NS demo.linuxidc.com.
@ IN MX 10 mail.linuxidc.com.
mail IN A 192.168.123.200
demo IN A 192.168.123.200
www IN A 192.168.123.200
ftp IN CNAME demo.linuxidc.com.
:wq
vim named.192.168.1
$TTL 3600
@ IN SOA demo.linuxidc.com. root.linuxidc.com. (
2014102402
1H
5M
1w
1D )
@ IN NS demo.linuxidc.com.
200 IN PTR demo.linuxidc.com.
200 IN PTR mail.linuxidc.com.
200 IN PTR www.linuxidc.com.
200 IN PTR ftp.linuxidc.com.
service named restart 重启 DNS 服务
Stopping named: [OK]
Starting named: [OK]
DNS 服务已经正常启动。。。。。。。。。。。。。。。。。。。。。。。。。。
验证 DNS 服务:
[root@demo named]# nslookup
> linuxidc.com
————————————– 分割线 ————————————–
CentOS 下源码安装 Bind 9.6.1 搭建 DNS 服务器 http://www.linuxidc.com/Linux/2014-06/103660.htm
使用 BIND 配置 DNS 服务器 — 初级篇 http://www.linuxidc.com/Linux/2013-05/84920.htm
BIND+DLZ+MySQL 智能 DNS 的正向解析和反向解析实现方法 http://www.linuxidc.com/Linux/2013-04/82527.htm
域名服务 BIND 构建与应用配置 http://www.linuxidc.com/Linux/2013-04/82111.htm
Ubuntu BIND9 泛域名解析配置 http://www.linuxidc.com/Linux/2013-03/81928.htm
CentOS 5.2 下安装 BIND9.6 http://www.linuxidc.com/Linux/2013-02/79889.htm
DNS 服务器配置图文详解 http://www.linuxidc.com/Linux/2012-10/72728.htm
————————————– 分割线 ————————————–
更多 RedHat 相关信息见 RedHat 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=10