差異處
這裏顯示兩個版本的差異處。
Both sides previous revision 前次修改 下次修改 | 前次修改 | ||
bind [2017/01/10 22:37] jz |
bind [2017/01/10 22:47] (目前版本) jz |
||
---|---|---|---|
行 1: | 行 1: | ||
====== BIND ====== | ====== BIND ====== | ||
- | + | ==== Install ==== | |
- | ==== install ==== | + | |
<code> | <code> | ||
pkg install bind911 | pkg install bind911 | ||
行 8: | 行 7: | ||
</code> | </code> | ||
- | ==== generate key (note that the service start will do that) ==== | + | ==== Generate key (note that the service start will do that) ==== |
<code> | <code> | ||
rndc-confgen -a | rndc-confgen -a | ||
</code> | </code> | ||
- | ==== check config ==== | + | ==== Check config ==== |
<code> | <code> | ||
named-checkconf | named-checkconf | ||
行 19: | 行 18: | ||
</code> | </code> | ||
- | ==== set directory ==== | + | ==== Set directory ==== |
''/usr/local/etc/namedb/named.conf'' | ''/usr/local/etc/namedb/named.conf'' | ||
<code> | <code> | ||
options { | options { | ||
- | // All file and path names are relative to the chroot directory, | + | ... |
- | // if any, and should be fully qualified. | + | |
directory "/usr/local/etc/namedb"; | directory "/usr/local/etc/namedb"; | ||
... | ... | ||
行 30: | 行 28: | ||
</code> | </code> | ||
- | ==== logging config for debug ==== | + | ==== Logging config for debug ==== |
+ | create log file manually | ||
+ | |||
+ | <code bash> | ||
+ | touch /var/log/named.log | ||
+ | chown bind:bind /var/log/named.log | ||
+ | </code> | ||
''/usr/local/etc/namedb/named.conf'' | ''/usr/local/etc/namedb/named.conf'' | ||
<code> | <code> | ||
行 48: | 行 53: | ||
</code> | </code> | ||
- | ==== zone ==== | + | ==== Zone config ==== |
''/usr/local/etc/namedb/named.conf'' | ''/usr/local/etc/namedb/named.conf'' | ||
<code> | <code> | ||
行 62: | 行 67: | ||
</code> | </code> | ||
- | ==== zone file ==== | + | ==== Zone file ==== |
''/usr/local/etc/namedb/master/example.org'' | ''/usr/local/etc/namedb/master/example.org'' | ||
<code> | <code> | ||
行 105: | 行 110: | ||
3 IN PTR mail.example.org. | 3 IN PTR mail.example.org. | ||
</code> | </code> | ||
+ | |||
+ | ==== Start service ==== | ||
+ | <code bash> | ||
+ | service named start | ||
+ | </code> | ||
+ | |||
[[http://wiki.weithenn.org/cgi-bin/wiki.pl?bind9-%E6%8F%90%E4%BE%9BDomain_Name%E8%88%87IP%E5%B0%8D%E6%87%89%E7%9A%84%E6%9C%8D%E5%8B%99|bind 安全設定]] | [[http://wiki.weithenn.org/cgi-bin/wiki.pl?bind9-%E6%8F%90%E4%BE%9BDomain_Name%E8%88%87IP%E5%B0%8D%E6%87%89%E7%9A%84%E6%9C%8D%E5%8B%99|bind 安全設定]] |