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