This is the README file for the normal public-ftp release of BIND,
which includes named, the C library routines for the resolver,
and other ancillary tools.  Those that are included separately 
in the network tape are not duplicated in this directory, thus
the instructions below are not quite right with regard to the 
bin, include and man directories.

---------------------
This directory contains all the info and sources
for the Berkeley Internet Name Domain server.
You should read and understand these directions before starting
to install the libraries and nameserver.  Some of these steps
replace existing source and binary files; you should make backups
of all existing files before you begin this installation.
Two installation procedures are described.  The first is for 4.3BSD
and other similar systems that are already configured to use earlier
versions of the nameserver, and which have the new version of <netdb.h>
(containing a h_addr_list field in the hostent structure).  The second
procedure is for 4.2BSD and derived systems.  This procedure requires
more decisions to be made, and may have to be varied due to system
or operation constraints.

The subdirectories and their contents are:

bin       - shell scripts used by current Berkeley makefiles
man       - manual pages & documentation
doc       - copy of Bind Operations Guide, and other documents 
include   - include files to go in /usr/include
named     - name server sources
res       - source for C library resolver routines (and other libc additions)
	    (may be used as separate library, resolv.a)
master    - Sample data files
tools     - some test programs


Here is how to install the name server on 4.3BSD:

   cp bin/mkdep.append /usr/ucb/mkdep
   cp bin/manroff /usr/man/manroff
1) cp include/arpa/nameser.h /usr/include/arpa  
2) cp include/*.h /usr/include 
3) cp man/*.1 /usr/man/manl
   cp man/*.3 /usr/man/man3
   cp man/*.5 /usr/man/man5
   cp man/*.7 /usr/man/man7
   cp man/*.8 /usr/man/man8
4) cp res/{res*.c,herror.c} /usr/src/lib/libc/net
   cp res/Makefile.libc.net /usr/src/lib/libc/net
   cp res/strcasecmp.c /usr/src/lib/libc/gen
   cp res/named/{*.c,Makefile} /usr/src/lib/libc/net/named
5) add strcasecmp.[co] to the Makefile in /usr/src/lib/libc/gen
6) rebuild and install /lib/libc.a.
7) cd named; make depend; make named; make install
8) cd tools/nslookup; make nslookup; make install
9) create the master files (samples in master/*)
10) edit /etc/rc.local to include:

if [ -f /etc/named ]; then
        /etc/named; echo -n ' named' >/dev/console
fi

11) recompile network client and server programs that use gethostbyname, etc.



Here is how to install the name server on 4.2BSD or similar systems.
First, a few notes on the choices that must be made.

Rather than building libresolv.a, you may wish to integrate the resolver
routines into /lib/libc.a.  This is recommended to make it easy to recompile
network programs once named is running.  This procedure may require hand-
tayloring on some systems.

You will have to choose a version of mkdep from the bin directory
that will work on your system:
If you've modified make(1) to use .depend files as described
in the current sendmail distribution, use mkdep; otherwise,
if you have the 4.3BSD cc -M option, use mkdep.append; on ultrix,
use mkdep.ultrix (uses cc -Em); otherwise, use mkdep.old.compiler.
The mkdep script is used by "make depend" to regenerate Makefile dependency
lists.

You will need to chose a version of netdb.h.  First, check /usr/include/netdb.h
on your system.  If the hostent structure has a h_addr_list entry, you can
probably use your existing netdb.h or the one in include/netdb.h.
If the existing netdb.h in /usr/include does not have a h_addr_list field,
you will have to decide whether to update to the 4.3BSD format of the hostent
structure.  This is the best approach, but cannot be used unless you plan
to upgrade entirely: if you use the new structure in /usr/include/resolv.h,
you must recompile everything that uses the hostent structure, including
the rest of the C library and all networking programs, without using
any pre-existing object files.  If this isn't possible or desirable,
and /usr/include/netdb.h doesn't have an h_addr_list line, use
include/netdb.h.4.2 instead of netdb.h.

On systems with Sun RPC, you will have to merge include/netdb.h or
include/netdb.h.4.2 with /usr/include/netdb.h; copy the rpc-related lines
into the appropriate copy of netdb.h.  Alternatively, use an alternate
include path when compiling the resolver library and programs that use it.

0) cp bin/{whatever} /usr/ucb/mkdep		(see above)
   cp tools/manroff /usr/man/manroff
1) cp include/arpa/nameser.h /usr/include/arpa  
   Also, on ultrix 2.x, if you haven't fixed
   the inet_addr definition in inet.h, do
   cp include/arpa/inet.h /usr/include/arpa
2) cp include/resolv.h /usr/include
3) cp include/netdb.h /usr/include/netdb.h
OR
   cp include/netdb.h.4.2 /usr/include/netdb.h
OR
   edit /usr/include/netdb.h
4) cp man/*.1 /usr/man/manl
   cp man/*.3 /usr/man/man3
   cp man/*.5 /usr/man/man5
   cp man/*.7 /usr/man/man7
   cp man/*.8 /usr/man/man8
5) cd res; make depend;
   make libresolv.a;
   make install
OR
   update the libc sources as in the 4.3BSD instructions above
   and use res/Makefile as a guide for integration
   and omit the RES=-lresolv in the next two steps
OR
   compile the .o files in res according to Makefile,
   then use place those object files in /lib/libc.a (keeping a backup!)
   and omit the RES=-lresolv in the next two steps
6) cd named; make depend; make RES=-lresolv named; make install
7) cd tools/nslookup; make RES=-lresolv nslookup install
8) create the master files (samples in master/*)
9) edit /etc/rc.local to include:

if [ -f /etc/named ]; then
        /etc/named; echo -n ' named' >/dev/console
fi

10) eventually, recompile network client and server programs that use
gethostbyname, etc.

If you have any problems or fixes send them to 
	bind@ucbarpa.berkeley.edu

To be added to that mailing list, send mail to
	bind-request@ucbarpa.berkeley.edu

For sendmail that supports MX records, use anonymous ftp to obtain
	ucbarpa.Berkeley.EDU:~ftp/4.3/sendmail.MX.tar.Z (compressed)
or
	ucbarpa.Berkeley.EDU:~ftp/4.3/sendmail.MX.tar
