726 728




Linux Unleashed, Third Edition:Configuring Linux for News





-->















Previous
Table of Contents
Next




Configuring trn
The trn newsreader, widely used by UNIX users, is based on the classic newsreader rn (read news). The primary advantage to trn over rn is the ability to follow threads (articles that are related by subject). Most systems can run trnwithout any modifications to the files, unless they want to use threads.
To enable threads to be followed, trnneeds to be able to construct a thread database, showing the interrelationships between articles. The trn newsreader can’t do this itself, relying on a program called mthreads (usually stored as /usr/local/bin/rn/mthreads). The mthreads utility is best run in a crontab file at regular intervals (usually as often as you download full newsfeeds). Without mthreads, trn can still be used, but threads cannot be followed.
Without any arguments, mthreads generates index files for the thread databases only for newly arriving articles in all newsgroups. To index all the newsgroups from scratch, issue the command


mthreads all


This command examines the /usr/lib/news/active file and reindexes every newsgroup in that file.
If you want to index only a few newsgroups, you can supply the newsgroup names as arguments (either in the crontab file or from the shell prompt). For example, the command


mthreads rec.auto.antique


reindexes the rec.auto.antique thread database. You can reindex more than one newsgroup at a time by separating the names with a comma. You can also force entire hierarchies to be reindexed by specifying only the hierarchical name. For example, the command


mthreads alt


reindexes all the alt newsgroups. If you want to exclude certain newsgroups, preface them with an exclamation mark. For example, this command


mthreads rec.auto,rec.audio,!rec.audio.tech


reindexes all the rec.auto newsgroups, as well as all the rec.audio newsgroups except rec.audio.tech.
If your site has very heavy news traffic, you can run mthreads in daemon mode. This means mthreads doesn’t have to be started at regular intervals and it immediately processes arriving articles. However, it does take system resources away. To set mthreads in daemon mode, use the -d option. By default, mthreads will check the newsgroups every 10 minutes. You can place this command in the rc startup files, if you want.
Configuring tin
Unlike trn, the tin newsreader doesn’t need to be told to reindex the thread databases at intervals. The tinnewsreader generates the thread indexes every time a user enters a newsgroup. The reindexing is quite fast, unless the newsgroup has more than 500 articles or so.
When tin reindexes a newsgroup, it stores the index file under the user’s home directory as .tin/index/newsgroup_name. The total size of all these index files can become quite sizable if a user reads a lot of newsgroups or if there are many users on the system. The easy way to prevent this is to force tinto keep a single master index in one location that all users can access. To set up a single index, set the owner of tin to news with the command


chown news.news tin


(when you are in the tindirectory, of course). This way, tinstores the index files under /usr/spool/news/.index (or /var/spool/news/.index).
You can install a daemon called tind that keeps the index files constantly updated. The tind daemon source code is supplied with some versions of Linux, but few have a compiled version, so you will need a compiler and the make utility to build a version for your system.
Summary
Once you have completed the compilation and configuration of the NNTP system, as well as your newsreaders, you’re set to go. There are quite a few new newsreaders appearing for Linux, such as nn, which is also a threaded newsreader. The choice of a reader is a matter of personal preference. Experiment and find the one you want to use.
From here, there are a number of related chapters that may be of interest to you. To learn how to

Secure your network from hackers, read Chapter 42, “Network Security.”
Back up all the configured software you’ve installed, read Chapter 45, “Backups.”
Automate tasks like downloading news at night, read Chapter 46, “cron and at.”





Previous
Table of Contents
Next














Wyszukiwarka

Podobne podstrony:
sklep;jubilerski;yes,wizytowka,726
726,23,artykul
726 (2)
728 a
726 nowe pytania i odpowiedzi TM
720 726
726 ac
mbdch20 726
728,6,artykul

więcej podobnych podstron