527 lines
8.8 KiB
HTML
527 lines
8.8 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>Installation</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
|
|
REL="HOME"
|
|
TITLE="Linux Network Administrators Guide"
|
|
HREF="index.html"><LINK
|
|
REL="UP"
|
|
TITLE="C News"
|
|
HREF="x-087-2-cnews.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Delivering News"
|
|
HREF="x-087-2-cnews.rnews.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="The sys File"
|
|
HREF="x-087-2-cnews.sys.html"></HEAD
|
|
><BODY
|
|
CLASS="SECT1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Linux Network Administrators Guide</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x-087-2-cnews.rnews.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Chapter 21. C News</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x-087-2-cnews.sys.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="AEN16700"
|
|
>21.2. Installation</A
|
|
></H1
|
|
><P
|
|
>
|
|
|
|
C News should be available in a prepackaged format for any modern Linux
|
|
distribution, so installation will be easy. If not, or if you want to
|
|
install from the original source distribution, then of course you
|
|
can.<A
|
|
NAME="X-087-2-FNCN03"
|
|
HREF="#FTN.X-087-2-FNCN03"
|
|
>[1]</A
|
|
> No matter how you install it, you will need to edit the C
|
|
News configuration files. Their formats are described in the following
|
|
list:</P
|
|
><P
|
|
></P
|
|
><DIV
|
|
CLASS="VARIABLELIST"
|
|
><DL
|
|
><DT
|
|
><TT
|
|
CLASS="FILENAME"
|
|
>sys</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
> The <TT
|
|
CLASS="FILENAME"
|
|
>sys</TT
|
|
> file controls which newsgroups your site
|
|
receives and forwards. We discuss it in detail in the following
|
|
section.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="FILENAME"
|
|
>active</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Not usually edited by the administration; contains directions for handling
|
|
articles in each newsgroup the site handles. </P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="FILENAME"
|
|
>organization</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>This file should contain your organization's name, for example,
|
|
“Virtual Brewery, Inc.” On your home machine, enter
|
|
“private site,” or anything else you like. Most people
|
|
will not consider your site properly configured if you haven't customized
|
|
this file.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="FILENAME"
|
|
>newsgroups</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>This file is a list of all newsgroups, with a one-line description of each
|
|
one's purpose. These descriptions are frequently used by your newsreader
|
|
when displaying the list of all groups to which you are subscribed.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="FILENAME"
|
|
>mailname</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Your site's mail name, e.g., <SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>vbrew.com</SPAN
|
|
>.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="FILENAME"
|
|
>whoami</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Your site's name for news purposes. Quite often, the UUCP site name is used,
|
|
e.g., <SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>vbrew</SPAN
|
|
>.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="FILENAME"
|
|
>explist</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>You should probably edit this file to reflect your preferred expiration times
|
|
for special newsgroups. Disk space may play an important role in your choices.</P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
><P
|
|
>
|
|
To create an initial hierarchy of newsgroups, obtain
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>active</TT
|
|
> and <TT
|
|
CLASS="FILENAME"
|
|
>newsgroups</TT
|
|
> files
|
|
from the site that feeds you. Install them in <TT
|
|
CLASS="FILENAME"
|
|
>/etc/news</TT
|
|
>,
|
|
making sure they are owned by <SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>news</SPAN
|
|
> and
|
|
have a mode of 644, using the <B
|
|
CLASS="COMMAND"
|
|
>chmod</B
|
|
> command. Remove all
|
|
<SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>to.*</SPAN
|
|
> groups from the active file,
|
|
and add <SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>to.my-site</SPAN
|
|
>,
|
|
<SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>to.feed-site</SPAN
|
|
>,
|
|
<SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>junk</SPAN
|
|
>, and
|
|
<SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>control</SPAN
|
|
>. The
|
|
<SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>to.*</SPAN
|
|
> groups are normally used for
|
|
exchanging ihave/sendme messages, but you should list them regardless of
|
|
whether you plan to use ihave/sendme or not. Next, replace all article
|
|
numbers in the second and third field of <TT
|
|
CLASS="FILENAME"
|
|
>active</TT
|
|
> using
|
|
the following commands:
|
|
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
># <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>cp active active.old</B
|
|
></TT
|
|
>
|
|
# <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>sed 's/ [0-9]* [0-9]* / 0000000000 00001 /' active.old > active</B
|
|
></TT
|
|
>
|
|
# <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>rm active.old</B
|
|
></TT
|
|
></PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>
|
|
The second command invokes the <B
|
|
CLASS="COMMAND"
|
|
>sed</B
|
|
> stream
|
|
editor. This invocation replaces two strings of digits with a string of
|
|
zeroes and the string <TT
|
|
CLASS="LITERAL"
|
|
>000001</TT
|
|
>, respectively.</P
|
|
><P
|
|
>Finally, create the news spool directory and the subdirectories used for
|
|
incoming and outgoing news:
|
|
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
># <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>cd /var/spool</B
|
|
></TT
|
|
>
|
|
# <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>mkdir news news/in.coming news/out.going news/out.master</B
|
|
></TT
|
|
>
|
|
# <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>chown -R news.news news</B
|
|
></TT
|
|
>
|
|
# <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>chmod -R 755 news</B
|
|
></TT
|
|
></PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>If you're using precompiled newsreaders sourced from a different
|
|
distribution to the C News server you have running, you may find that
|
|
some expect the news spool in <TT
|
|
CLASS="FILENAME"
|
|
>/usr/spool/news</TT
|
|
>
|
|
rather than <TT
|
|
CLASS="FILENAME"
|
|
>/var/spool/news</TT
|
|
>. If your newsreader
|
|
doesn't seem to find any articles, create a symbolic link from
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/usr/spool/news</TT
|
|
> to
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/var/spool/news</TT
|
|
> like this:
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
># <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>ln -sf /usr/spool/news /var/spool/news</B
|
|
></TT
|
|
></PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>Now you are ready to receive news. Note that you don't have to create the
|
|
individual newsgroup spool directories. C News automatically creates
|
|
spool directories for any newsgroup it receives an article for, if one doesn't
|
|
already exist.</P
|
|
><P
|
|
>In particular, this happens to <I
|
|
CLASS="EMPHASIS"
|
|
>all</I
|
|
> groups to which an
|
|
article has been cross-posted. So, after a while, you will find your news spool
|
|
cluttered with directories for newsgroups you have never subscribed
|
|
to, like <SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>alt.lang.teco</SPAN
|
|
>. You may
|
|
prevent this by either removing all unwanted groups from
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>active</TT
|
|
>, or by regularly running a shell script that
|
|
removes all empty directories below <TT
|
|
CLASS="FILENAME"
|
|
>/var/spool/news</TT
|
|
>
|
|
(except <TT
|
|
CLASS="FILENAME"
|
|
>out.going</TT
|
|
> and <TT
|
|
CLASS="FILENAME"
|
|
>in.coming</TT
|
|
>,
|
|
of course).</P
|
|
><P
|
|
>
|
|
|
|
|
|
C News needs a user to send error messages and status reports to. By
|
|
default, this is <SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>usenet</SPAN
|
|
>. If you
|
|
use the default, you have to set up an alias for it that forwards all
|
|
of its mail to one or more responsible person. You may also override
|
|
this behavior by setting the environment variable <SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>NEWSMASTER</SPAN
|
|
> to the appropriate name. You
|
|
have to do so in <SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>news</SPAN
|
|
>'s
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>crontab</TT
|
|
> file, as well as every time you invoke an
|
|
administrative tool manually, so installing an alias is probably
|
|
easier. Mail aliases are described in <A
|
|
HREF="x-087-2-sendmail.html"
|
|
>Chapter 18</A
|
|
>, and <A
|
|
HREF="x-087-2-exim.html"
|
|
>Chapter 19</A
|
|
>.</P
|
|
><P
|
|
>
|
|
|
|
While you're hacking <TT
|
|
CLASS="FILENAME"
|
|
>/etc/passwd</TT
|
|
>, make sure that every
|
|
user has her real name in the <SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>pw_gecos</SPAN
|
|
>
|
|
field of the password file (this is the fourth field). It is a question of
|
|
Usenet netiquette that the sender's real name appears in the
|
|
<TT
|
|
CLASS="LITERAL"
|
|
>From:</TT
|
|
> field of the article. Of course, you will want to
|
|
do so anyway when you use mail.</P
|
|
></DIV
|
|
><H3
|
|
CLASS="FOOTNOTES"
|
|
>Notes</H3
|
|
><TABLE
|
|
BORDER="0"
|
|
CLASS="FOOTNOTES"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
WIDTH="5%"
|
|
><A
|
|
NAME="FTN.X-087-2-FNCN03"
|
|
HREF="x16700.html#X-087-2-FNCN03"
|
|
>[1]</A
|
|
></TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
WIDTH="95%"
|
|
><P
|
|
>You can obtain the C News source distribution from its home site at
|
|
<SPAN
|
|
CLASS="SYSTEMITEM"
|
|
>ftp.cs.toronto.edu</SPAN
|
|
>
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>/pub/c-news/c-news.tar.Z</TT
|
|
></P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-cnews.rnews.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-cnews.sys.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Delivering News</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-cnews.html"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>The sys File</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |