mirror of https://github.com/tLDP/LDP
210 lines
8.8 KiB
Plaintext
210 lines
8.8 KiB
Plaintext
<!doctype linuxdoc system>
|
||
|
||
<article>
|
||
|
||
<title>News Leafsite mini-HOWTO
|
||
<author>Florian Kuehnert, <tt>sutok@gmx.de</tt>
|
||
<date>v0.4, 2001-12-01
|
||
<abstract>
|
||
This HOWTO will help you to configure a small leafsite for Usenet News
|
||
using the free software package Leafnode. For any questions,
|
||
suggestions and comments, please write to Florian Kuehnert
|
||
(sutok@gmx.de). Please send any bugs you found in this document to me
|
||
as well. (C) 1998 by Florian Kuehnert.
|
||
</abstract>
|
||
|
||
<sect>Why to use Leafnode?
|
||
<p>
|
||
In normal cases if you want to read news offline on your local computer
|
||
you have to install a news server software like INN or CNews. Also you
|
||
are in the need for an nntp or uucp connection to your newsfeed. In
|
||
fact that such packages contain much more features than you need, you
|
||
run better by installing Leafnode.<p>
|
||
|
||
Leafnode is much simpler to use and very small but there are some
|
||
disadvantages: Leafnode is slow and loses news in about any error
|
||
situation. That's why you shouldn't use it for a big news server,
|
||
nevertheless, it´s appropriate for private users who don´t want spend
|
||
much time configuring INN.<p>
|
||
|
||
<sect>Where to get Leafnode?
|
||
<p>
|
||
Leafnode is available at <url url="ftp://ftp.troll.no/pub/freebies/"
|
||
name="ftp://ftp.troll.no/pub/freebies/"> and has been developed by
|
||
Arnt Gulbrandsen, an employee of Troll Tech AS. The recent version is
|
||
1.4 and in some distributions (for example Debian), Leafnode is
|
||
included. However, be sure to use at least version
|
||
1.4 as several critical bugs were fixed.<p>
|
||
|
||
<sect> How do I install it?
|
||
<p>
|
||
A small installation help comes with the package, but let's do it
|
||
together :-) -- If Leafnode >=1.4 is shipped with your distribution,
|
||
it would be the wisest to use the pre-compiled version and leave out
|
||
the steps 1 to 4.<p>
|
||
|
||
1.) Be sure that there is no other news server running on your
|
||
computer. When you type<newline>
|
||
<bf/$ telnet localhost nntp/
|
||
<newline>
|
||
you should get an error message. If you get a connection get back to the
|
||
prompt of your shell, you should uninstall INN, CNews or whatever you're
|
||
running now and comment out the nntp-line in your /etc/inetd.conf.
|
||
<p>
|
||
2.) Make sure that there is a user called "news", check in
|
||
/etc/password for the name. If there isn't, create one (either typing
|
||
<newline>
|
||
<bf/$ adduser news/
|
||
<newline>
|
||
or using a tool shipped with your distribution).
|
||
<p>
|
||
3.) Unpack the sources:
|
||
<newline>
|
||
<bf/$ tar xfz leafnode-1.4.tar.gz/
|
||
<newline>
|
||
and change into the source directory
|
||
<newline>
|
||
<bf/$ cd leafnode-1.4/
|
||
<p>
|
||
4.) Compile the program and install it
|
||
<newline>
|
||
<bf/$ make; make install/
|
||
<newline><p>
|
||
5.) Edit /usr/lib/leafnode/config (it may be on any other place like
|
||
/etc/leafnode when you use a pre-compiled version of your Linux
|
||
distribution). The line "server =" should point to the news server of
|
||
your ISP.
|
||
<p>
|
||
6.) Edit /etc/nntpserver. It should include your local hostname
|
||
(localhost or whatever your computer name is, the command hostname
|
||
should help you). If in some startup file like /etc/profile or
|
||
~/.bash_profile the environment variable is defined, you should
|
||
adjust to your computer´s name as well.
|
||
<p>
|
||
7.) Edit the /etc/inetd.conf: Make sure that there is no line beginning
|
||
with "nntp". If there is such a line, comment it out putting a "#"
|
||
before it. Then add the following line:
|
||
<newline>
|
||
<bf>nntp stream tcp nowait news /usr/sbin/tcpd /usr/local/sbin/leafnode</bf>
|
||
<newline>
|
||
When someone (for example you :-) connects to your computer on the
|
||
NNTP port, leafnode is started as server process.
|
||
<p>
|
||
8.) Go online and run the program "fetch" as root or news. The first time
|
||
fetch is started, it will download a list of your ISP's newsgroups. This
|
||
may take some time depending on the speed on your connection and the
|
||
number of groups your ISP has in its active-File.
|
||
<p>
|
||
9.) Start your favorite newsreader (slrn, (r)tin and knews are not a
|
||
bad start) and subscribe to all your groups you read. Be careful not
|
||
just to subscribe these groups, but also to enter them, even when
|
||
they're empty.
|
||
<p>
|
||
10.) Start fetch again to download all the news of the groups want to
|
||
get.<p> <sect> How do I maintain leafnode?
|
||
<p>
|
||
Now you have got a working news system up and running, but there are
|
||
still some things to do. You may edit the file /usr/lib/leafnode/config
|
||
to set the expire dates of your groups. This number means, when old
|
||
messages should be deleted. The standard time of 20 days is much often
|
||
too long if you read some groups with much traffic, 4 days or a week
|
||
are in most cases a good time for your system. You may change the value
|
||
for all groups ("expire = n" to hold all groups n days), but you tell
|
||
leafnode to change this time for some separate groups writing
|
||
<newline>
|
||
groupexpire foo.bar n
|
||
<newline>
|
||
to set the expire time for the group foo.bar to n days.
|
||
<p>
|
||
This setting alone won't make leafnode deleting old messages, a
|
||
separate program is responsible for this: texpire. It may be started
|
||
as a cron job or by command line. If your computer is up all the time,
|
||
you may want to add the following line to news' crontab file (to edit
|
||
it, log in as news and type "crontab -e" or as type root "crontab -u
|
||
news -e"):
|
||
<newline>
|
||
0 19 * * * /usr/local/sbin/texpire
|
||
<newline>
|
||
This line causes the cron daemon to star texpire every day at
|
||
19:00. Check the crontab manual page for further adjustment. If
|
||
your computer is not regularly switched on, you may start texpire
|
||
just from time to time, when you notice that fetch gets slower. It
|
||
works fine as with the "cron-method".
|
||
<p>
|
||
<sect> How does it work?
|
||
<p>
|
||
Leafnode is a "real" NNTP server, which means that you can also login
|
||
from a different computer (via Internet, the local network
|
||
etc.). Every time you enter a group in your newsreader, your reader
|
||
sends the information to leafnode and requests it. If the group does
|
||
not exist, leafnode will create an empty file
|
||
/var/spool/news/interesting.groups, named like the group. When you run
|
||
fetch the next time, it will fetch the messages of the group. If a
|
||
newsgroup has not been visited for a certain time, leafnode will stop
|
||
to fetch its articles and delete its name in
|
||
/var/spool/news/interesting.groups. So if you just subscribed to a
|
||
high traffic newsgroup by accident, you may delete its file there by
|
||
hand for that you won't have to download all the postings there for
|
||
the next week.
|
||
<p>
|
||
A week is not enough for you? You want to go on holiday for three weeks
|
||
and still get news? Unfortunately, there is no option in leafnode to
|
||
change it. But you can edit the file leafnode.h and recompile it. The
|
||
#defined constants are TIMEOUT_LONG and TIMEOUT_SHORT, just set the
|
||
time in seconds up. Another, simpler solution is to define a cron-job
|
||
that does "touch /var/spool/news/interesting.groups/*" every night.
|
||
<p>
|
||
If you want to get a list of all avaible groups, look into the file
|
||
/usr/lib/leafnode/groupinfo, where you will find a short description
|
||
on the group.
|
||
<p>
|
||
If you want to re-read the list of newsgroups from your newsfeed (for
|
||
example when you want to read a new group), just delete the file
|
||
/var/spool/news/active.read. Fetch will create it the next time and
|
||
get the new list. Fetch will also re-read the grouplist from time to
|
||
time, so you don't have to do it by hand.
|
||
<p>
|
||
<sect>What newsreader should I use?
|
||
<p>
|
||
There is not *the* newsreader for Linux, like there is not *the*
|
||
editor. My favourite newsreader is emacs in gnus mode which is the
|
||
most configurable reader for Linux. Many people are using slrn and
|
||
tin on a terminal, many people use knews under X. There are also trn,
|
||
nn and a lot more reader, so just try what you like. The only reader
|
||
you shouldn't use is Netscape, it is big, feature-less, unstable, and
|
||
it creates sometimes broken postings. However, it is your personal
|
||
decision.
|
||
<p>
|
||
Anyway, knews is no bad idea for your first experiences as it is very
|
||
user-friendly and easy to understand.
|
||
<p>
|
||
<sect> Where do I get more information?
|
||
<p>
|
||
Some documentation is provided with the Leafnode package (read the
|
||
files INSTALL and README, the sources are also quite interesting). If
|
||
you want to know more about "professional" and "big" news servers,
|
||
check the INN FAQ (they are provided with the INN package). To get
|
||
information about your newsreader, type man "name of your newsreader"
|
||
or check for other files in /usr/doc.
|
||
<p>
|
||
If you have any questions concerning the news system, just ask in an
|
||
appropriate newsgroup (look in the news.software.ALL hierarchy).
|
||
<p>
|
||
If you have any question, comments or corrections concerning this
|
||
HOWTO, just write to me (sutok@gmx.de).
|
||
<p>
|
||
<sect>Copyright, License, Thanks
|
||
<p>
|
||
This document is Copyright(c) 1995, Florian Keuhnert.
|
||
<p>
|
||
It is distributed under the GNU Free Documentation License, which you
|
||
should have received with it. You can also read it at
|
||
<url url="http://www.fsf.org/licenses/fdl.html">.
|
||
<p>
|
||
I would like to thank Michael Schulz (michaels@home.on-luebeck.de)
|
||
for his help concerning some language problems and Cornelius Krasel
|
||
(krasel@wpxx02.toxi.uni-wuerzburg.de) for his "touch *"-trick.
|
||
|
||
|
||
</article>
|