configuring linux news servers objectives –this chapter will show you how to install and use news...
TRANSCRIPT
Configuring Linux News Servers
• Objectives– This chapter will show you how to install and use News servers
• Contents– Understanding news
– Installing News software
– Configuring and starting the INN server
– Setting up local newsgroups
• Practical– Setting up local newsgroups
Understanding newsgroups
• Usenet a store and forward messaging network– News and Mail are relayed from one system to another
– Uses NNTP protocol RFC 977
– Can use the UUCP for modem users
• Reading news– You need a newsfeed
– Newsreader
– Mozilla mail
– Slrn
– Newsreader
– List of newsgroups
• News Hierarchy– comp.os.linux.announce
• Subscribing– .newsrc list of newsgroups that newsreader reads
The INN server
• News database: /var/spool/news– Can take up anything between 10Megabyte to 5Gigabyte
• Cronjob for cleaning up stale news– /usr/lib/news/bin/news.daily
• INN server programsInnd The news server
Nnrpd Handles local readers
Expire Removes old news
Nntpsend Exchange news /etc/news/nntpsend.ctl
Ctlinnd Interactive shell for innd server
• Main config files/etc/news/inn.conf INND server main configuration
/etc/news/newsfeeds Downstream news feed
/etc/news/incoming.conf Declares incoming newsfeeds
/var/lib/news/newsgroups List newsgropus
/etc/news/readers.conf Declares hosts that are allowed to read news
Understanding inn.conf
• File formatparameter: value
• ParametersMta Mail Transfer Agent (sendmail)
Organization Header in all articles posted from our system
Ovmethod Overview storage methodes
Pathost Add this host to the news path that passws this system
Pathnews Wehere inn binaries lives
Domain the domain name of this server
Allownewnews
Storageapi
Hiscachesize
innflags
Understanding newsfeeds
• Declares how incoming news articles are redistributed to other servers, news feeds to others.
• Format of newsfeed file:Site[/exclude, exclude…]:pattern,pattern…[/distrib, distrib…]:flag,flag…:param
• Format explained, colon separated :Field description
1) The name of the feed’s: feed.domain.com, feed2.dom.com
2) Newsgroups patterns as *,@alt.binaries.warez.*,!sex.*,!local*
@ drops news patter
! Dont distribute further
* All matches
3) Feed entry type
4) External programs/files /usr/bin/controlchan
Understanding incoming.conf
• Describes which host is allowed to feed me weth newsPeer myfeed {
hostname: myfeedsite.com
}
Myfeed is a label for the peer and myfeedsite.com is the peer that feed us with news
Understanding readers.conf• Declares this server allowed clients that can read news and post news
Auth ”localhost” {
hosts: ”localhost, 127.0.0.1, stdin”
default:”<localhost>”
}
Access ”localhost” {
users: ”<localhost>
newsgroups: ”*”
access RPA
}
Auth ”localnet” {
hosts: 192.168.0.0/24
default:”<localnet>”
}
Access ”localnet” {
users: ”<localnet>
newsgroups: ”*”
access RPA
}
Starting the INN server
• You need to prepare your INN history database
• INN is a stand alone server
• Start INND
• Remember to restart INND when you do changes
# /usr/lib/news/bin/makehistory –b –f history 0 –l 30000 –I# cd /var/lib/news# /usr/lib/news/bin/makedbz –s `wc –l < history` -f history# chown news.news *# chown news.news /var/spool/news/overview/group.index# chmod 664 /var/spool/news/overview/group.index
# /usr/lib/news/bin/makehistory –b –f history 0 –l 30000 –I# cd /var/lib/news# /usr/lib/news/bin/makedbz –s `wc –l < history` -f history# chown news.news *# chown news.news /var/spool/news/overview/group.index# chmod 664 /var/spool/news/overview/group.index
# chkconfig –level 35 innd on# chkconfig –level 35 innd on
# service innd start# service innd start
# ps ax23789 ? S 0:00 /usr/lib/news/bin/innd –p423794 ? S 0:00 /usr/bin/perl
/usr/lib/news/bin/controlchan
# ps ax23789 ? S 0:00 /usr/lib/news/bin/innd –p423794 ? S 0:00 /usr/bin/perl
/usr/lib/news/bin/controlchan
# service innd restart# service innd restart
Setting up Local Newsgroups
• Defining a newsgroup hirarchyikea.general ikea.forsale ikea.technical.hardware
Ikea.weekly.news ikea.jobs ikea.technical.software
Ikea.weekly.menu ikea.wanted ikea.os.redhat
• Updating configuration filesAdd descriptions on those newsgroups in /var/lib/news/newsgroups
ikea.general Various information about anything
ikea.forsale Employees forsale anything
After this, add the ME entry in /etc/news/newsfeeds file
ME : !ikea.*
Nex you need a storage methode in: /etc/news/storage.conf
method tradspool {
class: 1
newsgroups: ikea.*
}
• Restart innd # service innd restart# service innd restart
Adding the newsgroups
• The final step is to add the newsgroups
• Testing my newsserverOpen your web browser (mozilla) and in address field type: news:ikea.general
# /usr/lib/news/bin/ctlinnd newgroup ikea.general# /usr/lib/news/bin/ctlinnd newgroup ikea.news# /usr/lib/news/bin/ctlinnd newgroup ikea.menu. . .
# /usr/lib/news/bin/ctlinnd newgroup ikea.general# /usr/lib/news/bin/ctlinnd newgroup ikea.news# /usr/lib/news/bin/ctlinnd newgroup ikea.menu. . .