I wanted to update BIND9 on my Debain Jessie Linux system to a newer version than the currently packaged version 9.9. Here are the steps to upgrade it to version 9.11:
tar zxvf bind-9.11.0.tar.gz
This will install the new version of BIND9 to "/usr/local/sbin". So you can have installed the new version of BIND9 in parallel to the packaged version of Debian Jessie (which resides in "/usr/sbin"). So in case of problems you can always go back to the original BIND9 version.
You now need to modify the start script of BIND9 so that thew new version will be used. You can do that with the following steps:
- Stop BIND9 with "service bind9 stop"
- Make a backup of the original start script: "cp /etc/init.d/bind9 /etc/init.d/bind9.ORG"
- Open "/etc/init.d/bind9" in an editor
- Add the path "/usr/local/sbin" at the end of the path statement so that it looks like "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin"
- Replace all "/usr/sbin/named" to "/usr/local/sbin/named" and all "/usr/sbin/rndc" to /usr/local/sbin/rncd".
- Make a backup of the original service definition: "cp /lib/systemd/system/bind9.service /lib/systemd/system/bind9.service.ORG"
- Open "/lib/systemd/system/bind9.service" in an editor
- Replace all "/usr/sbin" with "/usr/local/sbin"
- Run the following commands:
ln -s /etc/bind/named.conf /etc/named.conf
ln -s /etc/bind/rndc.key /etc/rndc.key
- Start BIND9 again with "service bind9 start"
Now BIND9 should run with the new version.