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