source: server/major/bind.xml@ 13a9e84e

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 13a9e84e was 37c43561, checked in by Bruce Dubbs <bdubbs@…>, 11 years ago

Update to bind-9.9.3-p2

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@11527 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 21.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY bind-download-http " ">
8 <!ENTITY bind-download-ftp
9 "ftp://ftp.isc.org/isc/bind9/&bind-version;/bind-&bind-version;.tar.gz">
10 <!ENTITY bind-md5sum "943f6de6bfdfd821aa444242c02c1322">
11 <!ENTITY bind-size "7.1 MB">
12 <!ENTITY bind-buildsize "125 MB (additional 34 MB to run the test suite)">
13 <!ENTITY bind-time "1.1 SBU (additional 15 minutes, processor independent, to
14 run the complete test suite)">
15]>
16
17<sect1 id="bind" xreflabel="BIND-&bind-version;">
18 <?dbhtml filename="bind.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>BIND-&bind-version;</title>
26
27 <indexterm zone="bind">
28 <primary sortas="a-BIND">BIND</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to BIND</title>
33
34 <para>The <application>BIND</application> package provides a DNS server
35 and client utilities. If you are only interested in the utilities, refer
36 to the <xref linkend="bind-utils"/>.</para>
37
38 &lfs73_checked;
39
40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
43 <para>Download (HTTP): <ulink url="&bind-download-http;"/></para>
44 </listitem>
45 <listitem>
46 <para>Download (FTP): <ulink url="&bind-download-ftp;"/></para>
47 </listitem>
48 <listitem>
49 <para>Download MD5 sum: &bind-md5sum;</para>
50 </listitem>
51 <listitem>
52 <para>Download size: &bind-size;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated disk space required: &bind-buildsize;</para>
56 </listitem>
57 <listitem>
58 <para>Estimated build time: &bind-time;</para>
59 </listitem>
60 </itemizedlist>
61
62 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
63 <itemizedlist spacing='compact'>
64 <listitem>
65 <para>Optional patch (if net-tools is not installed):
66 <ulink
67 url="&patch-root;/bind-&bind-version;-use_iproute2-1.patch"/></para>
68 </listitem>
69 </itemizedlist>
70
71 <bridgehead renderas="sect3">BIND Dependencies</bridgehead>
72
73 <bridgehead renderas="sect4">Optional</bridgehead>
74 <para role="optional">
75 <xref linkend="libcap2"/>,
76 <xref linkend="libxml2"/>,
77 <xref linkend="mitkrb"/>, and
78 <xref linkend="openssl"/>
79 </para>
80
81 <bridgehead renderas="sect4">Optional (to run the test suite)</bridgehead>
82 <para role="optional">
83 <xref linkend="perl-net-dns"/>, and
84 <xref linkend="net-tools"/> (you may omit net-tools by using the optional
85 patch to utilize iproute2, but the IPv6 tests will fail)
86 </para>
87
88 <bridgehead renderas="sect4">Optional (to rebuild the documentation)</bridgehead>
89 <para role="optional">
90 <xref linkend="doxygen"/>,
91 <xref linkend="texlive"/>, and
92 <xref linkend="libxslt"/>
93 </para>
94
95 <para condition="html" role="usernotes">User Notes:
96 <ulink url="&blfs-wiki;/bind"/></para>
97
98 </sect2>
99
100 <sect2 role="installation">
101 <title>Installation of BIND</title>
102
103 <para>If you have chosen not to install net-tools, apply the iproute2
104 patch with the following command:</para>
105
106<screen><userinput>patch -Np1 -i ../bind-&bind-version;-use_iproute2-1.patch</userinput></screen>
107
108<!--
109 <para>If you want to <command>configure</command>
110 <application>BIND</application> with the option
111 <option>- -disable-static</option> fix a bug in one of the Makefiles:</para>
112 <!- - this is a bug in bind-9.8.1 that wasn't in bind-9.8.0 - ->
113
114<screen><userinput>sed -i 's# driver.o# .libs/driver.o#' bin/tests/system/dlzexternal/Makefile.in</userinput></screen>
115-->
116 <para>Install <application>BIND</application> by running the
117 following commands:</para>
118
119<screen><userinput>./configure --prefix=/usr \
120 --sysconfdir=/etc \
121 --localstatedir=/var \
122 --mandir=/usr/share/man \
123 --enable-threads \
124 --with-libtool \
125 --disable-static &amp;&amp;
126make</userinput></screen>
127
128 <para>Issue the following commands to run the complete suite of tests.
129 First, as the <systemitem class="username">root</systemitem> user, set up
130 some test interfaces:</para>
131
132<screen role="root"><userinput>bin/tests/system/ifconfig.sh up</userinput></screen>
133
134 <para>Now run the test suite as an unprivileged user:</para>
135
136<screen><userinput>make check 2&gt;&amp;1 | tee check.log</userinput></screen>
137
138 <para>Again as <systemitem class="username">root</systemitem>, clean up the
139 test interfaces:</para>
140
141<screen role="root"><userinput>bin/tests/system/ifconfig.sh down</userinput></screen>
142
143 <para>Issue the following command to check that all 185 tests
144 ran successfully:</para>
145
146<screen><userinput>grep "R:PASS" check.log | wc -l</userinput></screen>
147
148 <para>Finally, install the package as the <systemitem
149 class="username">root</systemitem> user:</para>
150
151<screen role="root"><userinput>make install &amp;&amp;
152chmod -v 0755 /usr/lib/lib{bind9,isc{,cc,cfg},lwres,dns}.so.*.?.? &amp;&amp;
153
154install -v -m755 -d /usr/share/doc/bind-&bind-version;/{arm,misc} &amp;&amp;
155install -v -m644 doc/arm/*.html \
156 /usr/share/doc/bind-&bind-version;/arm &amp;&amp;
157install -v -m644 \
158 doc/misc/{dnssec,ipv6,migrat*,options,rfc-compliance,roadmap,sdb} \
159 /usr/share/doc/bind-&bind-version;/misc</userinput></screen>
160 </sect2>
161
162 <sect2 role="commands">
163 <title>Command Explanations</title>
164
165 <para><parameter>--sysconfdir=/etc</parameter>: This parameter forces
166 <application>BIND</application> to look for configuration
167 files in <filename class='directory'>/etc</filename> instead of
168 <filename class='directory'>/usr/etc</filename>.</para>
169
170 <para><parameter>--enable-threads</parameter>: This parameter enables
171 multi-threading capability.</para>
172
173 <para><parameter>--with-libtool</parameter>: This parameter forces the
174 building of dynamic libraries and links the installed binaries to these
175 libraries.</para>
176
177 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
178 href="../../xincludes/static-libraries.xml"/>
179
180 <para><command>chmod 755
181 /usr/lib/{lib{bind9,isc{,cc,cfg},lwres,dns}.so.*.?.?}</command>:
182 Enable the execute bit to prevent a warning when using
183 <command>ldd</command> to check library dependencies.</para>
184
185 <para><command>cd doc; install ...</command>: These commands install
186 additional package documentation. Omit any or all of these commands if
187 desired.</para>
188 </sect2>
189
190 <sect2 role="configuration">
191 <title>Configuring BIND</title>
192
193 <sect3 id="bind-config">
194 <title>Config files</title>
195
196 <para><filename>named.conf</filename>,
197 <filename>root.hints</filename>,
198 <filename>127.0.0</filename>,
199 <filename>rndc.conf</filename> and
200 <filename>resolv.conf</filename></para>
201
202 <indexterm zone="bind bind-config">
203 <primary sortas="e-etc-named.conf">/etc/named.conf</primary>
204 </indexterm>
205
206 <indexterm zone="bind bind-config">
207 <primary sortas="e-etc-rndc.conf">/etc/rndc.conf</primary>
208 </indexterm>
209
210 <indexterm zone="bind bind-config">
211 <primary sortas="e-etc-resolv.conf">/etc/resolv.conf</primary>
212 </indexterm>
213
214 <indexterm zone="bind bind-config">
215 <primary
216 sortas="e-etc-namedb-root.hints">/etc/namedb/root.hints</primary>
217 </indexterm>
218
219 <indexterm zone="bind bind-config">
220 <primary
221 sortas="e-etc-namedb-pz-127.0.0.0">/etc/namedb/pz/127.0.0.0</primary>
222 </indexterm>
223 </sect3>
224
225 <sect3>
226 <title>Configuration Information</title>
227
228 <para><application>BIND</application> will be configured to run in a
229 <command>chroot</command> jail as an unprivileged user (<systemitem
230 class="username">named</systemitem>). This configuration is more secure
231 in that a DNS compromise can only affect a few files in the <systemitem
232 class="username">named</systemitem> user's <envar>HOME</envar>
233 directory.</para>
234
235 <para>Create the unprivileged user and group <systemitem
236 class="username">named</systemitem>:</para>
237
238<screen role="root"><userinput>groupadd -g 20 named &amp;&amp;
239useradd -c "BIND Owner" -g named -s /bin/false -u 20 named &amp;&amp;
240install -d -m770 -o named -g named /srv/named</userinput></screen>
241
242 <para>Set up some files, directories and devices needed by
243 <application>BIND</application>:</para>
244
245<screen role="root"><userinput>cd /srv/named &amp;&amp;
246mkdir -p dev etc/namedb/{slave,pz} usr/lib/engines var/run/named &amp;&amp;
247mknod /srv/named/dev/null c 1 3 &amp;&amp;
248mknod /srv/named/dev/random c 1 8 &amp;&amp;
249chmod 666 /srv/named/dev/{null,random} &amp;&amp;
250cp /etc/localtime etc &amp;&amp;
251touch /srv/named/managed-keys.bind &amp;&amp;
252cp /usr/lib/engines/libgost.so usr/lib/engines &amp;&amp;
253[ $(uname -m) = x86_64 ] &amp;&amp; ln -sv lib usr/lib64</userinput></screen>
254
255 <para>The <filename>rndc.conf</filename> file contains information for
256 controlling <command>named</command> operations with the
257 <command>rndc</command> utility. Generate a key for use in the <filename>named.conf</filename> and <filename>rdnc.conf</filename> with the
258 <command>rndc-confgen</command> command:</para>
259
260<screen role="root"><userinput>rndc-confgen -r /dev/urandom -b 512 > /etc/rndc.conf &amp;&amp;
261sed '/conf/d;/^#/!d;s:^# ::' /etc/rndc.conf > /srv/named/etc/named.conf</userinput></screen>
262
263 <para>Complete the <filename>named.conf</filename> file from which
264 <command>named</command> will read the location of zone files, root
265 name servers and secure DNS keys:</para>
266
267<screen role="root"><?dbfo keep-together="auto"?><userinput>cat &gt;&gt; /srv/named/etc/named.conf &lt;&lt; "EOF"
268<literal>options {
269 directory "/etc/namedb";
270 pid-file "/var/run/named.pid";
271 statistics-file "/var/run/named.stats";
272
273};
274zone "." {
275 type hint;
276 file "root.hints";
277};
278zone "0.0.127.in-addr.arpa" {
279 type master;
280 file "pz/127.0.0";
281};
282
283// Bind 9 now logs by default through syslog (except debug).
284// These are the default logging rules.
285
286logging {
287 category default { default_syslog; default_debug; };
288 category unmatched { null; };
289
290 channel default_syslog {
291 syslog daemon; // send to syslog's daemon
292 // facility
293 severity info; // only send priority info
294 // and higher
295 };
296
297 channel default_debug {
298 file "named.run"; // write to named.run in
299 // the working directory
300 // Note: stderr is used instead
301 // of "named.run"
302 // if the server is started
303 // with the '-f' option.
304 severity dynamic; // log at the server's
305 // current debug level
306 };
307
308 channel default_stderr {
309 stderr; // writes to stderr
310 severity info; // only send priority info
311 // and higher
312 };
313
314 channel null {
315 null; // toss anything sent to
316 // this channel
317 };
318};</literal>
319EOF</userinput></screen>
320
321 <para>Create a zone file with the following contents:</para>
322
323<screen role="root"><userinput>cat &gt; /srv/named/etc/namedb/pz/127.0.0 &lt;&lt; "EOF"
324<literal>$TTL 3D
325@ IN SOA ns.local.domain. hostmaster.local.domain. (
326 1 ; Serial
327 8H ; Refresh
328 2H ; Retry
329 4W ; Expire
330 1D) ; Minimum TTL
331 NS ns.local.domain.
3321 PTR localhost.</literal>
333EOF</userinput></screen>
334
335 <para>Create the <filename>root.hints</filename> file with the following
336 commands:</para>
337
338 <note>
339 <para>Caution must be used to ensure there are no leading spaces in
340 this file.</para>
341 </note>
342
343<screen role="root"><userinput>cat &gt; /srv/named/etc/namedb/root.hints &lt;&lt; "EOF"
344<literal>. 6D IN NS A.ROOT-SERVERS.NET.
345. 6D IN NS B.ROOT-SERVERS.NET.
346. 6D IN NS C.ROOT-SERVERS.NET.
347. 6D IN NS D.ROOT-SERVERS.NET.
348. 6D IN NS E.ROOT-SERVERS.NET.
349. 6D IN NS F.ROOT-SERVERS.NET.
350. 6D IN NS G.ROOT-SERVERS.NET.
351. 6D IN NS H.ROOT-SERVERS.NET.
352. 6D IN NS I.ROOT-SERVERS.NET.
353. 6D IN NS J.ROOT-SERVERS.NET.
354. 6D IN NS K.ROOT-SERVERS.NET.
355. 6D IN NS L.ROOT-SERVERS.NET.
356. 6D IN NS M.ROOT-SERVERS.NET.
357A.ROOT-SERVERS.NET. 6D IN A 198.41.0.4
358B.ROOT-SERVERS.NET. 6D IN A 192.228.79.201
359C.ROOT-SERVERS.NET. 6D IN A 192.33.4.12
360D.ROOT-SERVERS.NET. 6D IN A 199.7.91.13
361E.ROOT-SERVERS.NET. 6D IN A 192.203.230.10
362F.ROOT-SERVERS.NET. 6D IN A 192.5.5.241
363G.ROOT-SERVERS.NET. 6D IN A 192.112.36.4
364H.ROOT-SERVERS.NET. 6D IN A 128.63.2.53
365I.ROOT-SERVERS.NET. 6D IN A 192.36.148.17
366J.ROOT-SERVERS.NET. 6D IN A 192.58.128.30
367K.ROOT-SERVERS.NET. 6D IN A 193.0.14.129
368L.ROOT-SERVERS.NET. 6D IN A 199.7.83.42
369M.ROOT-SERVERS.NET. 6D IN A 202.12.27.33</literal>
370EOF</userinput></screen>
371
372 <para>The <filename>root.hints</filename> file is a list of root
373 name servers. This file must be updated periodically with the
374 <command>dig</command> utility. A current copy of root.hints can be
375 obtained from <ulink url="ftp://rs.internic.net/domain/named.root" />.
376 Consult the <ulink url="http://www.bind9.net/Bv9ARM.html">BIND 9
377 Administrator Reference Manual</ulink> for details.</para>
378
379 <para>Create or modify <filename>resolv.conf</filename> to use the new
380 name server with the following commands:</para>
381
382 <note>
383 <para>Replace <replaceable>&lt;yourdomain.com&gt;</replaceable> with
384 your own valid domain name.</para>
385 </note>
386
387<screen role="root"><userinput>cp /etc/resolv.conf /etc/resolv.conf.bak &amp;&amp;
388cat &gt; /etc/resolv.conf &lt;&lt; "EOF"
389<literal>search <replaceable>&lt;yourdomain.com&gt;</replaceable>
390nameserver 127.0.0.1</literal>
391EOF</userinput></screen>
392
393 <para>Set permissions on the <command>chroot</command> jail with the
394 following command:</para>
395
396<screen role="root"><userinput>chown -R named:named /srv/named</userinput></screen>
397
398 </sect3>
399
400 <sect3 id="bind-init">
401 <title>Boot Script</title>
402
403 <para>To start the DNS server at boot, install the
404 <filename>/etc/rc.d/init.d/bind</filename> init script included
405 in the <xref linkend="bootscripts"/> package.</para>
406
407 <indexterm zone="bind bind-init">
408 <primary sortas="f-bind">bind</primary>
409 </indexterm>
410
411<screen role="root"><userinput>make install-bind</userinput></screen>
412
413 <para>Now start <application>BIND</application> with
414 the new boot script:</para>
415
416<screen role="root"><userinput>/etc/rc.d/init.d/bind start</userinput></screen>
417
418 </sect3>
419
420 <sect3>
421 <title>Testing BIND</title>
422
423 <para>Test out the new <application>BIND</application> 9 installation.
424 First query the local host address with <command>dig</command>:</para>
425
426<screen><userinput>dig -x 127.0.0.1</userinput></screen>
427
428 <para>Now try an external name lookup, taking note of the speed
429 difference in repeated lookups due to the caching. Run the
430 <command>dig</command> command twice on the same address:</para>
431
432<screen><userinput>dig www.&lfs-domainname; &amp;&amp;
433dig www.&lfs-domainname;</userinput></screen>
434
435 <para>You can see almost instantaneous results with the named caching
436 lookups. Consult the <application>BIND</application> Administrator
437 Reference Manual located at <filename>doc/arm/Bv9ARM.html</filename>
438 in the package source tree, for further configuration options.</para>
439
440 </sect3>
441
442 </sect2>
443
444 <sect2 role="content">
445 <title>Contents</title>
446
447 <segmentedlist>
448 <segtitle>Installed Programs</segtitle>
449 <segtitle>Installed Libraries</segtitle>
450 <segtitle>Installed Directories</segtitle>
451
452 <seglistitem>
453 <seg>arpaname, ddns-confgen, dig, dnssec-checkds, dnssec-coverage,
454 dnssec-dsfromkey, dnssec-keyfromlabel, dnssec-keygen, dnssec-revoke,
455 dnssec-settime, dnssec-signzone, dnssec-verify, genrandom, host,
456 isc-config.sh, isc-hmac-fixup, lwresd, named, named-checkconf,
457 named-checkzone, named-journalprint, nsec3hash, nslookup, nsupdate, rndc,
458 and rndc-confgen</seg>
459 <seg>libbind9.so, libdns.so, libisccc.so, libisccfg.so, libisc.so, and
460 liblwres.so</seg>
461 <seg>/srv/named, /usr/include/bind9, /usr/include/dns, /usr/include/dst,
462 /usr/include/isc, /usr/include/isccc, /usr/include/isccfg,
463 /usr/include/lwres, and /usr/share/doc/bind-&bind-version;</seg>
464 </seglistitem>
465 </segmentedlist>
466
467 <variablelist>
468 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
469 <?dbfo list-presentation="list"?>
470 <?dbhtml list-presentation="table"?>
471
472 <varlistentry id="dig">
473 <term><command>dig</command></term>
474 <listitem>
475 <para>interrogates DNS servers.</para>
476 <indexterm zone="bind dig">
477 <primary sortas="b-dig">dig</primary>
478 </indexterm>
479 </listitem>
480 </varlistentry>
481
482 <varlistentry id="dnssec-keygen">
483 <term><command>dnssec-keygen</command></term>
484 <listitem>
485 <para>is a key generator for secure DNS.</para>
486 <indexterm zone="bind dnssec-keygen">
487 <primary sortas="b-dnssec-keygen">dnssec-keygen</primary>
488 </indexterm>
489 </listitem>
490 </varlistentry>
491
492 <varlistentry id="dnssec-signzone">
493 <term><command>dnssec-signzone</command></term>
494 <listitem>
495 <para>generates signed versions of zone files.</para>
496 <indexterm zone="bind dnssec-signzone">
497 <primary sortas="b-dnssec-signzone">dnssec-signzone</primary>
498 </indexterm>
499 </listitem>
500 </varlistentry>
501
502 <varlistentry id="host">
503 <term><command>host</command></term>
504 <listitem>
505 <para>is a utility for DNS lookups.</para>
506 <indexterm zone="bind host">
507 <primary sortas="b-host">host</primary>
508 </indexterm>
509 </listitem>
510 </varlistentry>
511
512 <varlistentry id="lwresd">
513 <term><command>lwresd</command></term>
514 <listitem>
515 <para>is a caching-only name server for local process use.</para>
516 <indexterm zone="bind lwresd">
517 <primary sortas="b-lwresd">lwresd</primary>
518 </indexterm>
519 </listitem>
520 </varlistentry>
521
522 <varlistentry id="named">
523 <term><command>named</command></term>
524 <listitem>
525 <para>is the name server daemon.</para>
526 <indexterm zone="bind named">
527 <primary sortas="b-named">named</primary>
528 </indexterm>
529 </listitem>
530 </varlistentry>
531
532 <varlistentry id="named-checkconf">
533 <term><command>named-checkconf</command></term>
534 <listitem>
535 <para>checks the syntax of <filename>named.conf</filename>
536 files.</para>
537 <indexterm zone="bind named-checkconf">
538 <primary sortas="b-named-checkconf">named-checkconf</primary>
539 </indexterm>
540 </listitem>
541 </varlistentry>
542
543 <varlistentry id="named-checkzone">
544 <term><command>named-checkzone</command></term>
545 <listitem>
546 <para>checks zone file validity.</para>
547 <indexterm zone="bind named-checkzone">
548 <primary sortas="b-named-checkzone">named-checkzone</primary>
549 </indexterm>
550 </listitem>
551 </varlistentry>
552
553 <varlistentry id="nslookup">
554 <term><command>nslookup</command></term>
555 <listitem>
556 <para>is a program used to query Internet domain nameservers.</para>
557 <indexterm zone="bind nslookup">
558 <primary sortas="b-nslookup">nslookup</primary>
559 </indexterm>
560 </listitem>
561 </varlistentry>
562
563 <varlistentry id="nsupdate">
564 <term><command>nsupdate</command></term>
565 <listitem>
566 <para>is used to submit DNS update requests.</para>
567 <indexterm zone="bind nsupdate">
568 <primary sortas="b-nsupdate">nsupdate</primary>
569 </indexterm>
570 </listitem>
571 </varlistentry>
572
573 <varlistentry id="rndc">
574 <term><command>rndc</command></term>
575 <listitem>
576 <para>controls the operation of <application>BIND</application>.</para>
577 <indexterm zone="bind rndc">
578 <primary sortas="b-rndc">rndc</primary>
579 </indexterm>
580 </listitem>
581 </varlistentry>
582
583 <varlistentry id="rndc-confgen">
584 <term><command>rndc-confgen</command></term>
585 <listitem>
586 <para>generates <filename>rndc.conf</filename> files.</para>
587 <indexterm zone="bind rndc-confgen">
588 <primary sortas="b-rndc-confgen">rndc-confgen</primary>
589 </indexterm>
590 </listitem>
591 </varlistentry>
592
593 </variablelist>
594
595 </sect2>
596
597</sect1>
Note: See TracBrowser for help on using the repository browser.