1 | <sect2>
|
---|
2 | <title>Configuring leafnode</title>
|
---|
3 |
|
---|
4 | <sect3><title>Config files</title>
|
---|
5 | <para><userinput>/etc/leafnode/config,
|
---|
6 | /etc/inetd.conf, /etc/xinetd.conf</userinput></para>
|
---|
7 |
|
---|
8 | <para>leafnode may be configured to use inetd or xinetd as follows:
|
---|
9 | </para>
|
---|
10 |
|
---|
11 | <para>inetd configuration</para>
|
---|
12 | <para>Add a leafnode entry to the <filename>/etc/inetd.conf</filename>
|
---|
13 | file with the following command:
|
---|
14 | <screen><userinput>echo "nntp stream tcp nowait news /usr/sbin/tcpd /usr/sbin/leafnode" \
|
---|
15 | >> /etc/inetd.conf</userinput></screen></para>
|
---|
16 |
|
---|
17 | <para>xinetd configuration</para>
|
---|
18 | <para>Add a leafnode entry to the <filename>/etc/xinetd.conf</filename>
|
---|
19 | file with the following command:
|
---|
20 | <screen><userinput>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</userinput></screen></para>
|
---|
34 |
|
---|
35 | <para>The <filename>/etc/news/config</filename> file must be
|
---|
36 | edited to reflect the name of the upstream NNTP provider. Copy the
|
---|
37 | example configuration file to <filename>/etc/news/config</filename>
|
---|
38 | and save the original for reference : </para>
|
---|
39 |
|
---|
40 | <para><screen><userinput>cp /etc/news/config.example /etc/news/config</userinput></screen></para>
|
---|
41 | <para>Change the</para>
|
---|
42 | <para><screen><userinput>server = </userinput></screen></para>
|
---|
43 | <para>entry to reflect your news provider. </para>
|
---|
44 |
|
---|
45 | <para>The NNTPSERVER environment variable must be set to 127.0.0.1 to
|
---|
46 | prevent news clients from reading news from the upstream feed, add the
|
---|
47 | following to <filename>/etc/profile</filename> or
|
---|
48 | <filename>$HOME/.bash_profile</filename> :</para>
|
---|
49 | <para><screen><userinput>export NNTPSERVER=127.0.0.1</userinput></screen></para>
|
---|
50 |
|
---|
51 | </sect3>
|
---|
52 |
|
---|
53 | </sect2>
|
---|
54 |
|
---|