DNS架构.png
注意:
配置www主机:
yum install -y httpd
vim /var/www/html/index.html
Welcome to magedu!
systemctl start httpd
配置主DNS:
vim /etc/named.conf
vim /etc/named.rfc1912.zones
named-checkconf
vim /var/named/magedu.com.zone
chmod 640 magedu.com.zone
chown :named magedu.com.zone
named-checkzone magedu.com. magedu.com.zone
systemctl start named
配置从DNS:
vim /etc/named.conf
vim /etc/named.rfc1912.zones
named-checkconf
systemctl start named
配置comDNS:
vim /etc/named.conf
vim /etc/named.rfc1912.zones
named-checkconf
vim /var/named/com.zone
chmod 640 com.zone
chown :named com.zone
named-checkzone com. com.zone
systemctl start named
配置根DNS:
vim /etc/named.conf
named-checkconf
vim /var/named/root.zone
chmod 640 root.zone
chown :named root.zone
named-checkzone . root.zone
systemctl start named
配置局域网DNS:
vim /etc/named.conf
vim /var/named/named.ca
systemctl start named
配置client:
vim /etc/resolv.conf
nameserver 192.168.39.71
下载bind
编译安装bind
环境变量
vim /etc/profile.d/named.sh
库和头文件
vim /etc/ld.so.conf.d/named.conf
/usr/local/bind9/lib
ldconfig –v
ls -sv /usr/local/bind9/include /usr/include/named
man帮助
vim /etc/man.config | /etc/man_db.conf
MANPATH /usr/local/bind9/share/man
man named.conf
主配置文件
vim /etc/named/named.conf
区域数据库
mkdir /var/named
named-checkconf
dig +norec @a.root-servers.net > /var/named/named.ca
vim /var/named/named.localhost
vim /var/named/named.loopback
设置权限
启动服务和测试