compile and install from source
kremels at kreme.com
Tue Mar 31 08:57:18 UTC 2015
> On Mar 31, 2015, at 02:46, Mathieu Arnold <mat at FreeBSD.org> wrote:
> +--On 30 mars 2015 19:32:09 -0600 "@lbutlr" <kremels at kreme.com> wrote:
> |> # /usr/local/sbin/named -u bind -c /etc/namedb/named.conf \
> |> -t /var/named
> | Yes, that works without reporting any errors, so the issue appears to be
> | with /usr/local/etc/rc.d/named startup script.
> Well, your first post says you're using 8.4, so there should be no such
> script, it should be in /etc/rc.d.
Yes, you’re right. That was a thinko.
> /usr/local/sbin/rndc status
> | rndc: neither /etc/rndc.conf nor /etc/rndc.key was found
> That's because you built named manually and not from ports, so it doesn't
> know where it should find its bits.
I don’t see why not, /etc/defaults/rc.conf shows:
named_program="/usr/sbin/named" # Path to named, if you want a different one.
named_conf="/etc/namedb/named.conf" # Path to the configuration file
named_chrootdir="/var/named" # Chroot directory (or "" not to auto-chroot it)
So it seems it should be looking in /var/named/etc/namedb/ (and in fact it does look there for the conf file); rndc seems to be looking elsewhere though.
> | Now, it is true that there is no rndc.conf, but that is true all all
> | three name servers. There is a rndc.key in /var/named/etc/namedb/rndc.conf
> | I’m not sure why it is looking in (I assume /var/named/etc instead of)
> | /var/named/etc/namedb.
> Because you built it manually so it did not get all the right configure
> options the port has.
OK, well I cannot build via ports, so what magic does the port invoke?
> | is named_chrootdir="/var/named" not correct?
> It is.
Then why can’t rndc find the key file? And why is it looking outside the chroot?
# cp rndc.key /etc
# rndc status
version: 9.9.7 <id:e87fa9ae>
[… Stuff …]
server is up and running
Honesty may be the best policy, but it's important to remember that
apparently, by elimination, dishonesty is the second-best policy.
More information about the bind-users