1 | <sect2>
|
---|
2 | <title>Configuring leafnode</title>
|
---|
3 |
|
---|
4 | <sect3><title>Config files</title>
|
---|
5 | <para><filename>/etc/leafnode/config</filename>,
|
---|
6 | <filename>/etc/inetd.conf</filename> and
|
---|
7 | <filename>/etc/xinetd.conf</filename></para>
|
---|
8 |
|
---|
9 | <para>leafnode may be configured to use inetd by adding a leafnode entry
|
---|
10 | to the <filename>/etc/inetd.conf</filename> file with the following
|
---|
11 | command:</para>
|
---|
12 |
|
---|
13 | <screen><userinput><command>echo "nntp stream tcp nowait news /usr/sbin/tcpd /usr/sbin/leafnode" \
|
---|
14 | >> /etc/inetd.conf</command></userinput></screen>
|
---|
15 |
|
---|
16 | <para>Alternatively, leafnode may be configured to use xinetd by
|
---|
17 | adding a leafnode entry to the <filename>/etc/xinetd.conf</filename>
|
---|
18 | file with the following command:</para>
|
---|
19 |
|
---|
20 | <screen><userinput><command>cat >> /etc/xinetd.conf << "EOF"
|
---|
21 | service nntp
|
---|
22 | {
|
---|
23 | flags = NAMEINARGS NOLIBWRAP
|
---|
24 | socket_type = stream
|
---|
25 | protocol = tcp
|
---|
26 | wait = no
|
---|
27 | user = news
|
---|
28 | server = /usr/sbin/tcpd
|
---|
29 | server_args = /usr/sbin/leafnode
|
---|
30 | instances = 7
|
---|
31 | per_source = 3
|
---|
32 | }
|
---|
33 | EOF</command></userinput></screen>
|
---|
34 |
|
---|
35 | <para>The <filename>/etc/news/config</filename> file must be
|
---|
36 | edited to reflect the name of the upstream <acronym>NNTP</acronym>
|
---|
37 | provider. Copy the
|
---|
38 | example configuration file to <filename>/etc/news/config</filename>
|
---|
39 | and save the original for reference: </para>
|
---|
40 |
|
---|
41 | <screen><userinput><command>cp /etc/news/config.example /etc/news/config</command>
|
---|
42 | </userinput></screen>
|
---|
43 |
|
---|
44 | <para>Change the
|
---|
45 | <screen><userinput><command>server = </command></userinput></screen>
|
---|
46 | entry to reflect your news provider.</para>
|
---|
47 |
|
---|
48 | <para>The <envar>NNTPSERVER</envar> environment variable must be set to 127.0.0.1 to
|
---|
49 | prevent news clients from reading news from the upstream feed, add the
|
---|
50 | following to <filename>/etc/profile</filename> or
|
---|
51 | <filename>$HOME/.bash_profile</filename>:</para>
|
---|
52 |
|
---|
53 | <screen><userinput><command>export NNTPSERVER=127.0.0.1</command></userinput></screen>
|
---|
54 |
|
---|
55 | </sect3>
|
---|
56 |
|
---|
57 | </sect2>
|
---|