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