|
如题
这几天崩溃了,不管是源码安装还是yum 还是rpm安装,配置后的结果都是一样
以下是我采用yum的配置方法.
1. yum install bind*
2. yum install caching-nameserver
3. cp /usr/share/doc/sample/bind-9.../named.conf /etc/named.conf
vi /etc/named.conf 添加以下
options
{
listen-on port 53 { any; };
listen-on -v6 port 53 { ::1; };
directory "/var/named"; // the default
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; };
};
view "localhost_resolver"
{
match-clients { any; };
match-destinations { any; };
recursion yes;
# all views must contain the root hints zone:
include "/etc/named.root.hints"; //请问高手们,这个文件在哪里??
/* these are zones that contain definitions for all the localhost
* names and addresses, as recommended in RFC1912 - these names should
* ONLY be served to localhost clients:
*/
include "/etc/named.rfc1912.zones";
};
4. cp /usr/share/doc/sample/bind-9.../named.rfc1912.zones /etc/named.rfc1912.zones 在这个文件里添加
zone "xm.com" IN {
type master;
file "xm.com.zone";
};
5. cd /var/named/chroot/var/named/
cp /var/named/chroot/var/named/localhost.zone test.com.zone && vi test.com.zone
$TTL 86400
@ IN SOA a.xm.com. root@xm.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS a.xm.com.
a IN A 192.168.1.170
www IN CNAME a.xm.com.
6. 修改/etc/resolv.conf
nameserver 192.168.1.170
到测试了
# nslookup
> server
Default server: 192.168.1.170
Address: 192.168.1.170#53
> a.xm.com
;; connection timed out; no servers could be reached //注:源码安装也是这样.
看看端口
# netstat -antpl | grep named
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 3731/named
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 3731/named
tcp 0 0 ::1:53 :::* LISTEN 3731/named
tcp 0 0 ::1:953 :::* LISTEN 3731/named
各们大虾们,请问上面配置哪里有出错,还望指点。在线等了。 |
|