rhl6u091

Lemur zaprasza

Red Hat® Linux 6 Unleashed










Chapter 10: Internet News





Previous
ChapterNext
Chapter










Sections in this Chapter:








Linux
and Newsgroups





Introduction to NNTPCache






INN Hardware
and Software Requirements





Introduction
to trn






An Introduction
to INN











 

Previous
SectionNext
Section






Introduction to NNTPCache



How NNTPCache
Works






Downloading and
Configuring NNTPCache







As mentioned before,
many companies and individuals run an NNTP Cache instead of getting a full newsfeed.
This saves money. The NNTP Cache described in this chapter is probably the most
popular, and is called NNTP Cache. At the time of this writing, NNTPCache was
not shipping with Red Hat, but it is
easily downloadable from .
It should be noted that NNTPCache is free for individuals and non-profit organizations,
but that it should be licensed for commercial environments. See the LICENSING
file
in the distribution for more information.



How NNTPCache Works
NNTPCache was
designed
to look like a regular NNRP-based server that any newsreader can connect to--but
with a difference! You specify in the configuration a default news server that
NNTPCache gets its articles from; this is normally your ISP's news server.
For example, if you are reading the comp.os.linux.advocacy newsgroup, each
article you choose to read is retrieved from your default news server and a copy
is kept on your NNTPCache server--this process is called caching the
articles.Not only articles are cached, but the news
server's active lists are as well. An active
list
is the current newsgroup listing for that particular news server. This is useful
because the list doesn't have to be refetched every time you open your
newsreader.Another useful NNTPCache feature is that
it can connect to multiple news servers. There are a number of public news
servers on the Internet that are usually related to a particular topic. As an
example, Microsoft provide a news server called msnews.microsoft.com and has
specific newsgroups on Microsoft-related topics. (Newsgroups are named
microsoft.*.) Similarly, Red Hat has a news server called news.redhat.com.
(Newsgroups are named redhat.*.) To make full use of this neat feature,
configure NNTPCache to talk to specific servers and link newsgroups with these
servers. When you are at the newsreader, it makes browsing through all the
different groups on all the different news servers transparent and it caches it
all for you!Obviously, to make full use of
NNTPCache's caching abilities you will need a reasonably permanent Internet
connection and many people using your NNTPCache server. Even if you use casual
dial-up connections, it is still of use. You might, however, want to configure
NNTPCache to use a smaller amount of disk space for its cache, or turn off
caching altogether.



Downloading and Configuring NNTPCache
Because NNTPCache is
not part of the standard Red Hat 6.0 distribution, you have to download it.
This is a pretty simple process, since there is already an RPM at the NNTPCache
Web site.
Go to
and scroll down to where it mentions the Red Hat RPM package; download it onto
your machine. The RPM version is slightly older, but will suffice for explaining
the concepts in this section. If you feel adventurous you can have a go at downloading
the newer version, compiling and installing it yourself.
After
you have the NNTPCache RPM downloaded, you need to install it with this
command:



rpm --i nntpcache-1.0.7.1-1.i386.rpm

This installs the configuration files under /etc/nntpcache, some
documentation in /usr/doc/nntpcache-1.0.7.1-1, and the NNTPCache server that
does all the work in /usr/sbin. Of course, the appropriate startup files are
installed in the /etc/rc.d
tree.Getting
up and running should not take very long. Go into the /etc/nntpcache directory
and enter the ls
command:



[root@mycompany /etc/nntpcache]# ls --l
total 26
-rw-r--r-- 1 news news 3584 Apr 27 23:05 access
-rw-r--r-- 1 news news 9315 Apr 27 23:04 config
-rw-r--r-- 1 news news 862 Apr 30 22:11 servers
-rw-r--r-- 1 news news 2612 Jan 21 1998 spam.filter

There are three main configuration files:
access, config, and
servers. There is another file,
spam.filter, which contains special search strings
that help filter out junk news postings. The default setup for this file should
be fine.The first file to configure is the
access
file.
Hosts that are allowed to use the NNTPCache are named here. You can also specify
access permissions for the hosts specified here. You will generally allow read
and post for hosts on your network, but there may be times where you only want
to give read-only access--if you are running some support newsgroups that can be
accessed from the Internet for a particular product you maintain, for example.
For now, insert an entry to allow the machines on your LAN to
access
NNTPCache:



*.mycompany.com * read,post

The next file to
configure
is config. This file is read by NNTPCache when it
starts. You should probably only need to change the organization field to get
yourself up and running:



Organization MyCompany Pty Ltd

This fills in the organization field when the newsreader does
not specify one. You can also force this to be the organization by changing the
next parameter from no to
yes:



ReplaceOrganization yes

You may find that there are other parameters you need to tweak
later on, but this will do for now.The final file
that you
need to edit is servers. This is where you specify
all the newsfeeds you want to use with your NNTPCache. The
servers file that came with the NNTPCache
distribution has many examples that you might want to refer to later, so I
suggest renaming the existing servers file to
servers.old and creating a new one with the
following entries in it:



# /* timeouts */
# host:port Interface Active Act.tim Newsgrp Group Xover Arts
news.myisp.net:119 DEFAULT 10m 12h 12h 10m 60d 60d
msnews.microsoft.com:119 DEFAULT 24h 4d 4d 60m 60d 60d
news.redhat.com:119 DEFAULT 24h 4d 4d 30m 60d 60d
%BeginGroups
# Group pattern Host
* news.myisp.net:119
microsoft.* msnews.microsoft.com:119
redhat.* news.redhat.com:119

Make sure this new servers file is
owned by the news user and the
news group.The first
three entries specify which news servers to use.
Replace news.myisp.net with the name of the
news server that your ISP provides. Notice that I
have included the Microsoft and Red Hat news
servers. You will see that there are a few timeout entries in the
servers file after each
news server. I briefly describe what each one is
used for. The Active parameter directs how long the
active file will be kept before being retrieved
again. Act.tim is in regards to the
active.times file.
Newsgrp is referring to the
newsgroups
file,
which has all the newsgroup descriptions contained in it. The next one,
Group, is the amount of time the NNTP
group command is cached for.
Xover is another NNTP command. It is used to get the
subject and other header information of article numbers given as parameters.
Finally, Arts is the timeout for the NNTP command,
Arts. For full details on any of these NNTP commands
or NNTP files, refer to the NNTP RFC, which is included as part of the NNTPCache
distribution. It should have been installed into the directory
/usr/doc/nntpcache-1.0.7.1-1 and called
rfc977.txt.After the
%BeginGoups line is where you tell NNTPCache to
retrieve articles for each set of newsgroups. NNTPCache tries to match the
requested newsgroup with all entries listed, and the last match is the one that
is used. With the file configurations as set here, all Microsoft newsgroups
should use the msnews.microsoft.com news server. All Red Hat newsgroup requests
go out to news.redhat.com, and for every other group, NNTPCache goes to
news.myisp.net. Again, replace that specification with your
own.Now that NNTPCache is configured, you have to
start it. You can do so with this command:



[root@mycompany /etc/nntpcache]# /etc/rc.d/init.d/nntpcached start

Also, whenever you restart your Red Hat Linux server, it should
automatically start on boot. Now you have NNTPCache running; you can start your
favorite newsreaders! If you are using a text-based newsreader such as tin or
trn, set your NNTPSERVER environment variable to
point to your NNTPCache machine:



$ export NNTPSERVER=nntpcache.mycompany.com

If you need more information on NNTPCache, read the documents
in the /usr/doc/ nntpcache-1.0.7.1-1/ directory, or visit the NNTPCache home
page on
the Internet.





Red Hat® Linux 6 Unleashed










Chapter 10: Internet News





Previous
ChapterNext
Chapter










Sections in this Chapter:








Linux
and Newsgroups





Introduction to NNTPCache






INN Hardware
and Software Requirements





Introduction
to trn






An Introduction
to INN











 

Previous
SectionNext
Section





© Copyright Macmillan USA. All rights reserved.

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • teen-mushing.xlx.pl
  • Wątki
    Powered by wordpress | Theme: simpletex | © Lemur zaprasza