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+nginx1.17+tomcat9集群


下一篇:CentOS8重置root密码