# 子域
## Server:192.168.1.211
```
vim /var/named/example.com
sub.example.com. IN NS dns.sub.example.com.
dns.sub.example.com. IN A 192.168.1.210
vim /var/named/1.168.192.zone
sub.example.com. IN NS dns.sub.example.com.
210 IN PTR dns.sub.example.com.
systemctl restart named
```
## Desktop:192.168.1.210
```
vim /etc/named.conf
zone "sub.example.com" IN {
type master;
file "sub.example.com";
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.sub.zone";
};
cd /var/named
cp named.localhost sub.example.com
cp named.localhost 1.168.192.sub.zone
chgrp named sub.example.com 1.168.192.sub.zone
vim sub.example.com
$TTL 1D
@ IN SOA dns.sub.example.com. root.sub.example.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS dns.sub.example.com.
dns IN A 192.168.1.210
@ IN MX 5 mail.sub.example.com.
mail IN A 192.168.1.210
www IN A 192.168.1.210
vim 1.168.192.sub.zone
$TTL 1D
@ IN SOA dns.sub.example.com. root.sub.example.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS dns.sub.example.com.
10 IN PTR dns.sub.example.com.
@ IN MX 5 mail.sub.example.com.
10 IN PTR mail.sub.example.com.
10 IN PTR www.sub.example.com.
systemctl start named
```
## 物理机:
vim /etc/resolv.conf
nameserver 192.168.1.211
### 高速缓存
options最后一行加一句
forwarders { 192.168.1.211; };
- 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