标签:wal 域名 ESS roc 启动服务 ble 区域解析库 主域名服务器 one
192.168.80.102主主从都要关闭
systemctl stop firewalld
setenforce 0
首先同步时间:
yum install ntp -y
yum install bind -y
vi /etc/ntp.conf加入以下三行在指定的位置
restrict 192.168.80.0 mask 255.255.255.0 nomodify notrap
server 127.127.1.0
fudge 127.127.1.0 stratum 8
-
启动服务
service ntpd start
开机自启动
systemctl enable ntpd
yum install ntp -y
ntpdate 192.168.80.181 //用从的去同步主服务器的时间
vi /etc/named.conf
#正向反向解析文件存放目录,前面加反斜线的代表注释修改以下内容:
listen-on port 53 { any; };
allow-query { any; };
vi /etc/named.rfc1912.zones
在最下面添加以下内容
zone "hello.com" IN {
type master;
file "hello.com.zone";
allow-update { 192.168.80.103; };
also-notify { 192.168.80.103; };
};
zone "80.168.192.in-addr.arpa" IN {
type master;
file "hello.com.local";
allow-update { 192.168.80.103; };
also-notify { 192.168.80.103; };
};
cd /var/named/
cp -p named.localhost hello.com.zone
vi hello.com.zone
cd /var/named/
cp -p named.localhost hello.com.zone
vi hello.com.zone
$TTL 1D
@ IN SOA hello.com. 3040401509.qq.com (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS dns.hello.com.
dns IN A 192.168.80.102
www IN A 192.168.80.103
ftp IN A 192.168.80.104
区域解析库:
资源记录rr
SOA:起始授权记录,一个区域文件只能有一个。
NS:授权区域(授权哪个DNS服务器)。
MX:邮件交换器,MX记录有优先级属性0-99,数字越小越高。
A:将FQDN转换成IP地址。
PTR:IP转换成FQDN。
AAAA:FQDN -- IPV6。
CNAME:正式名称。
cp -p hello.com.zone hello.com.local
vi hello.com.local
$TTL 1D
@ IN SOA hello.com. 3040401509.qq.com (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS dns.hello.com.
102 IN PTR dns.hello.com.
103 IN PTR www.hello.com.
systemctl start named //启动dns服务
netstat -anpt | grep named
yum install bind -y
vi /etc/named.conf
listen-on port 53 { any; };
allow-query { any; };
vi /etc/named.rfc1912.zones
#最后一行添加
zone "hello.com" IN {
type slave;
masters { 192.168.80.102; };
file "slaves/hello.com.zone";
};
zone "80.168.192.in-addr.arpa" IN {
type slave;
masters { 192.168.80.102; };
file "slaves/hello.com.local";
};
systemctl start named #启动服务器
cd /var/named/slaves/
cat hello.com.zone
这里出现了乱码
解决方法:
vi /etc/named.conf
masterfile-format text ;
systemctl restart named 重启服务
cat hello.com.zone
标签:wal 域名 ESS roc 启动服务 ble 区域解析库 主域名服务器 one
原文地址:https://blog.51cto.com/14158288/2377577