source: server/other/bind.xml@ 0b5a693

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.0 6.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 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 0b5a693 was 0b5a693, checked in by Randy McMurchy <randy@…>, 19 years ago

Final round of renaming the package-name entities

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

  • Property mode set to 100644
File size: 16.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7<!ENTITY bind-download-http "http://gd.tuwien.ac.at/infosys/servers/isc/bind9/&bind-version;/bind-&bind-version;.tar.gz">
8<!ENTITY bind-download-ftp "ftp://ftp.isc.org/isc/bind9/&bind-version;/bind-&bind-version;.tar.gz">
9<!ENTITY bind-size "4.6 MB">
10<!ENTITY bind-buildsize "87 MB">
11<!ENTITY bind-time "1.87 SBU (additional 4.14 SBU to run the complete test suite)">
12]>
13
14<sect1 id="bind" xreflabel="BIND-&bind-version;">
15<sect1info>
16<othername>$LastChangedBy$</othername>
17<date>$Date$</date>
18</sect1info>
19<?dbhtml filename="bind.html"?>
20<title><acronym>BIND</acronym>-&bind-version;</title>
21
22<sect2>
23<title>Introduction to
24<application><acronym>BIND</acronym></application></title>
25
26<para>The <application><acronym>BIND</acronym></application> package
27provides a <acronym>DNS</acronym> server and client utilities. If you
28are only interested in the utilities, refer to the
29<xref linkend="bind-utils"/>.</para>
30
31<sect3><title>Package information</title>
32<itemizedlist spacing='compact'>
33<listitem><para>Download (HTTP):
34<ulink url="&bind-download-http;"/></para></listitem>
35<listitem><para>Download (FTP):
36<ulink url="&bind-download-ftp;"/></para></listitem>
37<listitem><para>Download size:
38&bind-size;</para></listitem>
39<listitem><para>Estimated disk space required:
40&bind-buildsize;</para></listitem>
41<listitem><para>Estimated build time:
42&bind-time;</para></listitem></itemizedlist>
43</sect3>
44
45<sect3><title><application><acronym>BIND</acronym></application>
46dependencies</title>
47<sect4><title>Optional</title>
48<para><xref linkend="openssl"/></para>
49</sect4>
50
51<sect4><title>Optional (to run the full test suite)</title>
52<para><xref linkend="net-tools"/> (for <command>ifconfig</command>) and
53<xref linkend="perl-modules"/>: Net-DNS</para>
54</sect4>
55
56<sect4><title>Optional (to [re]build documentation)</title>
57<para><xref linkend="openjade"/>,
58<xref linkend="jadetex"/>,
59<xref linkend="docbook-dsssl"/></para>
60</sect4>
61</sect3>
62
63</sect2>
64
65<sect2>
66<title>Installation of
67<application><acronym>BIND</acronym></application></title>
68
69<para>Install <application><acronym>BIND</acronym></application> by
70running the following commands:</para>
71
72<screen><userinput><command>sed -i -e "s/dsssl-stylesheets/&amp;-1.78/g" configure &amp;&amp;
73./configure --prefix=/usr --sysconfdir=/etc \
74 --enable-threads --with-libtool &amp;&amp;
75make &amp;&amp;
76make install &amp;&amp;
77chmod 755 \
78 /usr/lib/{lib{bind9,isc{,cc,cfg},lwres}.so.?.?.?,libdns.so.20.0.0} &amp;&amp;
79mv /usr/share/man/man8/named.conf.5 /usr/share/man/man5 &amp;&amp;
80cd doc &amp;&amp;
81install -d -m755 /usr/share/doc/bind-9.3.0/{arm,draft,misc,rfc} &amp;&amp;
82install -m644 arm/*.html \
83 /usr/share/doc/bind-9.3.0/arm &amp;&amp;
84install -m644 draft/*.txt \
85 /usr/share/doc/bind-9.3.0/draft &amp;&amp;
86install -m644 rfc/* \
87 /usr/share/doc/bind-9.3.0/rfc &amp;&amp;
88install -m644 \
89 misc/{dnssec,ipv6,migrat*,options,rfc-compliance,roadmap,sdb} \
90 /usr/share/doc/bind-9.3.0/misc</command></userinput></screen>
91
92<para>In order to run the complete test suite before installing the
93package, you need to set up some dummy interfaces (requires
94<command>ifconfig</command>). Issue the following commands to run the
95complete suite of tests:</para>
96
97<screen><userinput><command>bin/tests/system/ifconfig.sh up &amp;&amp;
98make check &gt;check.log 2&gt;&amp;1 &amp;&amp;
99bin/tests/system/ifconfig.sh down</command></userinput></screen>
100
101<para>If desired, issue the following command to ensure all 145 tests ran
102successfully:</para>
103
104<screen><userinput><command>grep "R:PASS" check.log | wc -l</command></userinput></screen>
105
106</sect2>
107
108<sect2>
109<title>Command explanations</title>
110
111<para><command>sed -i -e ... configure</command>: This command forces
112<command>configure</command> to look for the <acronym>DSSSL</acronym>
113stylesheets in the standard <acronym>BLFS</acronym> location.</para>
114
115<para><parameter>--sysconfdir=/etc</parameter>: This parameter forces
116<application><acronym>BIND</acronym></application> to look for configuration
117files in <filename class='directory'>/etc</filename> instead of
118<filename class='directory'>/usr/etc</filename>.</para>
119
120<para><parameter>--enable-threads</parameter>: This parameter enables
121multi-threading capability.</para>
122
123<para><parameter>--with-libtool</parameter>: This parameter forces the
124building of dynamic libraries and links the installed binaries to these
125libraries.</para>
126
127<para><command>cd doc; install ...</command>: These commands install the
128additional package documentation. Optionally, omit any or all of these
129commands.</para>
130
131</sect2>
132
133<sect2>
134<title>Configuring
135<application><acronym>BIND</acronym></application></title>
136
137<sect3><title>Config files</title>
138<para><filename>named.conf</filename>, <filename>root.hints</filename>,
139<filename>127.0.0</filename>, <filename>rndc.conf</filename></para>
140</sect3>
141
142<sect3><title>Configuration Information</title>
143
144<para><application><acronym>BIND</acronym></application> will be configured
145to run in a <command>chroot</command> jail as an unprivileged user (named).
146This configuration is more secure in that a <acronym>DNS</acronym> compromise
147can only affect a few files in the named user's <envar>HOME</envar>
148directory.</para>
149
150<para>Create the unprivileged user and group named:</para>
151
152<screen><userinput><command>groupadd named &amp;&amp;
153useradd -m -c "BIND Owner" -g named -s /bin/false named</command></userinput></screen>
154
155<para>Set up some files, directories and devices needed by
156<application><acronym>BIND</acronym></application>:</para>
157
158<screen><userinput><command>cd /home/named &amp;&amp;
159mkdir -p dev etc/namedb/slave var/run &amp;&amp;
160mknod /home/named/dev/null c 1 3 &amp;&amp;
161mknod /home/named/dev/random c 1 8 &amp;&amp;
162chmod 666 /home/named/dev/{null,random} &amp;&amp;
163mkdir /home/named/etc/namedb/pz &amp;&amp;
164cp /etc/localtime /home/named/etc</command></userinput></screen>
165
166<para>Then, generate a key for use in the <filename>named.conf</filename>
167and <filename>rdnc.conf</filename> files using the
168<command>rndc-confgen</command> command:</para>
169
170<screen><userinput><command>rndc-confgen -b 512 | grep -m 1 "secret" | cut -d '"' -f 2</command></userinput></screen>
171
172<para>Create the <filename>named.conf</filename> file from which named
173will read the location of zone files, root name servers and secure
174<acronym>DNS</acronym> keys:</para>
175
176<screen><userinput><command>cat &gt; /home/named/etc/named.conf &lt;&lt; "EOF"</command>
177 options {
178 directory "/etc/namedb";
179 pid-file "/var/run/named.pid";
180 statistics-file "/var/run/named.stats";
181
182 };
183 controls {
184 inet 127.0.0.1 allow { localhost; } keys { rndc_key; };
185 };
186 key "rndc_key" {
187 algorithm hmac-md5;
188 secret "<replaceable>[Insert secret from rndc-confgen's output here]</replaceable>";
189 };
190 zone "." {
191 type hint;
192 file "root.hints";
193 };
194 zone "0.0.127.in-addr.arpa" {
195 type master;
196 file "pz/127.0.0";
197 };
198
199// Bind 9 now logs by default through syslog (except debug).
200// These are the default logging rules.
201
202logging {
203 category default { default_syslog; default_debug; };
204 category unmatched { null; };
205
206 channel default_syslog {
207 syslog daemon; // send to syslog's daemon
208 // facility
209 severity info; // only send priority info
210 // and higher
211 };
212
213 channel default_debug {
214 file "named.run"; // write to named.run in
215 // the working directory
216 // Note: stderr is used instead
217 // of "named.run"
218 // if the server is started
219 // with the '-f' option.
220 severity dynamic; // log at the server's
221 // current debug level
222 };
223
224 channel default_stderr {
225 stderr; // writes to stderr
226 severity info; // only send priority info
227 // and higher
228 };
229
230 channel null {
231 null; // toss anything sent to
232 // this channel
233 };
234};
235
236
237
238<command>EOF</command></userinput></screen>
239
240<para>Create the <filename>rndc.conf</filename> file with the following
241commands:</para>
242
243<screen><userinput><command>cat &gt; /etc/rndc.conf &lt;&lt; "EOF"</command>
244key rndc_key {
245algorithm "hmac-md5";
246 secret
247 "<replaceable>[Insert secret from rndc-confgen's output here]</replaceable>";
248 };
249options {
250 default-server localhost;
251 default-key rndc_key;
252};
253<command>EOF</command></userinput></screen>
254
255<para>The <filename>rndc.conf</filename> file contains information for
256controlling named operations with the <command>rndc</command>
257utility.</para>
258
259<para>Create a zone file with the following contents:</para>
260
261<screen><userinput><command>cat &gt; /home/named/etc/namedb/pz/127.0.0 &lt;&lt; "EOF"</command>
262$TTL 3D
263@ IN SOA ns.local.domain. hostmaster.local.domain. (
264 1 ; Serial
265 8H ; Refresh
266 2H ; Retry
267 4W ; Expire
268 1D) ; Minimum TTL
269 NS ns.local.domain.
2701 PTR localhost.
271<command>EOF</command></userinput></screen>
272
273<para>Create the <filename>root.hints</filename> file with the following
274commands:</para>
275
276<note><para>Caution must be used to ensure there are no leading spaces in this
277file.</para></note>
278
279<screen><userinput><command>cat &gt; /home/named/etc/namedb/root.hints &lt;&lt; "EOF"</command>
280. 6D IN NS A.ROOT-SERVERS.NET.
281. 6D IN NS B.ROOT-SERVERS.NET.
282. 6D IN NS C.ROOT-SERVERS.NET.
283. 6D IN NS D.ROOT-SERVERS.NET.
284. 6D IN NS E.ROOT-SERVERS.NET.
285. 6D IN NS F.ROOT-SERVERS.NET.
286. 6D IN NS G.ROOT-SERVERS.NET.
287. 6D IN NS H.ROOT-SERVERS.NET.
288. 6D IN NS I.ROOT-SERVERS.NET.
289. 6D IN NS J.ROOT-SERVERS.NET.
290. 6D IN NS K.ROOT-SERVERS.NET.
291. 6D IN NS L.ROOT-SERVERS.NET.
292. 6D IN NS M.ROOT-SERVERS.NET.
293A.ROOT-SERVERS.NET. 6D IN A 198.41.0.4
294B.ROOT-SERVERS.NET. 6D IN A 192.228.79.201
295C.ROOT-SERVERS.NET. 6D IN A 192.33.4.12
296D.ROOT-SERVERS.NET. 6D IN A 128.8.10.90
297E.ROOT-SERVERS.NET. 6D IN A 192.203.230.10
298F.ROOT-SERVERS.NET. 6D IN A 192.5.5.241
299G.ROOT-SERVERS.NET. 6D IN A 192.112.36.4
300H.ROOT-SERVERS.NET. 6D IN A 128.63.2.53
301I.ROOT-SERVERS.NET. 6D IN A 192.36.148.17
302J.ROOT-SERVERS.NET. 6D IN A 192.58.128.30
303K.ROOT-SERVERS.NET. 6D IN A 193.0.14.129
304L.ROOT-SERVERS.NET. 6D IN A 198.32.64.12
305M.ROOT-SERVERS.NET. 6D IN A 202.12.27.33
306<command>EOF</command></userinput></screen>
307
308<para>The <filename>root.hints</filename> file is a list of root name servers.
309This file must be updated periodically with the <command>dig</command>
310utility. A current copy of root.hints can be obtained from
311<ulink url="ftp://rs.internic.net/domain/named.root" />. Consult the
312<ulink url="http://www.bind9.net/Bv9ARM.html"><application>
313<acronym>BIND</acronym></application> 9 Administrator Reference Manual</ulink>
314for details.</para>
315
316<para>Create or modify <filename>resolv.conf</filename> to use the new
317name server with the following commands:</para>
318
319<note><para>Replace <replaceable>[yourdomain.com]</replaceable> with your own
320valid domain name.</para></note>
321
322<screen><userinput><command>cp /etc/resolv.conf /etc/resolv.conf.bak &amp;&amp;
323cat &gt; /etc/resolv.conf &lt;&lt; "EOF"</command>
324search <replaceable>[yourdomain.com]</replaceable>
325nameserver 127.0.0.1
326<command>EOF</command></userinput></screen>
327
328<para>Set permissions on the <command>chroot</command> jail with the
329following command:</para>
330
331<screen><userinput><command>chown -R named.named /home/named</command></userinput></screen>
332
333<para>To start the <acronym>DNS</acronym> server at boot, install the
334<filename>/etc/rc.d/init.d/bind</filename> init script included in the
335<xref linkend="intro-important-bootscripts"/> package.</para>
336
337<screen><userinput><command>make install-bind</command></userinput></screen>
338
339<para>Now start <application><acronym>BIND</acronym></application> with
340the new boot script:</para>
341
342<screen><userinput><command>/etc/rc.d/init.d/bind start</command></userinput></screen>
343
344</sect3>
345
346<sect3><title>Testing <application><acronym>BIND</acronym></application></title>
347
348<para>Test out the new
349<application><acronym>BIND</acronym></application> 9 installation. First
350query the local host address with <command>dig</command>:</para>
351
352<screen><userinput><command>dig -x 127.0.0.1</command></userinput></screen>
353
354<para>Now try an external name lookup, taking note of the speed
355difference in repeated lookups due to the caching. Run the
356<command>dig</command> command twice on the same address:</para>
357
358<screen><userinput><command>dig www.linuxfromscratch.org &amp;&amp;
359dig www.linuxfromscratch.org</command></userinput></screen>
360
361<para>You can see almost instantaneous results with the named caching lookups.
362Consult the <application><acronym>BIND</acronym></application> Administrator
363Reference Manual located at
364<filename>doc/arm/Bv9ARM.html</filename> in the package source tree, for
365further configuration options.</para>
366</sect3>
367
368</sect2>
369
370<sect2>
371<title>Contents</title>
372
373<para>The <application><acronym>BIND</acronym></application> package contains
374<command>dig</command>,
375<command>dnssec-keygen</command>,
376<command>dnssec-signzone</command>,
377<command>host</command>,
378<command>isc-config.sh</command>,
379<command>lwresd</command>,
380<command>named</command>,
381<command>named-checkconf</command>,
382<command>named-checkzone</command>,
383<command>nslookup</command>,
384<command>nsupdate</command>,
385<command>rndc</command>,
386<command>rndc-confgen</command>,
387<filename class='libraryfile'>libbind9</filename>,
388<filename class='libraryfile'>libdns</filename>,
389<filename class='libraryfile'>libisc</filename>,
390<filename class='libraryfile'>libisccc</filename>,
391<filename class='libraryfile'>libisccfg</filename> and
392<filename class='libraryfile'>liblwres</filename>.</para>
393</sect2>
394
395<sect2><title>Description</title>
396
397<sect3><title>dig</title>
398<para><command>dig</command> interrogates <acronym>DNS</acronym>
399servers.</para></sect3>
400
401<sect3><title>dnssec-keygen</title>
402<para><command>dnssec-keygen</command> is a key generator for secure
403<acronym>DNS</acronym>.</para></sect3>
404
405<sect3><title>dnssec-signzone</title>
406<para><command>dnssec-signzone</command> generates signed versions of
407zone files.</para></sect3>
408
409<sect3><title>host</title>
410<para><command>host</command> is a utility for <acronym>DNS</acronym>
411lookups.</para></sect3>
412
413<sect3><title>lwresd</title>
414<para><command>lwresd</command> is a caching-only name server for local
415process use.</para></sect3>
416
417<sect3><title>named</title>
418<para><command>named</command> is the name server daemon.</para></sect3>
419
420<sect3><title>named-checkconf</title>
421<para><command>named-checkconf</command> checks the syntax of
422<filename>named.conf</filename> files.</para></sect3>
423
424<sect3><title>named-checkzone</title>
425<para><command>named-checkzone</command> checks zone file
426validity.</para></sect3>
427
428<sect3><title>nslookup</title>
429<para><command>nslookup</command> is a program used to query Internet
430domain nameservers.</para></sect3>
431
432<sect3><title>nsupdate</title>
433<para><command>nsupdate</command> is used to submit
434<acronym>DNS</acronym> update requests.</para></sect3>
435
436<sect3><title>rndc</title>
437<para><command>rndc</command> controls the operation of
438<application><acronym>BIND</acronym></application>.</para></sect3>
439
440<sect3><title>rndc-confgen</title>
441<para><command>rndc-confgen</command> generates
442<filename>rndc.conf</filename> files.</para></sect3>
443
444</sect2>
445
446</sect1>
447
Note: See TracBrowser for help on using the repository browser.