DNS master、slave服务
为openlab搭建web网站,要求基于域名www.openlab.com可以访问网站信息。 自己搭建dns master、slave服务实现解析
1>创建目录
2>导入网站内容
3>编辑配置文件
4>重启服务
5>测试
6>下载dns服务软件包bind
[[email protected] ~]# yum install -y bind
7>搭建dns服务器 配置主配置文件
[[email protected] ~]# vim /etc/named.conf
7>配置子配置文件
[[email protected] ~]# vim /var/named/named.openlab.com
8>重启服务并检查状态
9>客户端写入/etc/resolv.conf文件并测试
[[email protected] ~]# vim /etc/resolv.conf
search localdomain
nameserver 192.168.211.100
[[email protected] ~]# ping www.openlab.com
PING www.openlab.com (192.168.211.101) 56(84) bytes of data.
64 bytes from 192.168.211.101: icmp_seq=1 ttl=64 time=0.010 ms
64 bytes from 192.168.211.101: icmp_seq=2 ttl=64 time=0.039 ms
64 bytes from 192.168.211.101: icmp_seq=3 ttl=64 time=0.038 ms
64 bytes from 192.168.211.101: icmp_seq=4 ttl=64 time=0.051 ms
64 bytes from 192.168.211.101: icmp_seq=5 ttl=64 time=0.050 ms
64 bytes from 192.168.211.101: icmp_seq=6 ttl=64 time=0.037 ms
64 bytes from 192.168.211.101: icmp_seq=7 ttl=64 time=0.024 ms
10>配置dns slave服务
主服务端配置
从服务器配置
双方重启服务