summaryrefslogtreecommitdiffstats
path: root/contrib/bind/INSTALL
blob: 42f94b04ef7a1c50dc92bce54a281ef2235f474b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
Systems it is known to compile and run on:

	BSD/OS 3.1, 4.0.1
	FreeBSD 3.3, 3.4
	RH Linux 5.2 (don't use "make links" when building, though)
	Debian GNU/Linux 2.2.9 ("unreleased")
	Digital UNIX 3.2C, 4.0, 5.0
	NetBSD/i386 1.3.2, 1.4
	Darwin 1.x (Mac OS X)
	SunOS 5.6 (Solaris 2.6), SunOS 5.7 (Solaris 7)
	SCO UnixWare 7.0, 7.0.1, 7.1
	IRIX 6.5

Systems it has been known in the past to compile and run on:

	AIX 4.x
	A/UX 3.1.1
	Digital ULTRIX 4.5 (without Compaq's Y2K kit installed)
	HP MPE
	HP-UX 9.x, 10.20
	IRIX 5.3, 6.2, 6.4
	LynxOS
	FreeBSD 3.1, 3.2
	NetBSD 1.2, 1.3
	OpenBSD 2.1
	QNX
	SCO UNIX 3.2v4.2, SCO OSE 5.0.4, UnixWare 2.0.x, 2.1.2
	SunOS 4.1.4
	SunOS 5.5 (Solaris 2.5)

	See port/README for information on porting BIND 8 to other systems.


Building

	If you do not have an ANSI/ISO C compiler, give up or get GCC.  The
	one exception is the ULTRIX compiler, which isn't full ANSI C but it
	has function prototypes and BIND works around the rest.  BIND 8 also
	wants a C library that's ANSI/ISO standard, although it can work
	around some common failings.

	If you do not have yacc, get byacc or GNU bison.  If you do not have
	lex, get GNU flex.  For information on where to get GNU software, see
	http://www.fsf.org/order/ftp.html.

	If you want to build outside the source pool, then

		make DST=/your/destination/here SRC=`pwd` links
		cd /your/destination/here

	If you want to use DST=/var/obj/bind, you can simply type

		make stdlinks

	Next, make sure you have no stale trash laying about

		make clean

	Then, update the Makefile dependencies:

		make depend

	NOTE: "make depend" is a NO-OP for some platforms, but always harmless.

	Finally,

		make all

	
Installation

	To install, type

		make install

	This will copy binaries to the appropriate locations for your system,
	and install the BIND 8 library and header files under /usr/local/bind.

	The following variables can be used to change where things get
	installed:

		DESTDIR			prefix used in front of all other
					DEST variables.  The default is the
					empty prefix. (for non-root installs;
					not equivalent to autoconf's --prefix)

		DESTLIB			libraries
		DESTINC			include files
		DESTBIN			ordinary binaries (e.g. dig, nslookup)
		DESTSBIN		system binaries (e.g. named)
		DESTEXEC		helper binaries (e.g. named-xfer)
		DESTHELP		place to put nslookup's help file
		DESTMAN			man file location
		DESTETC			configuration file
		DESTRUN			PID file location and "ndc" control
					channel location.  This cannot be the
					same directory as DESTSBIN.

	These variables should be specified in the Makefile.set for your
	port (e.g. if you use Solaris, in src/port/solaris/Makefile.set).

	Before doing 'make install', you must

		rm .settings

	in the top level source directory because the build system caches
	these variables.


Using BIND 8 Library Routines

	Until a method to update the system's libraries is available,
	applications wishing to use BIND 8 library routines must include
	BIND 8 .h files, and must link with libbind.a.  E.g.

		cc -I/usr/local/bind/include -c sample.c 
		cc -o sample -L/usr/local/bind/lib sample.o -lbind

	The default locations for libbind.a and .h files in BIND 8.1.1
	and BIND 8.1.2 are different from those used in BIND 8.1-REL.  If
	you did a 'make install' for BIND 8.1-REL, then you should delete
	the files it installed.  They are:

		/usr/local/lib/libbind.a
		/usr/local/include/arpa/inet.h
		/usr/local/include/arpa/nameser.h
		/usr/local/include/arpa/nameser_compat.h
		/usr/local/include/netdb.h
		/usr/local/include/resolv.h
		/usr/local/include/sys/bitypes.h	(if it exists)
		/usr/local/include/sys/cdefs.h		(if it exists)


Operating System Notes

	AIX

		Build problems have been reported with the AIX "make".
		We recommend using GNU "make" instead.

	AIX4 with Linux Compatibility API

		May need to define HAVE_STRNDUP in
		port/aix4/include/port_after.h.
	
	FreeBSD, NetBSD, OpenBSD and BSDI

		The kit should compile even if you have intalled the KAME
		IPv6 kit.

	HPUX

		If you are using gcc you may have to remove the '-ansi'
		flag.  This is gcc version dependent.

		HPUX 10.20 early versions of the HP C/ANSI C compiler do
		not work, version B.10.20.15 in known to work.

	IRIX

		build problems have been reported w/ IRIX 6.3, res_debug.c
		and #include <stdlib.h>.  You may need to comment out
		the #include <stdlib.h> and declare
		"void *malloc(size_t size)" to get named to compile on 6.3.

	Linux

		"make links" and "make stdlinks" cause problems on
		some Linux kernels because there are too many levels of
		symbolic links.

	QNX

		Read src/port/qnx/README before trying to build.

	SCO 5.0.x

		To build using gcc, copy "port/sco50/Makefile.set.gcc" to
		"port/sco50/Makefile.set".  To go back to using SCO's
		compilers, copy "port/sco50/Makefile.set.sco" to
		"port/sco50/Makefile.set".

	Solaris

		We've tested with Sun's compilers, yacc, and lex, and also
		with gcc, byacc, and flex.  By default, the build will try
		to use gcc.  If you want to use the Sun compilers, simply
		copy "port/solaris/Makefile.set.sun" to
		"port/solaris/Makefile.set".  To go back to using gcc, copy
		"port/solaris/Makefile.set.gcc" to "port/solaris/Makefile.set".

		If you're using a Solaris release earlier than 2.5 and you have
		a large number of interfaces on your system, you many need to
		use a script to "limit descriptors N" (where 'N' is a
		suitably large number) before execing "named".  On Solaris
		2.5 and later, the server will do this itself.

	SunOS 4.1.4

		An ANSI/ISO C compiler is required; we used gcc 2.7.2.1.

	NeXT

		Read src/port/next/README.FIRST before trying to build.

	MPE/iX	IPv6 is *not* supported. src/port/mpe/recvfrom.c needs to
		be re-written to support IPv6 if and when the OS supports
		IPv6.

	Certain older versions of FreeBSD, NetBSD and BSD/OS

		These systems have a /bin/sh based on "ash", which doesn't
		handle POSIX-style quoting correctly.  Using "bash" will fix
		the problem.  Either run make with "SH=bash" on the command
		line, or edit src/Makefile and change "SH=sh" to "SH=bash".

FD_SETSIZE

	The highest numbered file descriptor that the server and the resolver
	can utilize is determined by the FD_SETSIZE value of the system.  Some
	systems set FD_SETSIZE much smaller than the actual number of files
	that can be opened.  On such systems, create an "fd_setsize.h" file
	that sets FD_SETSIZE appropriately in the port's include directory.


User and Group ID

	Specifying "-u" followed by a username or numeric user id on the
	"named" command line will cause the server to give up all
	privileges and become that user after the initial load of the
	configuation file is complete.  "-g" may be used similarly to set
	the group id.  If "-u" is specified but "-g" is not, the group
	used will be the given user's primary group.

	Here are some hints:

		Because the server will have no privileges after changing
		its user id, you must restart the server if you change the
		interfaces and ports that the server is listening on, or if
		you add an interface.

		If you log to files, you should create all of the log files
		in advance (e.g. with "touch"), and make sure they are owned
		by the user and group "named" will be running as.

		You'll have to edit "ndc" to get it to start the server
		with the appropriate flags.

	Note: this feature is still experimental.


Chroot

	"-t" followed by a directory path on the "named" command line will
	cause the server to chroot() to that directory before it starts
	loading the configuration file.

	Setting up a chrooted area varies somewhat by operating system.  Some
	experimentation may be necessary.  Here are some hints:

		Don't forget to install named-xfer.

		Either don't use shared libraries when you build, or do
		whatever is required on your OS to allow shared libraries
		to be used after a chroot().

		syslog() is often troublesome after chrooting.  Use the
		"logging" statement and log to a file instead.

		/dev/null should be in the chroot directory hierarchy.  You
		can usually find out the mknod parameters for a null device by
		looking in /dev/MAKEDEV.

		You'll have to edit "ndc" to get it to start the server
		with the appropriate flags, and to use the right pid file.

	Note: this feature is still experimental.


Using the Server

	Note that /etc/named.boot is long gone.  You need to make yourself an
	/etc/named.conf (note, that ends in "conf" rather than "boot") file.
	This file looks a lot like a C program or a modern gated.conf file;
	there are lots of {curly braces} and it takes some getting used to.
	You may get a lot more help from the example file (which is
	bin/named/named.conf) than from the documentation (see ../doc/html).
	You can convert your named.boot file to a named.conf file using
	bin/named-bootconf/named-bootconf.

	e.g.
		named-bootconf < /etc/named.boot > /etc/named.conf

	All the files that used to be created in /var/tmp, e.g. named.run,
	will now be created in the directory specified in the options
	statement.  If debugging is turned on using the "-d" flag on server
	startup, then named.run will be created in the current directory.


Known Dynamic DNS Bugs

	If the server is master for a zone and authoritative for a child of
	that zone, then a dynamic update to the parent will destroy the
	delegation to the child when the parent zone is written to disk.
	This problem will be fixed in a future release.  The only workaround
	is to not be authoritative for child zones of a dynamic zone.

	Slave servers do not forward update requests to the primary master
	correctly.  This will be fixed in a future release.  In the meantime,
	slaves will refuse dynamic updates.


Shared Libraries

	Absolutely no support exists for editing the system's shared
	libraries to update the resolver.  If you want to do that you
	probably want to look at BIND Version 4 (see http://www.isc.org/isc/)
	or wait a while or help out a lot.  This means you probably do not
	want to install the library or include files into /usr/lib or
	/usr/include, and this kit helpfully puts everything into
	/usr/local/lib and /usr/local/include for that reason among others.


Notes about contrib and doc

	The BIND 8 "doc" package includes HTML documentation as	well as all
	the RFC's, Internet Drafts, and "man" pages we can think of.  You may
	need to install the doc/tmac files in your nroff/troff support
	directory since we use the newer BSD "mandoc" system for our "man"
	pages.

	The BIND 8 "contrib" package is full of junk that you may want to
	take a look at.  Feel free to send us more junk for future releases.


Bugs

	Please report bugs to

		bind-bugs@isc.org
OpenPOWER on IntegriCloud