Installing INN

This describes how to install and configure the Usenet news server INN. The setup uses the "traditional" method of storing the news articles which is well suited to a home node which take a feed of only a few groups.

Prerequisites

The installation and the running news server need Perl 5.004 or greater. Determine where your perl is installed, and ensure it is in your PATH.

  user: which perl
No perl in /usr/bin /usr/ccs/bin
  This looks for the command perl in your search path.
user: PATH=$PATH:/opt/perl/bin
user: export PATH

This adds the directory /opt/perl/bin to your search path.
user: perl --version

This is perl, version 5.004_04 built for sun4-solaris

Copyright 1987-1997, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5.0 source kit.

Downloads

The source for INN can be downloaded from the ISC at:

http://www.isc.org/products/INN/

You will also need to download an initial active file and newsgroups file.

  user: ftp ftp.isc.org
Connected to isrv4.pa.vix.com.
220 isrv4.pa.vix.com FTP server (Version wu-2.6.0(1) Tue Nov 30 17:39:57 PST 1999) ready.
Name (ftp.isc.org:dcooke):
anonymous
331 Guest login ok, send your complete e-mail address as password.
Password:
user@vixen.den.org
  You should use your own e-mail address for the password as a matter of courtesy.
230 Guest login ok, access restrictions apply.
ftp>
cd /put/usenet/CONFIG
ftp> binary
ftp> get active.gz
ftp> get newsgroups.gz
ftp> bye
  Later in this installation I've assumed these files are now in /home/user.

Compilation

  user: gzcat inn-2.2.2.tar.gz | tar -xvf -
  This uncompresses and unpacks the archive, creating a directory called inn-2.2.2.
user: cd inn-2.2.2
At this point its probably worth stopping to read the INSTALL file, particularly if you have a version of INN other than 2.2.2. This describes the setup of the traditional storage method, which is well suited to a home configuration taking a small subset of the available newsgroups.
user: ./configure --prefix=/opt/news --enable-tagged-hash --with-perl --with-sendmail=/usr/lib/sendmail
Much output
Please check the following files before running make, to ensure that
everything was set correctly.

    Makefile.global
    include/config.h
    include/paths.h
    innfeed/config.h
Runs the automatic configuration script that generates the files needed to compile the server.
Do check these files. The definition of PATHSPOOL in Makefile.global needs changing.
user: vi Makefile.global
Change the line that reads:

PATHSPOOL       = /opt/news/spool
          
to

PATHSPOOL       = /var/news/spool
          
user: make
Build the server, this may take a while.
user: vi makedirs.sh
Verify that the definition of PATHSPOOL is correct, it should be /var/news/spool. If it is not, then change it.

Installation

You need to be root to install the server. Create a group called news and a user called news. Often the news user had a UID of 10. This user's home directory should be /opt/news. The mechanics of this will depend on your system.

  root: mkdir /opt/news
root: mkdir /var/news
  Create /opt/news and /var/news if needed.
  root: chown news.news /var/news /opt/news
root: chmod 775 /var/news /opt/news
Set the ownership and permissions on these directories.
  root: make install
Install the server, manuals, and default configuration.

Basic configuration

  root: su news
  Become the news user.
  news: cd /opt/news/etc
news: vi inn.conf
Change the organisation to any suitable description, such as your company name (if you are a company).

organisation:           A poorly-installed InterNetNews site

          
to:

organisation:           Fox den

          
Change pathhost to the fully specified domain name of your machine.

pathhost:               vixen

          
to:

pathhost:               vixen.den.org

          
Add -L to innflags to support the use of crosspost (see later).

innflags:

          
to:

innflags:               -L

          
Change the various path lines to match the installation.

pathspool:              /opt/news/spool
patharticles:           /opt/news/spool/articles
pathoverview:           /opt/news/spool/overview
pathoutgoing:           /opt/news/spool/outgoing
pathincoming:           /opt/news/spool/incoming
patharchive:            /opt/news/spool/archive
pathuniover:            /opt/news/spool/uniover

          
to:

pathspool:              /var/news/spool
patharticles:           /var/news/spool/articles
pathoverview:           /var/news/spool/overview
pathoutgoing:           /var/news/spool/outgoing
pathincoming:           /var/news/spool/incoming
patharchive:            /var/news/spool/archive
pathuniover:            /var/news/spool/uniover

          
  news: vi newsfeeds
Change the base configuration to allow any group except junk and those in the control, local and foo hierarchies, and any distribution except local.

ME\
        :*,@alt.binaries.warez.*,!junk,!control*,!local*,!foo.*\
                /world,usa,na,gnu,bionet,pubnet,u3b,eunet,vmsnet,inet,ddn,k12\
        ::

          
to:

ME\
        :*,!junk,!control*,!local*,!foo.*\                      
                /!local\
        ::

          
Enable creation of links for crossposted articles:

## Create the links for cross posted articles
## If you use this you MUST add -L option to innflags in inn.conf.
## see innd(8)
# crosspost:*:Tc,Ap,WR:/opt/news/bin/crosspost

          
to:

## Create the links for cross posted articles
## If you use this you MUST add -L option to innflags in inn.conf.
## see innd(8)
crosspost:*:Tc,Ap,WR:/opt/news/bin/crosspost

          
Enable creation of links for crossposted articles:

##  News overview
# use this flag if storage api is used
#overview!:*:Tc,Ao,WhR,S30000:/opt/news/bin/overchan
# else
#overview!:*:Tc,WO,S30000:/opt/news/bin/overchan

          
to:

##  News overview
# use this flag if storage api is used
#overview!:*:Tc,Ao,WhR,S30000:/opt/news/bin/overchan
# else
overview!:*:Tc,WO,S30000:/opt/news/bin/overchan

          
news: vi expire.ctl
I don't have a huge amount of space to play with, so I need to be careful about expiring articles. Ensure that no article is kept for more than 14 days:

##  Keep for 1-10 days, allow Expires headers to work.
*:A:1:10:never

          
to:

##  Keep for 1-10 days, allow Expires headers to work.
*:A:1:10:14

          
news: vi nnrp.access
In order to allow hosts within the den.org domain to read and post to the server, add the following lines to the end of the file:

*.den.org:Read Post:::*

# EOF

          
The next step is to configure the list of active newsgroups that your server will work with. The active file downloaded earlier will contain many country and ISP specific groups you will never need.

You will need the following groups:

  • control*
  • junk
You should probably take the big worldwide hierarchies:
  • alt.*
  • comp.*
  • net.*
  • news.*
  • sci.*
  • soc.*
  • rec.*
  • talk.*
Since I'm a resident of the United Kingdom, I'll also take the UK groups:
  • uk.*
The active file isn't in any kind of order that's useful. You could edit the file by hand, but the method below is probably the simplest:
news: cd /opt/news/db
news: cp /home/user/active.gz .
news: cp /home/user/newsgroups.gz .
news: zgrep "^control" active.gz > active
news: zgrep "^junk" active.gz >> active
news: zgrep "^alt" active.gz >> active
news: zgrep "^comp" active.gz >> active
news: zgrep "^net" active.gz >> active
news: zgrep "^news" active.gz >> active
news: zgrep "^sci" active.gz >> active
news: zgrep "^soc" active.gz >> active
news: zgrep "^talk" active.gz >> active
news: zgrep "^uk" active.gz >> active
Note: these are just the groups your server knows about you won't have to download all these groups. There's little overhead in knowing about lots of groups you don't use, but it can improve the scoring features of news reader clients, particularly when identifying spam.
news: gunzip newsgroups.gz
Unpack the newsgroups file that contains a short description for each news group.
news: makehistory -i
news: mv history.n.dir history.dir
news: mv history.n.pag history.pag
news: chmod 0664 *
This generates the history files that will be needed, and gives them the correct permissions.

Start the news server

  news: rc.news
Starting innd.
Scheduled start of /opt/news/bin/innwatch.
  This script checks for the case where the news server wasn't shut down cleanly, and removes various lock files and so on.
news: crontab -e
Add the line:

0 3 * * * /opt/news/bin/news.daily expireover lowmark
          
news: ctlinnd newgroup den.test y marian
This creates a new newsgroup called den.test which allows posting, and was created by marian.

Configure automatic start of the news demons

Ideally the news server should be started automatically as the system boots. The following script will do this:

  root: cd /etc/rc2.d
root: vi S99news
  Enter the following script:

#!/sbin/sh
#
# Start/Stop INN demon
#
 
case "$1" in
    'start')
        if [ -f /opt/news/bin/innd -a -f /opt/news/etc/inn.conf ]
        then
            su news -c /opt/news/bin/rc.news
        fi
        ;;
 
    'stop')
        su news -c "/opt/news/bin/ctlinnd throttle init-stop"
        su news -c "/opt/news/bin/ctlinnd shutdown init-stop"
        ;;
 
    *)
        echo "Usage: $0 { start | stop }"
        exit 1
        ;;
esac
exit 0
 
# EOF

          
This script will run the rc.news script as the news user on startup, and throttle and then shutdown the server if asked to stop.