The version of BIND that comes with the most recent release of Solaris 10 is 9.3.6-P1. This document is meant to provide a step-by-step procedure to compile and install a more recent version of BIND. As of the writing of this document the production release of BIND from ISC is 9.6.1-P3.
If you want to skip the process of doing the compile, you can download and install the following packages.
BIND 9.6.1-P3 SPARC
BIND 9.6.1-P3 x64
These packages contain everything needed to run BIND on Solaris. I have included a few necessary libraries from the Sunfreeware packages installed in step 2 below to avoid having any package dependency requirements. I’ve also included a sample named.conf file, a few sample zone files and the most recent named.root file.
Compile and Run BIND 9.6.1-P3
1- Solaris does not come with compilers. Sun/Oracle does, however, offer SunStudio as a free download.
You will need to setup an SDN account.
On my system I downloaded the tarfile installer for Sun Studio 12u1 and extracted it under /opt. Depending on how you install Sun Studio you PATH variable may change in Step 3 below.
2- Download and install a few extra packages from sunfreeware.com.
libgcc-3.4.6
openssl.0.9.8l
make-3.81
3- After installing the Sun Studio compiler and the sunfreeware packages, edit your PATH variable so that all binaries will be found in the correct order.
# PATH=/usr/sbin:/usr/bin:/usr/dt/bin:/usr/openwin/bin:/usr/local/bin:/opt/sunstudio12.1/bin:/usr/ccs/bin
# export PATH
4- Obtain a copy of the BIND 9.6.1-P3 source code.
Once you’ve extracted the source code and entered the bind-9.6.1-P3 directory you can compile the usual way.
# ./configure –prefix=/usr/local
# make install
You now have a copy of Bind 9.6.1-P3 for use on your Solaris system.
Your configuration file will be /usr/local/etc/named.conf.
5- If you’d like, you can make a change to the Solars SMF dns/server start method so that you can control your newer version of BIND with the svcadm command. Just edit the file /lib/svc/method/dns-server and change the line that says:
server=/usr/sbin/named
to
server=/usr/local/sbin/named
6- Create your named.conf file and zone files and you’re ready to go.
You can either start the new version of bind by running
# /usr/local/sbin/named
or, if you followed step 5 you can start it with
# svcadm enable dns/server
7- If you want to be able to manage DNS with rndc you will need to create a /usr/local/etc/rndc.conf file, and then create a “key” and a “controls” statement in your named.conf file.
The easiest way to do this is to run the following two commands. This will create the statements in proper syntax, including tab spacing, with a shared key for rndc to communicate with named.
# /usr/local/sbin/rndc-confgen > /usr/local/etc/rndc.conf
# sed -n ‘/# key/,$s/^#//p’ /usr/local/etc/rndc.conf | grep -v ‘End of named.conf’ >> /usr/local/etc/named.conf
If you don’t do this you will get the following messages in your /var/adm/messages file when you start BIND.
[ID 873579 daemon.notice] couldn’t add command channel 127.0.0.1#953: not found
[ID 873579 daemon.notice] couldn’t add command channel ::1#953: not found
This is really nothing more than a notice that you will not be able to manage your named daemon with rndc.