Using Linux to set up the DNS service detach resolution, the following error was encountered while checking the configuration file with named-checkconf:
[Root@svr7 named]# named-checkconf
/etc/named.conf:5: When using ' view ' statements, all zones must is in
The configuration file opens and displays the following
options{
directory "/var/named";
Zone "temp.cn" {
type master;
File "Temp.cn.zone";
ACL "Mylan" {
192.168.4.207;192.168.7.0/24;
};
View "Mylan" {
match-clients{any;};
Zone "temp.cn" {
type master;
File "Temp.cn.zone1";
};
View "Other" {
match-clients{any;};
Match-clients{any;};
Zone "temp.cn" {
type master;
File "Temp.cn.zone2";
};
After viewing the configured information, you find that the following fields are not required for writing
Zone "temp.cn" {
type master;
File "Temp.cn.zone";
After you delete the above fields, named-checkconf again to solve the problem.