]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/bind/INSTALL
This commit was generated by cvs2svn to compensate for changes in r98937,
[FreeBSD/FreeBSD.git] / contrib / bind / INSTALL
1 Systems it is known to compile and run on:
2
3         BSD/OS 3.1, 4.0.1
4         FreeBSD 3.3, 3.4
5         RH Linux 5.2 (don't use "make links" when building, though)
6         Debian GNU/Linux 2.2.9 ("unreleased")
7         Digital UNIX 3.2C, 4.0, 5.0
8         NetBSD/i386 1.3.2, 1.4
9         Darwin 1.x (Mac OS X)
10         SunOS 5.6 (Solaris 2.6), SunOS 5.7 (Solaris 7)
11         SCO UnixWare 7.0, 7.0.1, 7.1
12         IRIX 6.5
13
14 Systems it has been known in the past to compile and run on:
15
16         AIX 4.x
17         A/UX 3.1.1
18         Digital ULTRIX 4.5 (without Compaq's Y2K kit installed)
19         HP MPE
20         HP-UX 9.x, 10.20
21         IRIX 5.3, 6.2, 6.4
22         LynxOS
23         FreeBSD 3.1, 3.2
24         NetBSD 1.2, 1.3
25         OpenBSD 2.1
26         QNX
27         SCO UNIX 3.2v4.2, SCO OSE 5.0.4, UnixWare 2.0.x, 2.1.2
28         SunOS 4.1.4
29         SunOS 5.5 (Solaris 2.5)
30
31         See port/README for information on porting BIND 8 to other systems.
32
33
34 Building
35
36         If you do not have an ANSI/ISO C compiler, give up or get GCC.  The
37         one exception is the ULTRIX compiler, which isn't full ANSI C but it
38         has function prototypes and BIND works around the rest.  BIND 8 also
39         wants a C library that's ANSI/ISO standard, although it can work
40         around some common failings.
41
42         If you do not have yacc, get byacc or GNU bison.  If you do not have
43         lex, get GNU flex.  For information on where to get GNU software, see
44         http://www.fsf.org/order/ftp.html.
45
46         If you want to build outside the source pool, then
47
48                 make DST=/your/destination/here SRC=`pwd` links
49                 cd /your/destination/here
50
51         If you want to use DST=/var/obj/bind, you can simply type
52
53                 make stdlinks
54
55         Next, make sure you have no stale trash laying about
56
57                 make clean
58
59         Then, update the Makefile dependencies:
60
61                 make depend
62
63         NOTE: "make depend" is a NO-OP for some platforms, but always harmless.
64
65         Finally,
66
67                 make all
68
69         
70 Installation
71
72         To install, type
73
74                 make install
75
76         This will copy binaries to the appropriate locations for your system,
77         and install the BIND 8 library and header files under /usr/local/bind.
78
79         The following variables can be used to change where things get
80         installed:
81
82                 DESTDIR                 prefix used in front of all other
83                                         DEST variables.  The default is the
84                                         empty prefix. (for non-root installs;
85                                         not equivalent to autoconf's --prefix)
86
87                 DESTLIB                 libraries
88                 DESTINC                 include files
89                 DESTBIN                 ordinary binaries (e.g. dig, nslookup)
90                 DESTSBIN                system binaries (e.g. named)
91                 DESTEXEC                helper binaries (e.g. named-xfer)
92                 DESTHELP                place to put nslookup's help file
93                 DESTMAN                 man file location
94                 DESTETC                 configuration file
95                 DESTRUN                 PID file location and "ndc" control
96                                         channel location.  This cannot be the
97                                         same directory as DESTSBIN.
98
99         These variables should be specified in the Makefile.set for your
100         port (e.g. if you use Solaris, in src/port/solaris/Makefile.set).
101
102         Before doing 'make install', you must
103
104                 rm .settings
105
106         in the top level source directory because the build system caches
107         these variables.
108
109
110 Using BIND 8 Library Routines
111
112         Until a method to update the system's libraries is available,
113         applications wishing to use BIND 8 library routines must include
114         BIND 8 .h files, and must link with libbind.a.  E.g.
115
116                 cc -I/usr/local/bind/include -c sample.c 
117                 cc -o sample -L/usr/local/bind/lib sample.o -lbind
118
119         The default locations for libbind.a and .h files in BIND 8.1.1
120         and BIND 8.1.2 are different from those used in BIND 8.1-REL.  If
121         you did a 'make install' for BIND 8.1-REL, then you should delete
122         the files it installed.  They are:
123
124                 /usr/local/lib/libbind.a
125                 /usr/local/include/arpa/inet.h
126                 /usr/local/include/arpa/nameser.h
127                 /usr/local/include/arpa/nameser_compat.h
128                 /usr/local/include/netdb.h
129                 /usr/local/include/resolv.h
130                 /usr/local/include/sys/bitypes.h        (if it exists)
131                 /usr/local/include/sys/cdefs.h          (if it exists)
132
133
134 Operating System Notes
135
136         AIX
137
138                 Build problems have been reported with the AIX "make".
139                 We recommend using GNU "make" instead.
140
141         AIX4 with Linux Compatibility API
142
143                 May need to define HAVE_STRNDUP in
144                 port/aix4/include/port_after.h.
145         
146         FreeBSD, NetBSD, OpenBSD and BSDI
147
148                 The kit should compile even if you have intalled the KAME
149                 IPv6 kit.
150
151         HPUX
152
153                 If you are using gcc you may have to remove the '-ansi'
154                 flag.  This is gcc version dependent.
155
156                 HPUX 10.20 early versions of the HP C/ANSI C compiler do
157                 not work, version B.10.20.15 in known to work.
158
159         IRIX
160
161                 build problems have been reported w/ IRIX 6.3, res_debug.c
162                 and #include <stdlib.h>.  You may need to comment out
163                 the #include <stdlib.h> and declare
164                 "void *malloc(size_t size)" to get named to compile on 6.3.
165
166         Linux
167
168                 "make links" and "make stdlinks" cause problems on
169                 some Linux kernels because there are too many levels of
170                 symbolic links.
171
172         QNX
173
174                 Read src/port/qnx/README before trying to build.
175
176         SCO 5.0.x
177
178                 To build using gcc, copy "port/sco50/Makefile.set.gcc" to
179                 "port/sco50/Makefile.set".  To go back to using SCO's
180                 compilers, copy "port/sco50/Makefile.set.sco" to
181                 "port/sco50/Makefile.set".
182
183         Solaris
184
185                 We've tested with Sun's compilers, yacc, and lex, and also
186                 with gcc, byacc, and flex.  By default, the build will try
187                 to use gcc.  If you want to use the Sun compilers, simply
188                 copy "port/solaris/Makefile.set.sun" to
189                 "port/solaris/Makefile.set".  To go back to using gcc, copy
190                 "port/solaris/Makefile.set.gcc" to "port/solaris/Makefile.set".
191
192                 If you're using a Solaris release earlier than 2.5 and you have
193                 a large number of interfaces on your system, you many need to
194                 use a script to "limit descriptors N" (where 'N' is a
195                 suitably large number) before execing "named".  On Solaris
196                 2.5 and later, the server will do this itself.
197
198         SunOS 4.1.4
199
200                 An ANSI/ISO C compiler is required; we used gcc 2.7.2.1.
201
202         NeXT
203
204                 Read src/port/next/README.FIRST before trying to build.
205
206         MPE/iX  IPv6 is *not* supported. src/port/mpe/recvfrom.c needs to
207                 be re-written to support IPv6 if and when the OS supports
208                 IPv6.
209
210         Certain older versions of FreeBSD, NetBSD and BSD/OS
211
212                 These systems have a /bin/sh based on "ash", which doesn't
213                 handle POSIX-style quoting correctly.  Using "bash" will fix
214                 the problem.  Either run make with "SH=bash" on the command
215                 line, or edit src/Makefile and change "SH=sh" to "SH=bash".
216
217 FD_SETSIZE
218
219         The highest numbered file descriptor that the server and the resolver
220         can utilize is determined by the FD_SETSIZE value of the system.  Some
221         systems set FD_SETSIZE much smaller than the actual number of files
222         that can be opened.  On such systems, create an "fd_setsize.h" file
223         that sets FD_SETSIZE appropriately in the port's include directory.
224
225
226 User and Group ID
227
228         Specifying "-u" followed by a username or numeric user id on the
229         "named" command line will cause the server to give up all
230         privileges and become that user after the initial load of the
231         configuation file is complete.  "-g" may be used similarly to set
232         the group id.  If "-u" is specified but "-g" is not, the group
233         used will be the given user's primary group.
234
235         Here are some hints:
236
237                 Because the server will have no privileges after changing
238                 its user id, you must restart the server if you change the
239                 interfaces and ports that the server is listening on, or if
240                 you add an interface.
241
242                 If you log to files, you should create all of the log files
243                 in advance (e.g. with "touch"), and make sure they are owned
244                 by the user and group "named" will be running as.
245
246                 You'll have to edit "ndc" to get it to start the server
247                 with the appropriate flags.
248
249         Note: this feature is still experimental.
250
251
252 Chroot
253
254         "-t" followed by a directory path on the "named" command line will
255         cause the server to chroot() to that directory before it starts
256         loading the configuration file.
257
258         Setting up a chrooted area varies somewhat by operating system.  Some
259         experimentation may be necessary.  Here are some hints:
260
261                 Don't forget to install named-xfer.
262
263                 Either don't use shared libraries when you build, or do
264                 whatever is required on your OS to allow shared libraries
265                 to be used after a chroot().
266
267                 syslog() is often troublesome after chrooting.  Use the
268                 "logging" statement and log to a file instead.
269
270                 /dev/null should be in the chroot directory hierarchy.  You
271                 can usually find out the mknod parameters for a null device by
272                 looking in /dev/MAKEDEV.
273
274                 You'll have to edit "ndc" to get it to start the server
275                 with the appropriate flags, and to use the right pid file.
276
277         Note: this feature is still experimental.
278
279
280 Using the Server
281
282         Note that /etc/named.boot is long gone.  You need to make yourself an
283         /etc/named.conf (note, that ends in "conf" rather than "boot") file.
284         This file looks a lot like a C program or a modern gated.conf file;
285         there are lots of {curly braces} and it takes some getting used to.
286         You may get a lot more help from the example file (which is
287         bin/named/named.conf) than from the documentation (see ../doc/html).
288         You can convert your named.boot file to a named.conf file using
289         bin/named-bootconf/named-bootconf.
290
291         e.g.
292                 named-bootconf < /etc/named.boot > /etc/named.conf
293
294         All the files that used to be created in /var/tmp, e.g. named.run,
295         will now be created in the directory specified in the options
296         statement.  If debugging is turned on using the "-d" flag on server
297         startup, then named.run will be created in the current directory.
298
299
300 Known Dynamic DNS Bugs
301
302         If the server is master for a zone and authoritative for a child of
303         that zone, then a dynamic update to the parent will destroy the
304         delegation to the child when the parent zone is written to disk.
305         This problem will be fixed in a future release.  The only workaround
306         is to not be authoritative for child zones of a dynamic zone.
307
308         Slave servers do not forward update requests to the primary master
309         correctly.  This will be fixed in a future release.  In the meantime,
310         slaves will refuse dynamic updates.
311
312
313 Shared Libraries
314
315         Absolutely no support exists for editing the system's shared
316         libraries to update the resolver.  If you want to do that you
317         probably want to look at BIND Version 4 (see http://www.isc.org/isc/)
318         or wait a while or help out a lot.  This means you probably do not
319         want to install the library or include files into /usr/lib or
320         /usr/include, and this kit helpfully puts everything into
321         /usr/local/lib and /usr/local/include for that reason among others.
322
323
324 Notes about contrib and doc
325
326         The BIND 8 "doc" package includes HTML documentation as well as all
327         the RFC's, Internet Drafts, and "man" pages we can think of.  You may
328         need to install the doc/tmac files in your nroff/troff support
329         directory since we use the newer BSD "mandoc" system for our "man"
330         pages.
331
332         The BIND 8 "contrib" package is full of junk that you may want to
333         take a look at.  Feel free to send us more junk for future releases.
334
335
336 Bugs
337
338         Please report bugs to
339
340                 bind-bugs@isc.org