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

📄 lsg39.htm

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




</FONT>







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







The remote can send and receive articles.</FONT>







<TR>







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







no







</FONT>







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







The remote has no access to articles.</FONT>







</TABLE><P>The third field indicates whether the remote site can post articles. If the keyword post is used, the remote can send articles and the local NNTP system completes the header information. If the keyword no appears in the second or third field, the remote cannot post articles.







<BR>







<P>The last field identifies any newsgroups that the remote is denied access to. The newsgroups are separated by commas, and an exclamation mark preceds the field (you will see this format frequently in C News). For example, the entry







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">chatton.bignet.com both post !alt,local</FONT></PRE>







<P>allows the remote machine chatton.bignet.com to send and receive all articles except those in the alt and local newsgroup hierarchies. The remote may also post articles.







<BR>







<P>Usually, you set up the /usr/lib/news/nntp_access so that there is a default value for all machines, and then add specific entries for machines you want to work with. Look at the following sample /usr/lib/news/nntp_access file:







<BR>







<PRE>







<FONT COLOR="#000080"># default entry







default xfer no







# allow chatton full access







chatton.bignet.com both post







# allow brutus to read but not post







brutus.bignet.com read no</FONT></PRE>







<P>This file lets any machine other than those explicitly specified transfer articles to your machine but not post articles. The machine called chatton can read and post articles, but brutus can only read articles.







<BR>







<P>Some versions of NNTP have implemented authorization systems to ensure that your machine does not get fooled into thinking another machine is at the other end of a connection. The authorization system has not been working well for most versions of nntpd and is best left alone at this point. Check future releases of nntpd for more information about the authorization process.







<BR>







<BR>







<A NAME="E68E212"></A>







<H3 ALIGN=CENTER>







<CENTER>







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







<BR>







<P>The Internet News (NNT) package is an alternative to NNTP. INN is designed to handle much larger and more complex news systems than NNTP and is therefore not used as much with Linux. However, there is no reason why you can't employ INN instead of NNTP on your Linux system. An INN version is included with most Linux distributions. If you have to support complex mail systems, the INN configuration process can get convoluted. For simpler LAN and stand-alone systems, though, you can easily configure INN for typical usage.







<BR>







<P>INN's behavior revolves around the server daemon called innd. The innd daemon does more than the nntpd daemon because it allows multiple streams to be handled at once. A different daemon, called nnrpd, handles the newsreader service, and a dedicated copy is spawned for each newsreader client application.







<BR>







<BR>







<A NAME="E69E236"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Installing the INN Software</B></FONT></CENTER></H4>







<BR>







<P>Most Linux distributions (including the Slackware CD-ROM accompanying this book) include the precompiled binaries for INN, so you needn't bother generating the binaries from the source code. If you have to generate the binaries, use the Makefile that builds the application. Check the Makefile and accompanying source file documentation for compilation instructions if you have to compile the code.







<BR>







<P>Once you have the INN binaries ready, you can follow a straightforward procedure to install the software in the proper locations and with the correct permissions and ownerships. Follow these steps:







<BR>







<OL>







<LI>If one doesn't already exist in /etc/passwd, create a user called news. Also create a group called news if one doesn't already exist in the /etc/group file. The news user should belong to the news group by default.







<BR>







<BR>







<LI>If one doesn't already exist, create a mail alias in the alias file (usually /usr/lib/aliases) for the username usenet to the root, postmaster, or other username that is used at regular intervals. (This alias must exist because some INN scripts send mail to the user usenet, which can be redirected by the alias entry.) If you have to add the alias, you must rebuild the alias database using the newaliases command.







<BR>







<BR>







<LI>Check the system startup files for an entry for the INN daemons. These daemons will probably not appear by default, so add the following lines to the startup file (such as rc.local) to call the INN rc startup script:







<BR># start the INN daemon







<BR>/usr/lib/news/etc/rc.news







<BR>







<LI>Create a symbolic link to the new INN news directory with the following command (substitute your directory path):







<BR>ln -s /usr/lib/news /usr/local/lib/news







<BR>You may have to remove the directory /usr/local/lib/news if it already exists before creating the symbolic link. (This step is necessary because most newsreaders expect the news configuration files to be in /usr/lib/news.)







<BR>







<BR>







<LI>Because you will want INN to be running all the time, you should use cron. Edit the file crontab-news to include the name of your newsfeed and local site, and then copy it into the cron spool directory (usually /usr/spool/cron/crontabs) as the news file.







<BR>







<BR>







<LI>Modify the news configuration file /usr/lib/news to include specifics about your newsfeed and local site.







<BR>







<BR>







<LI>Create an empty log file and history database. You can do both tasks with the script makedirs.sh provided with most INN distributions.







<BR>







<BR>







</OL>







<P>After all these steps, INN is ready to start. You can either reboot your machine and let the daemons start from the rc startup files, or execute the daemon directly from the command line.







<BR>







<BR>







<A NAME="E69E237"></A>







<H4 ALIGN=CENTER>







<CENTER>







<FONT SIZE=4 COLOR="#FF0000"><B>Configuring INN</B></FONT></CENTER></H4>







<BR>







<P>When the INN software is installed and the directories are ready, you can configure the software. This section assumes you are working with a fairly straightforward installation where you use one or more newsfeeds and handle the news on the downloading machine. More complex installations are certainly possible with INN, but you should read all the documentation to understand the process.







<BR>







<P>Begin by editing the hosts.nntp file, which lists the newsfeed locations for your system. When a machine connects to the INN daemon, it examines the hosts.nntp file for a match to the connecting machine's IP address or name. If a match is found, INN assumes the machine is feeding news. Otherwise, INN assumes a newsreader wants access and spawns a process (nnrpd) for this function. For this reason, INN must know the IP address or resolvable symbolic name for the newsfeed servers in the hosts.nntp file.







<BR>







<P>To configure the hosts.nntp file, enter the names of the newsfeed machine or machines. The file contains only the name or IP address, one newsfeed on a line. If you have only a single newsfeed called big_boy, the nntp.hosts file looks like the following:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">big_boy:</FONT></PRE>







<P>Note that a colon must follow the name of the newsfeed. Alternatively, you could specify the IP address of big_boy. If you have several newsfeeds, each gets a line of its own. Some systems use a password to log in for newsfeeds. If you need to specify a password, it is included after the colon.







<BR>







<P>Machines that are connecting to act as newsreaders are listed in the file nnrp.access, which is checked by nnrpd when it is spawned. The machine names that are included in nnrp.access must match what the NNTP system thinks the machine name is, not necessarily what you think it is symbolically (or even by IP address). The best way to verify the machine name is to use the finger command. Whatever name finger displays is the name that must be used in nnrp.access. (Usually, this name matches the symbolic name, but some systems have two different names in use.) The syntax of the nnrp.access file is







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">hostname:permission:user:password:groups</FONT></PRE>







<P>where the hostname is the machine name of IP address (wildcards are allowed), permission is Read for read access, Post for post authorization, or RP for both, user is a username used for authentication before posting is allowed, password is a password for authentication, and groups are a pattern of newsgroup names that can be read or not read. If you want to prevent a client from posting, put a space in the user and password field (as they can't be matched). The default settings, if not specified, are no access, no authentication, and no groups, which is written as follows:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">*:: -no- : -no- :!*</FONT></PRE>







<P>To add a machine to the nnrp.access file, use the following syntax and set the permissions:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">*.tpci.com:Read Post:::*</FONT></PRE>







<P>This line lets any machine from the domain tpci.com read and post news in all newsgroups with no authentication process necessary. To create a wide-open system, use the following line:







<BR>







<BR>







<PRE>







<FONT COLOR="#000080">*:Read Post:::*</FONT></PRE>







<P>This line lets anyone read and post. Don't use this line unless you know who can connect to your news system! For a client system to post news to INN, it must use the program inews.







<BR>







<P>Many things can go wrong with INN, but the error messages tend to be useful in isolating the problem. There are usually three files called faq-inn-1, faq-inn-2, and faq-inn3 that describe most aspects of the INN system, including installation, configuration, debugging, and special setups. Consult these files if you have any problems with your INN system.







<BR>







<BR>







<A NAME="E68E213"></A>







<H3 ALIGN=CENTER>







<CENTER>







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







<BR>







<P>Once you have completed the compilation and configuration of the NNTP system, you can continue to configure the underlying news subsystem (usually C News). Once that is done, you should be able to use NNTP to transfer articles from your newsfeed.<A NAME="I2"></A>







<P ALIGN=LEFT>























































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

<!-- begin footer information -->



</body></html>

⌨️ 快捷键说明

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