The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
Scripts / handy tips
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Going from bind8 to bind9
Date:   27-01-03 14:50

Well this is what I did to upgrade:
Installed bind9 from the ports.

Then created 'mkdir /var/run/bind'
This si done due to the bind user should have write permission to create the file, but by default the /var/run dir is mode 755 root:wheel. Well the easy solution is to just chmod 777 /var/run , but then again nah, that might bring the local users into "mens rea".
Well the bind user doesn't have write permission yet .. so that is why this is done
'chown bind:bind /var/run/bind'

Well now I only needed to get bind to put/remove the file in the /var/run/bind dir instead of the /var/run dir
That is done by adding this line to the named.conf file:

options {
... ....
pid-file "/var/run/bind";
..... .....

then to modify my /etc/rc.conf
Well the most changes I did was to remove the -g bind and and the -c /etc/namedb/named.conf in the flags, then add 'local' in the program line, after all modifications every for named looked like this:

named_enable="YES" # Run named, the DNS server (or NO).
named_program="/usr/local/sbin/named" # path to named, if you want a different one.
named_flags="-c /etc/namedb/named.conf -u bind" # Flags for named

Well I didn't edit the /etc/make.conf due to I hope that bind9 will enter the FreeBSD base.
But I would presume that echo "NO_BIND=YES" >> /etc/make.conf would stop make world from making it.

Well there is one more thing to check before trying ot run the new version .. check the ownership of he zone files and db files .. then
kill `cat /var/run/` && /usr/local/sbin/named -c /etc/namedb/named.conf -u bind

Best regards Xride

 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 Going from bind8 to bind9   new
Søren Straarup 27-01-03 14:50 
 Re: Going from bind8 to bind9   new
Søren Straarup 12-02-03 10:58 

 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Remember my login:
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum