DekGenius.com
I l@ve RuBoard Previous Section Next Section

C.1 Instructions for BIND 8.2.3

Compiling and installing BIND 8.2.3 is easy. Here are detailed instructions to follow.

C.1.1 Get the Source Code

First, you've got to get the source code. There's a copy on ftp.isc.org, available for anonymous FTP:

% 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>

Now you need to find the right file:

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 Code

Now you've got the compressed tar file that contains the BIND source. Just use the tar command to uncompress and untar it:

% tar -zxvf bind-src.tar.gz

(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:

bin

Source code for all BIND binaries, including named.

include

Copies of include files referenced by the BIND code. You should use these to build your name server instead of using the ones shipped with your system, since they have been updated.

lib

Source code for libraries used by BIND.

port

Information BIND uses to customize compilation settings and compile-time options for various operating systems.

C.1.3 Use the Proper Compiler Settings

Before 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 Everything

Next, you compile everything from the top-level directory. First, run:

% make stdlinks

Then run:

% make clean
% make depend

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 all

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 install
    I l@ve RuBoard Previous Section Next Section