1. Yum install-y bind Bind-chroot bind-utils
2. Edit the DNS master configuration file
vim/etc/named.conf Modify the following red places:
Options {
Listen-on Port: ( any;};
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 { any;};
recursion Yes;
3. Add Domain name settings
Vim/etc/named.rfc1912.zones adds the following:
Zone "Wsmtstest.com" in {
Type master;
File "named.wsmtstest.com";
allow-update {none;};
};
4. Modify the domain name configuration file
cd/var/named/
CP Named.localhost named.wsmtstest.com
Vim named.wsmtstest.com (to be the same as the file name defined in the main configuration file [/etc/named.rfc1912.zones]), add the following at the end:
www in A 115.231.20.100
"means: www.wsmtstest.com resolves to 115.231.20.100"
5. Restart Services: Service named restart
Note When the domain name resolution is unsuccessful, review the domain name profile that you created earlier to see if you have Read permission, and if not, authorize "
Linux:dns Server Setup and configuration