source: server/major/bind.xml@ c80953c

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 c80953c was c80953c, checked in by Bruce Dubbs <bdubbs@…>, 11 years ago

Update to ISC Bind 9.9.2
Update to PHP 5.4.8

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

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