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.
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
|
||
This looks for the command
perl in your search path.
|
||
user:
PATH=$PATH:/opt/perl/bin
|
||
This adds the directory
/opt/perl/bin to your search path.
|
||
user: perl
--version
|
The source for INN can be downloaded from the ISC at:
You will also need to download an initial active
file and newsgroups
file.
user: ftp
ftp.isc.org
|
||
You should use your own e-mail address for the password as a matter of courtesy. | ||
230 Guest login ok, access
restrictions apply.
|
||
Later in this installation I've
assumed these files are now in
/home/user .
|
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
|
||
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.
|
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
|
||
Create /opt/news and
/var/news if needed.
|
||
root: chown
news.news /var/news /opt/news
|
||
Set the ownership and permissions on these directories. | ||
root: make
install
|
||
Install the server, manuals, and default configuration. |
root: su
news
|
|||
Become the news user. | |||
news: cd
/opt/news/etc
|
|||
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:
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
|
|||
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
|
|||
This generates the
history files that will be needed, and gives
them the correct permissions.
|
news:
rc.news
|
||
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 .
|
Ideally the news server should be started automatically as the system boots. The following script will do this:
root: cd
/etc/rc2.d
|
||
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.
|