标签:服务器配置 size style port linu centos lin 安装 编辑
yum install bind #安装DNS
yum install bind-utils #安装nslookup
vim /etc/named.conf #编辑主配置文件
listen-on port 53 { any; } #修改为any
allow-query { any; } #修改为any
#主配置文件底下添加正反向域
named-checkconf #检查配置是否正确
#添加正向解析
cp /var/named/named.localhost /var/named/jj.com.zone
chown root:named /var/named/jj.com.zone
vim /var/named/jj.com.zone
#添加反向解析
cp /var/named/named.localhost /var/named/172.16.0.arpa
chown root:named /var/named/172.16.0.arpa
vim /var/named/172.16.0.arpa
#检查配置是否正常
named-checkzone "rj.com" /var/named/rj.com.zone
named-checkzone "172.16.0.in-addr.arpa" /var/named/172.16.0.arpa
systemctl restart named.service #重启DNS
解析正反向域
正向域
反向域
yum autoremove bind #删除DNS
systemctl restart named.service #重启DNS
systemctl start named.service #启动DNS
systemctl status named.service #查看DNS状态
标签:服务器配置 size style port linu centos lin 安装 编辑
原文地址:https://www.cnblogs.com/intelligent-/p/10847189.html