Upload
salaam
View
42
Download
2
Embed Size (px)
DESCRIPTION
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. - PowerPoint PPT Presentation
Citation preview
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 serverNnrpd Handles local readersExpire Removes old newsNntpsend Exchange news /etc/news/nntpsend.ctlCtlinnd 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 format
parameter: value
• ParametersMta Mail Transfer Agent (sendmail)Organization Header in all articles posted from our systemOvmethod Overview storage methodesPathost Add this host to the news path that passws this systemPathnews Wehere inn binaries livesDomain the domain name of this serverAllownewnewsStorageapiHiscachesizeinnflags
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 description1) The name of the feed’s: feed.domain.com, feed2.dom.com2) Newsgroups patterns as *,@alt.binaries.warez.*,!sex.*,!local*
@ drops news patter! Dont distribute further* All matches
3) Feed entry type4) External programs/files /usr/bin/controlchan
Understanding incoming.conf• Describes which host is allowed to feed me weth news
Peer 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/24default:”<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
# chkconfig –level 35 innd on
# 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
# service innd restart
Setting up Local Newsgroups• Defining a newsgroup hirarchy
ikea.general ikea.forsale ikea.technical.hardwareIkea.weekly.news ikea.jobs ikea.technical.softwareIkea.weekly.menu ikea.wanted ikea.os.redhat
• Updating configuration filesAdd descriptions on those newsgroups in /var/lib/news/newsgroups
ikea.general Various information about anythingikea.forsale Employees forsale anything
After this, add the ME entry in /etc/news/newsfeeds fileME : !ikea.*
Nex you need a storage methode in: /etc/news/storage.confmethod tradspool {
class: 1newsgroups: ikea.*
}
• Restart innd # 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. . .