mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-04 15:37:16 +08:00
a0d81acb28
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@192 af4574ff-66df-0310-9fd7-8a98e5e911e0
64 lines
1.9 KiB
XML
64 lines
1.9 KiB
XML
<sect2>
|
|
<title>Configuring leafnode</title>
|
|
|
|
<sect3><title>Config files</title>
|
|
<para><userinput>/etc/leafnode/config,
|
|
/etc/inetd.conf, /etc/xinetd.conf</userinput></para>
|
|
|
|
<para>leafnode may be configured to use inetd or xinetd as follows:
|
|
</para>
|
|
|
|
<para>inetd configuration</para>
|
|
<para>Add a leafnode entry to the <filename>/etc/inetd.conf</filename>
|
|
file with the following command:
|
|
<screen><userinput>
|
|
echo "nntp stream tcp nowait news /usr/sbin/tcpd /usr/sbin/leafnode" \
|
|
>> /etc/inetd.conf
|
|
</userinput></screen></para>
|
|
|
|
<para>xinetd configuration</para>
|
|
<para>Add a leafnode entry to the <filename>/etc/xinetd.conf</filename>
|
|
file with the following command:
|
|
<screen><userinput>
|
|
cat >> /etc/xinetd.conf << "EOF"
|
|
service nntp
|
|
{
|
|
flags = NAMEINARGS NOLIBWRAP
|
|
socket_type = stream
|
|
protocol = tcp
|
|
wait = no
|
|
user = news
|
|
server = /usr/sbin/tcpd
|
|
server_args = /usr/sbin/leafnode
|
|
instances = 7
|
|
per_source = 3
|
|
}
|
|
EOF
|
|
|
|
</userinput></screen></para>
|
|
|
|
<para>The <filename>/etc/news/config</filename> file must be
|
|
edited to reflect the name of the upstream NNTP provider. Copy the
|
|
example configuration file to <filename>/etc/news/config</filename>
|
|
and save the original for reference : </para>
|
|
|
|
<para><screen><userinput>
|
|
cp /etc/news/config.example /etc/news/config
|
|
</userinput></screen></para>
|
|
<para>Change the</para>
|
|
<para><screen><userinput>server = </userinput></screen></para>
|
|
<para>entry to reflect your news provider. </para>
|
|
|
|
<para>The NNTPSERVER environment variable must be set to 127.0.0.1 to
|
|
prevent news clients from reading news from the upstream feed, add the
|
|
following to <filename>/etc/profile</filename> or
|
|
<filename>$HOME/.bash_profile</filename> :</para>
|
|
<para><screen><userinput>
|
|
export NNTPSERVER=127.0.0.1
|
|
</userinput></screen></para>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|