Appendix C. Compiling and Installing BIND on LinuxThe versions of BIND shipped with most versions of Linux are fairly recent -- usually BIND 8.2.2 for the most recent Linux releases. Still, BIND 8.2.3 is the most current BIND release, and the ISC recommends that you upgrade to BIND 9. For those of you who can't wait until your version of Linux updates to BIND 8.2.3 or 9.1.0, this appendix will show you how to do it yourself.
C.1.1. Get the Source CodeFirst, you've got to get the source code. There's a copy on ftp.isc.org, available for anonymous FTP:
Now you need to find the right file:% cd /tmp % ftp ftp.isc.org. Connected to isrv4.pa.vix.com. 220 ProFTPD 1.2.0 Server (ISC FTP Server) [ftp.isc.org] Name (ftp.isc.org.:user): ftp 331 Anonymous login ok, send your complete e-mail address as password. Password: 230 Anonymous access granted, restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. ftp>
ftp > cd /isc/bind/src/cur/bind-8 250 CWD command successful. ftp > binary 200 Type set to I. ftp > get bind-src.tar.gz local: bind-src.tar.gz remote: bind-src.tar.gz 200 PORT command successful. 150 Opening BINARY mode data connection for bind-src.tar.gz (1309147 bytes). 226 Transfer complete. 1309147 bytes received in 23 seconds (56 Kbytes/s) ftp > quit 221 Goodbye.
C.1.2. Unpack the Source CodeNow you've got the compressed tar file that contains the BIND source. Just use the tar command to uncompress and untar it:
(This assumes you've got a version of tar that can handle compressed, gzipped files; if you don't, you can get a new copy of tar via anonymous FTP from ftp.gnu.org in /gnu/tar/tar-1.13.tar.) This will create a src directory with several subdirectories, including bin, include, lib, and port. The contents of these subdirectories is as follows:% tar -zxvf bind-src.tar.gz
C.1.3. Use the Proper Compiler SettingsBefore you can build everything, you'll need a C compiler. Nearly every version of Linux comes with gcc, the GNU C compiler, which works fine. If you need to get gcc, you can find information at http://www.fsf.org/software/gcc/gcc.html.
By default, BIND assumes that you're using the GNU C compiler and various other GNUish utilities, such as flex and byacc. These are a standard part of most Linux development environments. If your version of Linux uses different programs, though, you'll need to modify port/linux/Makefile.set. This file lets BIND know which programs to use.
C.1.4. Build EverythingNext, you compile everything from the top-level directory. First, run:
Then run:% make stdlinks
This removes any old object files you might have sitting around from previous compilation attempts and updates the Makefile dependencies. Then, compile the source code by running:% make clean % make depend
The source code should compile without any errors. Next, install the new named and named-xfer programs into /usr/sbin. You'll need to become root to do this. Use the command:% make all
# make install
Copyright © 2002 O'Reilly & Associates. All rights reserved.