Linux Network Service-DNS-Linux Enterprise Application-Linux server application information. For details, refer to the following section. Preparation:
Attach the optical drive: mount/dev/cdrom/mnt/cdrom/
To replace the disc, uninstall the optical drive: umount/mnt/cdrom or eject.
Decompress the bind package: tar xzf bind-9.2.3.tar.gz-C/usr/local/src/
Compile, configure, and install: cd/usr/local/src/bind-9.2.3
./Configure -- prefix =/usr/local/bind & make install
Put the RedHat 9 second disc (RedHat AS 4 first disc) of the installation disk in the drive, find the caching-nameserver-7.3-3.noarch.rpm
Run rpm ivh caching-nameserver-7.3-3.noarch.rpm -- nodeps (no dependency)
Generate the rndc. key File:/usr/local/bind/sbin/rndc-confgen>/etc/rndc. conf
Mv/etc/rndc. conf/etc/rndc. key
Edit/etc/rndc. key
Delete content other than the first four lines !!
Configuration file:
Main configuration file:/etc/named. conf
Configuration area file
Switch to the bind installation directory/usr/local/bind/sbin /.
Check the main Configuration File Syntax command:
./Named-checkconf/etc/named. conf
Check the region file:
./Named-checkzone guoyuan.com/var/named/0.168.192
./Named-checdzone guoyuan.com/var/named/guoyuan.com
Check whether there are any errors. If there are no errors, run the bind service.
Run:/usr/local/bind/sbin/named-c/etc/named. conf
If you do not enter the-c parameter, all named parameters are displayed. For example
[Root @ host sbin] #./named/etc/named. conf
Usage: named [-c conffile] [-d debuglevel] [-f |-g] [-n number_of_cpus]
[-P port] [-s] [-t chrootdir] [-u username]
View logs
Tail-n 20/var/log/messages
Troubleshooting,
Run/usr/local/bind/sbin/named-c/etc/named. conf
View process: ps-aux | grep named
View port: netstat-an | grep 53
Note:
1. Set NS record (required), mx record, and A record CNAME record for the region File
The configuration file is as follows:
$ TTL 86400
@ In soa test root.guoyuan.com .(
42; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum
In ns test.guoyuan.com.
Test.guoyuan.com. in a 192.168.0.26
Ftp in a 192.168.0.24
Webserver in a 192.168.0.3
In a 192.168.0.26
In a 192.168.4.2
Www in cname webserver
Mail in a 192.168.0.26
@ In mx 5 mail
Test1.guoyuan.com. in a 192.168.2.4
If you want to add domain names in batches, such as station100.guoyuan.com ---station200.guoyuan.com, add the following statement to the region file:
$ Generate 100-200 station $ .guoyuan.com. A 192.168.0. $
2. If named is automatically loaded upon startup:
Use vi to add/usr/local/bind/sbin/named-c/etc/named. conf to the/etc/rc. d/rc. local file.
Or
Input echo "/usr/local/bind/sbin/named-c/etc/named. conf">/etc/rc. d/rc. local
The two formats are Xiangyang/etc/rc. d/rc. write "/usr/local/bind/sbin/named-c/etc/named. conf "This statement!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.