1 安装dns

yum -y install bind

wKioL1g8H3uzduSzAAAfccpu7VQ043.png-wh_50

2 修改配置文件

vi /ect/named.conf

wKiom1g8H3vRBHmnAAASCq9mnqA532.png-wh_50

wKioL1g8H3-RUNkaAAAd0GNg9sI235.png-wh_50


vi named.rfc1912.zones

wKioL1g8H3-QYPj9AAA7IMAnt4o806.png-wh_50

wKiom1g8H3-hyr2WAAAkhnj6G2Q428.png-wh_50

3 复制配置文件并修改权限

 cp /var/named/named.localhost /var/named/aaa.com.zone

 cp /var/named/named.localhost /var/named/1.168.192.zone.arpa

chmod 777 /var/named/aaa.com.zone

chmod 777 /var/named/1.168.192.zone.arpa

wKiom1g8H4CAFsFvAAAGHgfyEtc788.png-wh_50

4 修改配置文件

vi /var/named/aaa.com.zone

wKioL1g8H4CS1xhbAAAOAFE-UKQ235.png-wh_50

vi /var/named/1.168.192.zone.arpa

wKioL1g8H4CS1xhbAAAOAFE-UKQ235.png-wh_50

wKioL1g8H4DQzBZ9AAARMofOfPc233.png-wh_50


5 修改文件

vi /ect/hosts

wKiom1g8H4Gh3ipyAAAIu1HMjdU887.png-wh_50

vi /ect/resolv.conf



wKiom1g8H4GxSx6NAAAI6gqudp0040.png-wh_50

6 service named restart

7 ping

wKioL1g8H4GST9jBAAATGQiAzQE862.png-wh_50