C/C++教程

CentOS8 dns

本文主要是介绍CentOS8 dns,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

安装&启动

[root@centos8 ~]#cat /etc/redhat-release
CentOS Linux release 8.4.2105
[root@centos8 ~]#yum install -y bind

[root@centos8 ~]#systemctl enable --now named

配置

Server基础配置

[root@centos8 ~]#vim /etc/named.conf


options {
    listen-on port 53 { localhost; };
    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";
    secroots-file   "/var/named/data/named.secroots";
    recursing-file  "/var/named/data/named.recursing";
    allow-query     { any; };

不关闭的服务同时,重新加载服务

[root@centos8 ~]#rndc reload
server reload successful

清除缓存

rndc flush

Client

vim /etc/sysconfig/network-scripts/ifcfg-
DNS1=10.0.0.5
nmcli con reload 
nmcli con up enxxx

测试

yum install -y bind-utils 

区域数据库Zone

这篇关于CentOS8 dns的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!