2019.8.17 DNS主从服务器的配置
Posted 990624lty-jhc
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了2019.8.17 DNS主从服务器的配置相关的知识,希望对你有一定的参考价值。
所有服务器:关闭防火墙和安全机制
iptables -F
systemctl stop firewalld
setenforce 0
配置yum源
[root@ns2 ~]# mkdir /media/cdrom
[root@ns2 ~]# mount /dev/cdrom /media/cdrom
[root@ns2 ~]# cd /etc/yum.r*
[root@ns2 yum.repos.d]# mv C* a/
[root@ns2 yum.repos.d]# vim ./local.repo
[cdrom]
name=cdrom
baseurl=file:///media/
enabled=1
gpgcheck=0
[root@ns2 yum.repos.d]# yum -y clean all
主服务器的配置:
[root@localhost ~]# yum -y install bind
[root@localhost ~]# vim /etc/resolv.conf
[root@localhost ~]# vim /etc/hosts
[root@localhost ~]# vim /etc/named.conf
[root@localhost ~]# vim /var/named/crushlinux.zheng
[root@localhost ~]# cp /var/named/crushlinux.zheng /var/named/crushlinux.fan
[root@localhost ~]# vim /var/named/crushlinux.fan
[root@localhost ~]# chown :named /var/named/crushlinux.*
[root@localhost ~]# named-checkconf -z /etc/named.conf
[root@localhost ~]# named-checkzone crushlinux.com /var/named/crushlinux.zheng
[root@localhost ~]# named-checkzone crushlinux.com /var/named/crushlinux.fan
[root@localhost ~]# systemctl restart named
从服务器配置:
[root@localhost ~]# yum -y install bind
[root@localhost ~]# cat /etc/resolv.conf
[root@ns2 ~]# vim /etc/hosts
[root@localhost ~]# cat /etc/named.conf
[root@ns2 ~]# systemctl restart named
以上是关于2019.8.17 DNS主从服务器的配置的主要内容,如果未能解决你的问题,请参考以下文章