1. Download the yum package
Command: yum install bind-chroot
2. Change profile
Here, we should understand that the main configuration file: /etc/named.conf
However, to avoid frequent changes to the master configuration file named.conf caused by DNS service error, so save area information rules in the "/etc/named.rfc1912.zones" file, this file is used to define the domain names and IP address resolution rules save the file location and type of service area, etc., must be careful to modify
So you want to change the configuration file change information two general inquiries listen address and host address, etc. in the named.conf file and change the general information area in named.rfc1912.zones file
So to modify the address configuration, and then change the zone data
Specific command line:
vim /etc/named.conf
And then find the position of FIG shown:
After the {53 listen-on port} modify any, to listen to allow any IP address on behalf of
{After the allow-query} modify any, to allow any host on behalf of the query
Here need to understand that being analytical role is based on a host name (domain name) to find the corresponding IP addresses have been some default information, zone file, you can not ignore, can be added directly below
Specific command line:
vim /etc/named.rfc1912.zones
The figure above file "hbza.com.zone"; represented here this file needs to establish their own, so you can customize
3. The configuration data parsed
Look at the data area file permissions, and then can be copied directly forward resolution template file : "/ etc / named / named.localhost ", can be used directly after fill in the information.
Specific command line:
ls -al named.localhost
cp -a named.localhost hbza.com.zone // execute join when cp -a command to copy the original document on behalf of connectivity attributes, owner, group, and other information
After editing hbza.com domain zone data files
Specific command line:
vim hbza.com.zone
FIG read as follows:
IN SOA // represent authorization information to start
hbza.com. // indicates the address of the DNS zone (filename)
root.hbza.com. // represents a DNS administrator's mailbox
NS ns.hbza.com. // ns server host name can be changed hbza namely hbza.hbza.com
Restart the named service after completion of the above configuration, so that the configuration file to take effect
systemctl restart named
nslookup command is used to detect whether from the network to resolve queries DNS servers to resolve domain names and IP addresses of record, detection named service success
4. You can also ping the URL of your settings on your Windows host system
The reason can not be displayed because access to the target host 200 network of machines I did not open
The above is a screenshot of success
But if your host can not ping the host Windows can check and see if you can ping the virtual machine
Then look at their host network services DNS settings and whether the virtual machines on the same network segment is not the case you want to set them to the same network segment
I made mistakes in the case when the trial appeared:
1. When the named file can not be started or can not be restarted
You can first use the command systemctl status named test to see to see if there is a syntax error
Or check whether they do not match the file name of the file to create the configuration file
2. no syntax errors, nslookup can not find the address set up their own
To see if this is their virtual machine does not have the DNS service into a network segment
Specific command: nmtui
After setting up the check with ifconfig
And then restart it named general on it
NOTE: DNS address does not change, then it will not be successful -