DNS SERVER 9.3.6 CONFIGURATION ON LINUX 5.5
[root@server ~]# hostname
server.debashis.edu
[root@server ~]# yum install bind*
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Package 30:bind-libs-9.3.6-4.P1.el5_4.2.i386
already installed and latest version
Package 30:bind-utils-9.3.6-4.P1.el5_4.2.i386
already installed and latest version
No package chaching-nameserver available.
Resolving Dependencies
--> Running transaction check
---> Package bind.i386 30:9.3.6-4.P1.el5_4.2
set to be updated
---> Package bind-chroot.i386
30:9.3.6-4.P1.el5_4.2 set to be updated
---> Package bind-devel.i386
30:9.3.6-4.P1.el5_4.2 set to be updated
---> Package bind-libbind-devel.i386
30:9.3.6-4.P1.el5_4.2 set to be updated
---> Package bind-sdb.i386
30:9.3.6-4.P1.el5_4.2 set to be updated
--> Processing Dependency: libpq.so.4 for
package: bind-sdb
--> Running transaction check
---> Package postgresql-libs.i386
0:8.1.18-2.el5_4.1 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version
Repository Size
================================================================================
Installing:
bind i386 30:9.3.6-4.P1.el5_4.2 server
978 k
bind-chroot i386 30:9.3.6-4.P1.el5_4.2 server 44 k
bind-devel i386 30:9.3.6-4.P1.el5_4.2 server
2.8 M
bind-libbind-devel i386
30:9.3.6-4.P1.el5_4.2
server 441 k
bind-sdb i386 30:9.3.6-4.P1.el5_4.2 server 229 k
Installing for dependencies:
postgresql-libs i386 8.1.18-2.el5_4.1 server 196 k
Transaction Summary
================================================================================
Install
6 Package(s)
Upgrade
0 Package(s)
Total download size: 4.6 M
Is this ok [y/N]: y
Downloading Packages:
--------------------------------------------------------------------------------
Total 587
MB/s | 4.6 MB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : bind-devel
1/6
Installing : bind
2/6
Installing :
postgresql-libs 3/6
Installing : bind-sdb
4/6
Installing :
bind-libbind-devel 5/6
Installing : bind-chroot
6/6
Installed:
bind.i386 30:9.3.6-4.P1.el5_4.2
bind-chroot.i386 30:9.3.6-4.P1.el5_4.2
bind-devel.i386 30:9.3.6-4.P1.el5_4.2
bind-libbind-devel.i386 30:9.3.6-4.P1.el5_4.2
bind-sdb.i386 30:9.3.6-4.P1.el5_4.2
Dependency Installed:
postgresql-libs.i386 0:8.1.18-2.el5_4.1
Complete!
[root@server ~]# yum install caching-nameserver
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package caching-nameserver.i386
30:9.3.6-4.P1.el5_4.2 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
caching-nameserver i386
30:9.3.6-4.P1.el5_4.2
server 61 k
Transaction Summary
================================================================================
Install
1 Package(s)
Upgrade
0 Package(s)
Total download size: 61 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : caching-nameserver 1/1
Installed:
caching-nameserver.i386 30:9.3.6-4.P1.el5_4.2
Complete!
[root@server ~]# cd /var/named/chroot/etc/
[root@server etc]# ls
localtime
named.caching-nameserver.conf
named.rfc1912.zones rndc.key
[root@server etc]# cp
named.caching-nameserver.conf named.conf
[root@server etc]# ls
localtime named.conf rndc.key
named.caching-nameserver.conf named.rfc1912.zones
[root@server etc]# vi 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.
//
options {
listen-on port 53 { 192.168.0.78; };
# 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";
// Those options should be used carefully because they disable port
// randomization
// query-source port 53;
// query-source-v6 port 53;
allow-query { any; };
allow-query-cache { localhost; };
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view localhost_resolver {
match-clients { any; };
match-destinations { 192.168.0.78; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
[root@server etc]# vi named.rfc1912.zones
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
type hint;
file "named.ca";
};
zone "debashis.edu" IN {
type master;
file "forward.zone";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "reverse.zone";
allow-update { none; };
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
[root@server etc]# ll
total 20
-rw-r--r-- 1 root root 265 Jul 23 12:56 localtime
-rw-r----- 1 root named 1230 Jan 18 2010 named.caching-nameserver.conf
-rw-r----- 1 root root 1225 Jul 23 13:58 named.conf
-rw-r----- 1 root named 954 Jul 23 14:02 named.rfc1912.zones
-rw-r----- 1 root named 113 Jul 23 13:54 rndc.key
[root@server etc]# chgrp named named.conf
[root@server etc]# ll
total 20
-rw-r--r-- 1 root root 265 Jul 23 12:56 localtime
-rw-r----- 1 root named 1230 Jan 18 2010 named.caching-nameserver.conf
-rw-r----- 1 root named 1225 Jul 23 13:58
named.conf
-rw-r----- 1 root named 954 Jul 23 14:02 named.rfc1912.zones
-rw-r----- 1 root named 113 Jul 23 13:54 rndc.key
[root@server etc]# cd
/var/named/chroot/var/named/
[root@server named]# ls
data
localhost.zone named.ca named.local slaves
localdomain.zone
named.broadcast
named.ip6.local named.zero
[root@server named]# cp localdomain.zone
forward.zone
[root@server named]# cp named.local reverse.zone
[root@server named]# ls
data
localhost.zone
named.ip6.local reverse.zone
forward.zone
named.broadcast named.local slaves
localdomain.zone
named.ca named.zero
[root@server named]# vi forward.zone
$TTL 86400
@ IN SOA server.debashis.edu. root.server.debashis.edu. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS server.debashis.edu.
server IN A 192.168.0.78
[root@server named]# vi reverse.zone
$TTL 86400
@ IN SOA server.debashis.edu. root.server.debashis.edu. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS server.debashis.edu.
78 IN PTR server.debashis.edu.
[root@server named]# ll
total 44
drwxrwx--- 2 named named 4096 Aug 26 2004 data
-rw-r----- 1 root root
242 Jul 23 14:08 forward.zone
-rw-r----- 1 root named
198 Jan 18 2010 localdomain.zone
-rw-r----- 1 root named
195 Jan 18 2010 localhost.zone
-rw-r----- 1 root named
427 Jan 18 2010 named.broadcast
-rw-r----- 1 root named 1892 Jan 18 2010 named.ca
-rw-r----- 1 root named
424 Jan 18 2010 named.ip6.local
-rw-r----- 1 root named
426 Jan 18 2010 named.local
-rw-r----- 1 root named
427 Jan 18 2010 named.zero
-rw-r----- 1 root root
466 Jul 23 14:11 reverse.zone
drwxrwx--- 2 named named 4096 Jul 27 2004 slaves
[root@server named]# chgrp named forward.zone
[root@server named]# chgrp named reverse.zone
[root@server named]# ll
total 44
drwxrwx--- 2 named named 4096 Aug 26 2004 data
-rw-r----- 1 root named
242 Jul 23 14:08 forward.zone
-rw-r----- 1 root named
198 Jan 18 2010 localdomain.zone
-rw-r----- 1 root named
195 Jan 18 2010 localhost.zone
-rw-r----- 1 root named
427 Jan 18 2010 named.broadcast
-rw-r----- 1 root named 1892 Jan 18 2010 named.ca
-rw-r----- 1 root named
424 Jan 18 2010 named.ip6.local
-rw-r----- 1 root named
426 Jan 18 2010 named.local
-rw-r----- 1 root named
427 Jan 18 2010 named.zero
-rw-r----- 1 root named
466 Jul 23 14:11 reverse.zone
drwxrwx--- 2 named named 4096 Jul 27 2004 slaves
[root@server named]# cd /etc/hosts
bash: cd: /etc/hosts: Not a directory
[root@server named]# vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.0.78 server.debashis.edu server
[root@server named]# vi /etc/resolv.conf
search debashis.edu
nameserver 192.168.0.78
[root@server named]# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=server.debashis.edu
[root@server named]# service named status
rndc: connect failed: 127.0.0.1#953: connection
refused
named is stopped
then start the named service
Comments
Post a Comment