[root@localhost?~]#?yum?install?bind?-y
Complete!
[root@localhost?~]#
[root@localhost?~]#?vim?/etc/named.conf?
[root@localhost?~]#?cat?-n?/etc/named.conf?
?????1??//
...
????12??options?{
????13??????#listen-on?port?53?{?127.0.0.1;?};
????14??????listen-on?port?53?{?192.168.1.254;?};
????15??????listen-on-v6?port?53?{?::1;?};
????16??????directory???"/var/named";
????17??????dump-file???"/var/named/data/cache_dump.db";
????18??????statistics-file?"/var/named/data/named_stats.txt";
????19??????memstatistics-file?"/var/named/data/named_mem_stats.txt";
????20??????#allow-query?????{?localhost;?};
...
????33??
????34??????#dnssec-enable?yes;
????35??????dnssec-enable?no;
????36??????#dnssec-validation?yes;
????37??????dnssec-validation?no;
...
????62??
[root@localhost?~]#
[root@localhost?~]#?systemctl?start?named.service?
[root@localhost?~]#?systemctl?enable?named.service?
Created?symlink?from?/etc/systemd/system/multi-user.target.wants/named.service?to?/usr/lib/systemd/system/named.service.
[root@localhost?~]#?netstat?-anptul?|?grep?"named"
tcp????????0??????0?192.168.1.254:53????????0.0.0.0:*???????????????LISTEN??????11217/named?????????
tcp????????0??????0?127.0.0.1:953???????????0.0.0.0:*???????????????LISTEN??????11217/named?????????
tcp6???????0??????0?::1:53??????????????????:::*????????????????????LISTEN??????11217/named?????????
tcp6???????0??????0?::1:953?????????????????:::*????????????????????LISTEN??????11217/named?????????
udp????????0??????0?192.168.1.254:53????????0.0.0.0:*???????????????????????????11217/named?????????
udp6???????0??????0?::1:53??????????????????:::*????????????????????????????????11217/named?????????
[root@localhost?~]#
[root@localhost?~]#?vim?/etc/named.conf?
[root@localhost?~]#?cat?/etc/named.conf?
...
zone?"jd.com"?IN?{
????type?master;
????file?"jd.com.zone";
};
...
[root@localhost?~]#
[root@localhost?~]#?cd?/var/named/
[root@localhost?named]#?cp?-a?named.empty?jd.com.zone
[root@localhost?named]#?vim?jd.com.zone?
[root@localhost?named]#?cat?jd.com.zone?
$TTL?3H
@???IN?SOA??jd.com.?root.jd.com.?(
????????????????????0???;?serial
????????????????????1D??;?refresh
????????????????????1H??;?retry
????????????????????1W??;?expire
????????????????????3H?)????;?minimum
????NS??ns.jd.com.
ns??A???192.168.1.254
www?A???172.16.1.100
[root@localhost?named]#
重置生效。
[root@localhost?~]#?yum?install?httpd?-y
...
Complete!
[root@localhost?~]#?systemctl?list-unit-files?|grep?"httpd.service"
httpd.service?????????????????????????????????disabled
[root@localhost?~]#?systemctl?start?httpd.service?
[root@localhost?~]#