# slave(主备模式)
## Server:192.168.1.211
```
vim /etc/named.conf
zone "example.com" IN {
type master;
file "example.com";
allow-transfer { 192.168.1.210; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "com.example";
allow-transfer { 192.168.1.210; };
};
vim /var/named/example.com
$TTL 1D
@ IN SOA dns.example.com. root.example.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS dns.example.com.
dns IN A 192.168.1.211
@ IN NS dns1.example.com.
dns1 IN A 192.168.1.210
@ IN MX 5 mail.example.com.
mail IN A 192.168.1.211
www IN A 192.168.1.211
ftp IN CNAME www
vim /var/named/com.example
$TTL 1D
@ IN SOA dns.example.com. root.example.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS dns.example.com.
11 IN PTR dns.example.com.
@ IN NS dns1.example.com.
10 IN PTR dns1.example.com.
@ IN MX 5 mail.example.com.
11 IN PTR mail.example.com.
11 IN PTR www.example.com.
firewall-cmd --permanent --add-service=dns
systemctl restart named
```
## Desktop:192.168.1.210
```
yum -y install bind
vim /etc/named.conf
zone "example.com" IN {
type slave;
file "slaves/example.com";
masters { 192.168.1.211; };
};
zone "1.168.192.in-addr.arpa" IN {
type slave;
file "slaves/1.168.192.zone";
masters { 192.168.1.211; };
};
firewall-cmd --permanent --add-service=dns
firewall-cdm --reload
systemctl start named.service
```
## 物理机:
```
vim /etc/resolv.conf
nameserver 192.168.1.211
nameserver 192.168.1.210
```
- Linux Server
- 实用命令
- services
- Samba
- /etc/samba/smb.conf
- NFS
- Http
- httpd.conf
- lamp
- FTP
- /etc/vsftpd/vsftpd.conf
- ftp实例
- iSCSI
- SElinux
- DNS
- master
- slave
- subdomain
- 相关配置文件
- /etc/hosts
- /etc/resolv.conf
- /etc/named.conf
- /var/named/named.ca
- /var/named/named.localhost&named.loopback
- DHCP
- /etc/dhcp/dhcpd.conf
- mysql
- Redis
- Git
- HAProxy
- haproxy
- openssl
- nodejs