⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lsg40.htm

📁 linux-unix130.linux.and.unix.ebooks130 linux and unix ebookslinuxLearning Linux - Collection of 12 E
💻 HTM
📖 第 1 页 / 共 3 页
字号:




</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Batches only articles from moderated newsgroups</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







n







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Creates batch files for NNTP transfer clients</FONT>







<TR>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







u







</FONT>







<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>







Batches only articles from unmoderated newsgroups</FONT>







</TABLE><P>The flags F, f, I, and n are mutually exclusive, meaning that you can only use one of them in a single entry.







<BR>







<P>The cmds field is usually used to force the transfer of the article to other machines in the news chain. The default value (if none other is specified) on non-batching news systems is as follows:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">uux - -r -z remote_name!rnews</FONT></PRE>







<P>In this example, remote_name is the name of the machine the article is to be transferred to. The article is fed to rnews through standard input by this command. Several alternate commands are supplied with some C News versions in the directory /usr/lib/news/bin/batch, mostly starting with the filename via.







<BR>







<P>If batching is enabled (the flags field has one of F, f, I, or n), this field should specify a filename. The default value if none is specified is /usr/spool/news/out.going/remote_name/togo where remote_name is the name of the remote system. Any entry in this field that does not start with a slash is assumed to be relative to the directory /usr/spool/news/out.going (or the /var equivalent, depending on the Linux directory structure).







<BR>







<P>A few simple examples of sys files show their usage. If your machine is downloading only from a newssite, and uploading only articles generated at your site (you are a leaf node), then your sys file needs entries only for your machine and the news feed. For example, the following sys file sets up your site to receive all newsgroups from brutus and to send back to brutus all the newsgroups you get and new articles you generate:







<BR>







<PRE>







<FONT COLOR="#000080"># our site, accepting all newsgroups







ME:all/all::







# newsfeed machine called brutus







brutus/brutus.com:all/all::</FONT></PRE>







<P>This configuration does not impose batching, so connections are performed as required.







<BR>







<P>Suppose you have another machine on your news route to which you send the sci.biology newsgroups, using a batch routine. If the remote machine's name is chatton, you may have an entry like this in the sys file:







<BR>







<PRE>







<FONT COLOR="#000080"># send chatton the sci.biology groups by batch







chatton:sci.biology/all:f:</FONT></PRE>







<P>Depending on how many machines you connect to, you may have many suc entries in your sys file.







<BR>







<BR>







<A NAME="E69E241"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Implementing Batching</B></FONT></CENTER></H4>







<BR>







<P>If you want to use batching on your news system, you have to make some more changes to configuration files other than the batch indicators in the sys file. Each article in a news batch has a line that identifies the size of the file, such as:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">#! rnews 3634</FONT></PRE>







<P>When compression is used, another line precedes this line to reflect the type of compression used to extract the article. The two schemes most often found use the UNIX compress utility and the GNU gzip utility (which is not supported by most versions of C News). The header lines look like this for each, respectively:







<BR>







<PRE>







<FONT COLOR="#000080">#!cunbatch







#!zunbatch</FONT></PRE>







<P>Occasionally an article has a heading like the following to indicate that the batch uses c7 encoding, which removes the eighth bit from data:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">#!c7unbatch</FONT></PRE>







<P>C News processes batches by executing the program /usr/lib/news/bin/batch/sendbatches. This uses the list of articles that are to be sent from /usr/lib/news/site/togo and packages them into one or more newsbatches. The size of the batches is determined by a variable in the file /usr/lib/news/batchparms. This file also gives the compression program to be used if the default is not desired, as well as the type of transport to use to connect to the remote site.







<BR>







<P>The format of each line in the batchparms file is as follows:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">sitename size max batch_program muncher transport</FONT></PRE>







<P>In this format, sitename is the name of the remote site, size is the maximum size of a batch before compression (except when a single article is larger, in which case the article is processed as a batch by itself), and max is the maximum number of batches to be stored before this site is ignored (to prevent batches accumulating when a remote site doesn't connect). Also, batch_program is the command used for generating the batches (usually the default value of batcher is best), muncher is the compression system (the default value of compcun uses compress), and transport is the connection method (for UUCP it is often viauux). A sample entry in the batchparms file looks like this:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">brutus 10000 20 batcher compcun viauux</FONT></PRE>







<P>You can have a default value for all sites except those specifically mentioned by embedding the word default in slashes:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">/default/ 100000 20 batcher compcun viauux</FONT></PRE>







<P>This default line should come before the other site lines. Substitute whatever values you want for the sizes.







<BR>







<P>Usually, C News should use crontab to start the batch file transfers at regular intervals (depending on the frequency of posting to the newsgroups). You can instruct C News to process a batch at any time with the command:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">news /usr/lib/news/bin/batch/sendbatches sitename</FONT></PRE>







<P>In this command, sitename is the name of the remote site you want to connect to. If you don't specify a remote site name, all sites are processed. Issue this command as root, or use su with the command.







<BR>







<BR>







<A NAME="E69E242"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Final Steps</B></FONT></CENTER></H4>







<BR>







<P>Once all you have dealt with these configuration issues, you are ready to receive news. You should have your system poll your news site and wait for the results. The most common problem that occurs is a mistake in the configuration file information, which can usually be spotted by verifying each file in turn.







<BR>







<P>By default, C News sends error messages to the user &quot;usenet,&quot; which may or may not exist on your system. It is useful to create an alias in the mail system that redirects C News error messages to a real system administrator's mailbox when a problem occurs. (An alternative to setting up a mail alias is to modify the C News; NEWSMASTER variable, but this must be done with every new session. The alias route is much easier.)







<BR>







<P>If a newsreader doesn't find any articles after you know a download has taken place, chances are that the newsreader is following the wrong path. Linux systems use /var/spool/news and /usr/spool/news, so your newsreader may be looking in the wrong place. Establish a symbolic link between the two directories with the following command:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">ln -s /usr/spool/news /var/spool/news</FONT></PRE>







<P>See whether that corrects the problem.







<BR>







<P>The newsgroups' spool directories tend to get very large, especially newsgroups that appear even though you have not explicitly subscribed to them, as well as the junk newsgroup (or equivalent). On a regular basis, you should go into the spool directories and clean out unwanted newsgroup entries. You can erase the entire directory and contents with the -r option to rm (although you should be careful of this rather dangerous command!).







<BR>







<BR>







<A NAME="E68E216"></A>







<H3 ALIGN=CENTER>







<CENTER>







<FONT SIZE=5 COLOR="#FF0000"><B>C News Utilities</B></FONT></CENTER></H3>







<BR>







<P>The C News system as found on most Linux distributions has a number of utility programs stored in the directory /usr/lib/news/bin/maint. The superuser can use these programs to control the behavior of the C News system. Some of these utilities and the files they operate on have already been mentioned. The usual utilities found with C News are the following:







<BR>







<UL>







<LI>The addgroup utility adds a newsgroup to the active file and uses the same format. For example, to add a new group called local.stuff that all users can read, issue the following command:







<BR>







<BR>







</UL>







<UL>







<UL>







<BR>







<PRE>







<FONT COLOR="#000080">addgroup local.stuff y</FONT></PRE></UL></UL>







<UL>







<LI>The delgroup utility deletes a newsgroup from the active file. Issue the command followed by the newsgroup name.







<BR>







<BR>







<LI>The newsboot utility removes lock files created by improperly terminated news programs.







<BR>







<BR>







<LI>Run the newsdaily utility to to clean up logs, check expiries and batches, and so on. Any generated messages are mailed to the newsmaster.







<BR>







<BR>







<LI>The newsrunning utility takes either on or off as an argument and controls the unbatching of incoming newsaccordingly.







<BR>







<BR>







<LI> The newswatch utility checks the news files for inconsistencies and errors. Generated messages are mailed to the newsmaster.







<BR>







<BR>







</UL>







<P><A NAME="I2"></A>Most of the utilities are for use occasionally, except the newsdaily, which you can place in a crontab file. For extra safety regarding the news files, add the newswatch program to the crontab file , too.







<BR>







<BR>







<A NAME="E68E217"></A>







<H3 ALIGN=CENTER>







<CENTER>







<FONT SIZE=5 COLOR="#FF0000"><B>Summary</B></FONT></CENTER></H3>







<BR>







<P>This chapter has shown you how to get C News up and running for most installations. You should be able to use this information to start sending and receiving newsgroups from your newsfeed. This chapter didn't look at all the special files involved with C News in detail because most are seldom used. If you want more information on C News, check the documentation and help files that accompany most distributions.







<P ALIGN=LEFT>























































</td>
</tr>
</table>

<!-- begin footer information -->



</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -