centos 7.6 DNS——别名解析、泛域名解析、邮件交换
文章目录
-
centos 7.6 DNS——别名解析、泛域名解析、邮件交换
-
步骤一:安装bind dns应用程序,修改主配置文件
yum -y install bind
[root@localhost etc]# rpm -qc bind
/etc/logrotate.d/named
/etc/named.conf
/etc/named.iscdlv.key
/etc/named.rfc1912.zones
/etc/named.root.key
/etc/rndc.conf
/etc/rndc.key
/etc/sysconfig/named
/var/named/named.ca
/var/named/named.empty
/var/named/named.localhost
/var/named/named.loopback
[root@localhost etc]# vi /etc/named.conf
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/6cd9b998bf1de4d21193d502b1f70cac.png)
步骤二:修改区域配置文件
vi /etc/named.rfc1912.zones
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/8e3af66109be6308669ceffc8216d3f5.png)
cp -p /var/named/named.hostlocal /var/named/ttyy.com.zone
[root@localhost named]# vim /var/named/ttyy.com.zone
[root@localhost named]# systemctl restart named
[root@localhost named]# echo "nameserver 192.168.75.137" > /etc/resolv.conf
[root@localhost named]# host mail.ttyy.com
mail.ttyy.com has address 8.8.8.8
[root@localhost named]# host www.ttyy.com
www.ttyy.com has address 7.7.7.7
[root@localhost named]# host smtp.ttyy.com
smtp.ttyy.com is an alias for mail.ttyy.com.
mail.ttyy.com has address 8.8.8.8
[root@localhost named]# host abc.ttyy.com
abc.ttyy.com has address 6.6.6.6
[root@localhost named]#
步骤三: 区域数据配置文件
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/f3f449a07e49d41af58db495a908e939.png)