[5f5a393] | 1 | <sect2>
|
---|
[40330fcd] | 2 | <title>Configuring <application>Leafnode</application></title>
|
---|
[5f5a393] | 3 |
|
---|
| 4 | <sect3><title>Config files</title>
|
---|
[e80cc95] | 5 | <para><filename>/etc/leafnode/config</filename>,
|
---|
| 6 | <filename>/etc/inetd.conf</filename> and
|
---|
| 7 | <filename>/etc/xinetd.conf</filename></para>
|
---|
[5f5a393] | 8 |
|
---|
[40330fcd] | 9 | <para><application>Leafnode</application> may be configured to use
|
---|
| 10 | <command>inetd</command> by adding an entry
|
---|
[786d85c] | 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 |
|
---|
[40330fcd] | 17 | <para>Alternatively, <application>Leafnode</application> may be configured to
|
---|
| 18 | use <command>xinetd</command> by adding an entry to the <filename>
|
---|
| 19 | /etc/xinetd.conf</filename> file with the following command:</para>
|
---|
[786d85c] | 20 |
|
---|
[40330fcd] | 21 | <screen><userinput><command>cat >> /etc/xinetd.conf << "EOF" </command>
|
---|
[5f5a393] | 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 | }
|
---|
[40330fcd] | 34 | <command>EOF</command></userinput></screen>
|
---|
[5f5a393] | 35 |
|
---|
| 36 | <para>The <filename>/etc/news/config</filename> file must be
|
---|
[786d85c] | 37 | edited to reflect the name of the upstream <acronym>NNTP</acronym>
|
---|
| 38 | provider. Copy the
|
---|
[5f5a393] | 39 | example configuration file to <filename>/etc/news/config</filename>
|
---|
[786d85c] | 40 | and save the original for reference: </para>
|
---|
[5f5a393] | 41 |
|
---|
[40330fcd] | 42 | <screen><userinput><command>cp /etc/news/config.example /etc/news/config
|
---|
| 43 | </command></userinput></screen>
|
---|
[5f5a393] | 44 |
|
---|
[786d85c] | 45 | <para>Change the
|
---|
[40330fcd] | 46 | <screen><userinput>server = </userinput></screen>
|
---|
[786d85c] | 47 | entry to reflect your news provider.</para>
|
---|
| 48 |
|
---|
[40330fcd] | 49 | <para>The <envar>NNTPSERVER</envar> environment variable must be set to
|
---|
| 50 | 127.0.0.1 to prevent news clients from reading news from the upstream feed,
|
---|
| 51 | add the following to <filename>/etc/profile</filename> or
|
---|
[786d85c] | 52 | <filename>$HOME/.bash_profile</filename>:</para>
|
---|
| 53 |
|
---|
| 54 | <screen><userinput><command>export NNTPSERVER=127.0.0.1</command></userinput></screen>
|
---|
[5f5a393] | 55 |
|
---|
| 56 | </sect3>
|
---|
| 57 |
|
---|
| 58 | </sect2>
|
---|