The configuration of the news reader under Linux

  

The purpose of the computer store news reader is to provide user functions, allowing him/her to more easily access news system functions, such as delivering articles in a more comfortable way, or browsing Content in the newsgroup, etc. The talent of this interface is endless. Currently, two news readers have been ported to L i n u x. The basic settings of three common newsreaders will be described below, which are: t i n, t r n and n n .
One of the most effective news readers is $ find /var/spool/news -name '[ 0 - 9 ]* ' - e x e c cat {} \\; |  More This is the way the diehards read the news. However, most newsreaders are quite complex. They usually provide a full screen interface, which is divided into several separate layers. One layer is used to display all newsgroups that the user has subscribed to, one is used to display an overview of all the articles in a newsgroup, and one is used to display each individual article. At the newsgroup level, many newsreaders display a list of articles showing their subject lines and authors. In large newsgroups, it is impossible for users to understand all relevant articles, although it is possible to identify responses to earlier articles. The answer usually repeats the subject of the original article by adding a “R e :” in front of the original article. In addition, for a directly repetitive article, its message I D may be specified in the row R e f e r e n c e : h e a d e r. Sorting the articles according to these two points will result in smaller clusters of articles (in fact, trees) called "mainlines" or "synchronized" (t h r e a d). One of the tasks of writing a news reader is to design a more efficient serialization scheme. Here, we are not going to delve into how to build a user interface. At present, all news readers available on the L i n u x system have relevant help documents for your reference. Below, we will only discuss some management tasks. Most of it is related to establishing a serial database and creating an account. 18.1 tin configuration The most complete news reader related to serialization is t i n. It was written by Iain Lea and used a vintage newsreader called t a s s as a prototype. The latter was written by Rich Skrenta. After the user enters the newsgroup, t i n starts to perform serialization. It is quite fast, but when connected through N N T P, the speed is not ideal. On a 4 8 6 D X 50 machine, when it is read directly from the disk, it takes only 30 seconds to serialize 1,000 articles. But by connecting to a N N T P that loads the news server, it takes 5 minutes. Note that if the N N T P server itself performs the serial processing, allowing the client to obtain the serial database can significantly improve the speed; for example, the INN-1.4 version, this is the case. You can also improve this by using the -u option, or by calling t i n with the -U option, to periodically update your index file. Usually, t i n puts its own serial database in the user root directory under . t i n /i n d e x . However, this may take up system resources, so you should consider putting a copy of each database in one place. To do this, let t i n s e t u i d be n e w s, or an account with no privileges at all (but don't set it to a n y b o d y. Usually, no matter what commands and files should be associated with this user). Then, t i n stores all the serial databases under /v a r /s p o o l /n e w s /. i n d e x. For any file access and script escape, it will reset its valid uid to the actual uid of the user who called it (this is why you will get an unknown error message when you call it as a superuser. Anyway, no matter what You can't do anything as root). The best solution is to install the t n d d index daemon, which runs as a daemon and periodically updates the index file. However, this daemon is not included in t i n, so you must edit it yourself. If you are running a local area network with a central news server, you can run t i n d on that server and let all clients get the index file through N N T P. Of course, this requires an extension of N N T P . The n n t p d patch that implements this extension is included in the t i n source code. Some t i n versions included in the released program are not programmed to support N N T P, but now, most programs are available. When invoked as r t i n or with the -r option, t i n attempts to establish a connection with the N N T P server, which is specified in the /e t c /n n t p s e r v e r or N N T P S E RV E R environment parameter. A separate line in the n n t p s e r v e r file contains the name of the server. 18.2 trn configuration Compared to early news readers (ie, r n, meaning reading news), t r n is a natural winner. In the name of the group, t” stands for "serial"> (t h r e a d e d). It was written by Wayne Davidson. Unlike t i n , t r n cannot generate its serial database at runtime. Instead, it uses a file provided by a program called m t h r e a d s, which must be called periodically by c r o to update the index file. However, not running mthreads doesn't mean you can't access newsgroup articles; it just means that your article selection menu will be spread out of all "Nollet buys out Linux!!" articles instead of you can easily skip The single theme. To turn on serial play for a particular newsgroup, call m t h r e a d s with a list of newsgroups on the command line. The structure of this list is exactly the same as in the sys file: mthreads comp.rec.!rec.games.go This will be serialized for all articles in comp and rec, except for rec. games . go (players who play Go) There is usually no need for novel topics). After that, calling it without any options will cause it to list all recently arrived articles by topic. The serial processing of all newsgroups in a c t i v e file can also be opened by calling m t h r e a d s with an a l l newsgroup list. If you are receiving news at night, you can run m t h r e a d s every morning, but you can run it more often if you need to. For sites with heavy traffic, they may wish to run m t h r e a d s in daemon mode. With the -d option, when it is enabled at system startup, it will put itself into the background, every 10 minutes, check to see if new articles arrive, and if so, serialize them. To run mthreads in daemon mode, put the following line in your rc . news script: /usr/local/bin/rn/mthreads -deav - a option to have mthreads automatically open when the newsgroup is created. The serial processing of these newsgroups; the -v option enables lengthy logging messages for the mthreads file called mt.log, located in the trn directory you installed. Old articles that are no longer useful must be removed from the index file on a regular basis. By default, only articles whose number is below the lowest number will be deleted. Note that C-News does not automatically update this lowest number; so only run updatemin. For articles with the lowest number or higher that have been expired (because the oldest article has been assigned a long expiration date by the E xpires : header field), it can also be deleted by adding to mthreads - e option to implement an "extended" run-time operation. m t h r e a d s When running in background mode, the -e option will cause it to enter an enhanced expiration run after midnight, once a day. 18.3 nn configuration n n is written by Kim F. S t o r m, which is considered a news reader whose ultimate goal is not to read the news. Its name stands for "no news" (ie no news), its motto is "No news, it is a good thing." n n is better. In order to achieve this report, nn brings us a wide range of well-functioning maintenance tools that not only allow you to generate news topics, but also extend the check of subject database consistency, clearing and collection features, and access restrictions. . In addition, there is a hypervisor called n n a d m i n that allows you to perform these tasks interactively. This program is very straightforward, so we don't plan to discuss it in detail, just talk about how to generate an index file. The n n topic database management program is called n n m a s t e r. It usually runs as a daemon, starting with the r c . n e w s or r c . i n e t 2 script. Its call form is as follows: /usr/local/lib/nn/nnmaster -1 -r -c As such, topic categorization is enabled for all newsgroups in the a c t i v e file. Similarly, n n m a s t e r can also be called periodically from c o o n by specifying a newsgroup list for its call. This list is very similar to the subscription list in the s s s file, except that it uses a space and the latter uses a comma. Instead of using the fake newsgroup name a l l, it uses a blank parameter to represent all newsgroups. The demonstration calls are as follows: # /usr/local/lib/nn/nnmaster !rec.games.go rec comp Note that the order here has a specific meaning: the leftmost group definition is always valid. So, if we put ! r e c . g a m e s . g o after r e c, all articles in this group will be ignored. n n provides several ways to remove expired articles from their database. One is to view the newsgroup directory and discard the entries corresponding to the expired articles to update the database. This is a default action and is performed by calling n n m a s t e r with the -E option. It is quite fast, except when doing this with N N T P. The second method is very similar to the default m t h r e a d s expiration processing. It only deletes the corresponding entry of the article whose number is lower than the lowest number, and the lowest number is in the a c t i v e file. Use the -e option to enable it. Finally, the third method is to discard the entire database and re-collect all the articles. The specific approach is to specify the -E 3 option for n n m a s t e r. For newsgroup lists that are about to expire, they are specified by the -F option in the above manner. However, if you run n n m a s t e r as a daemon, you must kill it with -k before it expires, and then restart it with the original options. So the correct command to run the expiration process on all newsgroups is: ## nnmaster -kf " " # nnmaster -lrc There are many more tags for optimizing n n behavior. If you want to know how to delete bad articles or pick up an article, you can refer to the n n m a s t e r manual. n n m a s t e r depends on a file named G R O U P S, which is located in /u s r /l o c a l /l i b /n n . If you don't have this file initially, you will create one. For each newsgroup, it contains a line, starting with the newsgroup name, followed by a timestamp and a number of tags. These tags are editable to enable specific behavior for inaccurate newsgroups, but you cannot change the order in which newsgroups appear. (This is because their order must match the order of entries in the binary M A S T E R file.) The details of the flags that are allowed to be set and their effects are also included in the n n m a s t e r manual.

Copyright © Windows knowledge All Rights Reserved