BSD 4_3_Tahoe development
[unix-history] / usr / src / etc / named / README
---------------------
This directory contains all the info and sources that
exist for the Berkeley Internet Name Domain server.
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
(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:
0) cp bin/mkdep /usr/ucb/mkdep
cp bin/manroff /usr/man/manroff
1) cp include/arpa/* /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,Makefile} /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.
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.
The mkdep script is used by "make depend" to regenerate Makefile dependency
lists. It depends on the -M option to cc to produce dependencies.
If you don't have this option to cc, you may have to edit the "depend"
entry or the actual dependencies themselves. Try skipping the "make depend"
steps. If you get errors like
"make: don't know how to make /usr/include/something.h"
then remove the dependency on something.h and try again.
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,
yoiu 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 replace the gethostbyname and gethostbyaddr routines in /lib/libc.a
with the nameserver versions, and you must recompile any object files
that will be linked using the new libc.a. If this doesn't make sense,
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 tools/mkdep /usr/ucb/mkdep
cp tools/manroff /usr/man/manroff
1) cp include/arpa/* /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; mkdep -f Makefile.resolv;
make -f Makefile.resolv libresolv.a 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.resolv,
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
or bind@ucbarpa.arpa
For sendmail that supports MX records, use anonymous ftp to obtain
ucbarpa.Berkeley.EDU:~ftp/pub/4.3/sendmail.MX.tar.Z (compressed)
or
ucbarpa.Berkeley.EDU:~ftp/pub/4.3/sendmail.MX.tar
(Check the dates on these files, as the version that works with the current
nameserver isn't quite ready yet.)