1. Use the software package that comes with the CD to install the following package:
Bind
Bind-utils
Bind-libs
(Rpm-I xxx. rpm)
2.
Set the named service to self-start
(Using tools such as ntsysv and chkconfig)
3.
Assume that you need to parse bcomcn.com and perform the following operations:
Cd/var/named
Cp localdomain. zone bcomcn. zone
Vi bcomcn. zone
$ TTL 86400
@ In soa ns.bcomcn.com. root.bcomcn.com .(
200612230; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400); Minimum
In ns ns.bcomcn.com.
In mx 10 mail.bcomcn.com.
Ns.bcomcn.com. in a 192.168.1.5
Mail.bcomcn.com. in a 192.168.1.5
Www.bcomcn.com. in a 192.168.1.5
Note: If the host name is followed by a "dot", it indicates that it is a complete host without a dot. It indicates that the current domain name is added, for example, mail.bcomcn.com. = mail.
Cp localdomain. zone 192. zone
Vi 192. zone
$ TTL 86400
@ In soa localhost. root.bcomcn.com .(
200612230; Serial
28800; Refresh
14400; Retry
3600000; Expire
86400); Minimum
In ns localhost.
5 in ptr www.bcomcn.com.
4. Modify/etc/named. conf and add:
Zone "bcomcn.com" IN {
Type master;
File "bcomcn. zone ";
Allow-update {none ;};
};
Zone "1.168.192.in-addr. arpa" IN {
Type master;
Files "192. zone ";
Allow-update {none ;};
};
Start named, set the local DNS server to the local server, and use nslookup or other tools to detect:
Nslookup
> Set type = mx
> Bcomcn.com
(You can check/var/log/message to check whether named is correctly started and whether Domain resolution is loaded .)