Next Previous Contents

5. News ·s»D°Q½×¸s

5.1 §Ú­n¦p¦ó³]¥ß¤@­Ó½u¤W·s»DŪ¨ú¾¹©O ?

¥u­n PPP ¦b¹B§@¤¤¡A´N¯àŪ¨ú½u¤Wªº·s»D¸s²Õ news¡C ¦³³\¦h´¨¤â¥i±oªºµ{¦¡¡A²³æ¤¶²Ð¨â­Óµ{¦¡¡G rtin ©M trn.

·Q¶}©lŪ¨únews¡A¤@¯ë¦b«Øºc®É¥u»Ý³]©w NNTPSERVER (³q±`¥u»Ý¦b .profile ÀÉùس]©w¤@¦¸§Y¥i¤@³Ò¥Ã¶h)¡G

export NNTPSERVER=news.acme.xz

¦³¨Çµ{¦¡¦b­n¨ú±o¥¿½Tªº±i¶K ¨Ó·½-¦ì§}®É¡A¥i¯à·|­n¨D¡G

export NNTP_INEWS_DOMAIN=acme.xz

5.2 §Ú­n¦p¦ó³]¥ß¤@­ÓÂ÷½u·s»DŪ¨ú¾¹©O ?

·Q¦bÂ÷½u offline ®ÉŪ¨ú·s»D¸s²Õ news ¨Ó ´î¤Ö¹q¸Ü±b³æ¶O¥Î¥H¤Î¾Ö¦³§ó¤jªº¼u©Ê¡A§Ú­Ì»Ý­n³]©w¤@©Î¦h­Óªº news-spool¡C ³o»Ý­n¤@¨Ç«Øºc¡A·íµM¤]»Ý¨Ï¥Î¨ì¤@©wªººÏºÐªÅ¶¡¡A¦bªì©l¤Æ«á¡A·|²£¥Í©Î¦h©Î¤Öªº¨Æ¡A¦ý ¶¨¦Ó¤~»Ý­n¥h¯d·N¤@¤U¡C

§Ú­Ì¦b³o¨à»¡©ú¨âºØ¸Ñ¨M¤è®×¡G

5.3 §Ú­n¦p¦ó³]¥ß C News?

³o­Ó©Ò´y­zªº¸Ñ¨M¤è®×¬O¥H C News ³o­Ó·s»D¸s²Õ¦øªA¾¹¬°°ò¦¡A ¥B¨Ï¥Î NNTP ¨ó©wªº¡C C News ­ì¥»¬O¥H¨ä¥L«Øºc¬°¥Ø¼Ðªº¡A¦ý¥¦¤]ÆZ²Å¦X³B²z§Ú­Ìªº±¡ªpªº¡C ¤]³\¦³¤H·|¨Ï¥Î¸ûªñ´Áªº INN ·s»D¸s²Õ¦øªA¾¹news server ¡A¦ý¥¦«o¦b¸ê·½¨Ï¥Î¤W¦h¤F¤@¨Ç¡C¤£ºÞ¥ô¦ó¤èªk¡A½Ð¤p¤ß ¤£­n ¨â­Ó³£¦w¸Ë! ¥L­Ì ¤£·|¨º»ò¦n¦b¤@°_¬Û³Bªº¡C

¥H news¬°¨Ï¥ÎªÌ¨Ó¾E¤J¨t²Î¨Ó°µ¬°·s»D¸s²ÕªººûÅ@¬O«Ü­«­nªº¡C ©Ò¦³ªº«ØºcÀɮ׳£³Q©ñ¸m¦b /usr/lib/newsùØ¡C ­n³B²z³o­Ó¡A§Ú­Ì¥i¥H su news; cd¨Ó¾E¤J¬° root ¨Ó³B²z¥¦¡C

¦b«ØºcùØ¡A³Ì­«­n­nªºÀɮ׬O¡G

Dirk Gently's Holistic Detective Agency

ME:all/all::
acme/acme.xz:all,!junk/all:FL:

mkdir /var/spool/news/out.going/acme

C News »Ý­n¨C¤Ñ¤@©wµ{«×ªººûÅ@¡A¦ý¤]¥i¥u¥Î¤@¦¸¤@³Ò¥Ã¶hªº¤èªk ¡A ¨º´N¬O¥H newsªº¨­¥÷¡A¸g¥Ñ crontab -e ©R¥O §Y¥i¹F¦¨¡C«Øij³]¥ßªº¨BÆJ¦p¤U¡A§A¥i¥H·Ó§Aªº»Ý­n¨Ó½Õ¾ã¡G

# ºûÅ@¶i¨Ó©M¥X¥hªº§å¦¸¸ê®Æ
10,40 *  * * * /usr/lib/newsbin/input/newsrun

# ¨C¤Ñ°±¤î C News ¤@¦¸
30 0  * * * /usr/lib/newsbin/expire/doexpire

# ¦p¦³»Ý­n¡AºÊ±±¨Ã³ø§iª¬ªp
00 2  * * sat /usr/lib/newsbin/maint/addmissing
40 3  * * * /usr/lib/newsbin/maint/newswatch
50 3  * * * /usr/lib/newsbin/maint/newsdaily
newsrun ·|²¾¤J¤Î²¾¥X¤å³¹ (¨C¤p®É¤G¦¸)¡A doexpire ·|¦b¤å³¹Åܸû®ɧR°£¥¦­Ì (¨C¤Ñ±q­â±á 00:30¶}©l)¡A³Ì«á­±¨º¤T­Ó©R¥O·| °µ³\¦hªººÊ·þ»P¿ù»~§ó¥¿ªº¤u§@¡C

§Ú­ÌÁÙÀ³¸Ó½T»{¦b±Ò°Ê¾÷¾¹®É¦³¨Ç¨Æ±¡¤w¸g³Q²M²z°®²b¡C¥H rootªº¨­¥÷¡A¦b /etc/rc.d/rc.localÀÉùØ¥[¤J¡G

su news -c /usr/lib/newsbin/maint/newsboot
News ¥i¥H¥Ñ NewsXµ{¦¡¨Ó»`¶°¡C ·|±q NNTP-server ¬D¿ï¸ê°T¡A³o­Óµ{¦¡¥i±q¤U­±¦ì§}§ä¨ì¡G

ftp://sunsite.unc.edu/pub/Linux/system/news/transport/newsx-0.9.tar.gz Or:

ftp://ftp.sol.no/user/egilk/newsx-0.9.tar.gz

³]¥ß NewsX «D±`²³æ¡C ¥u»Ý«Ü¥­±`ªº¨BÆJ§Y¥i¦w¸Ë¥¦¡G

make
su
make install
exit

¦b³o¨à©Ò¤j­P´y­zªº³]¥ß¤¤¡A§A¥u»Ý¥H addgroup ©R¥O¨Ó«Ø¥ß§A­nŪ¨úªº¸s²Õ §Y¥i¡C

­n§ì¨ú¤å³¹®É¡A news ¨Ï¥ÎªÌ¥u­n¤U¹F¤U¦Cªº©R¥O (°²³]¬O¸g¥Ñ PPP ©ÎÃþ¦üªº)¡G

newsrun
newsx acme news.acme.xz
newsrun

³o -d ¿ï¶µ·|¦b¿Ã¹õ¤W¤£°±¦a¦L¥X¡C¸Ô±¡½Ð°Ñ¾\ NewsX ¤å¥ó¡C

NewsX ¤]·|ª`·N¨ì¦V¥~±i¶K·s»D°Q½×¤å³¹¡C

¦b±±¨î·s»D¤å³¹ÅÜ®ɱN¥¦­Ì¥á±óªº¤u§@®É¡A´N»Ý­n explist ³o­ÓÀɮפF¡C ¦b¤U­±ªº¨Ò¤l¤¤´N¸ÑÄÀ¤F§Ú­Ì­n°µªº¤@¤Á¨Æ¤F¡G

# hold onto history lines 14 days, nobody gets >120 days
/expired/                       x       14      -
/bounds/                        x       0-1-120 -

# retain these for 2 months
comp.sources,comp.os.linux.all  x       60      -

# noise gets thrown away fast
junk,control                    x       2       -

# default:  14 days, no archive
all                             x       14      -

ALT: ¦b¤@­Ó¤p«¬ªº news-spoolùØ¡A³q±`¬O¤£¤Ó»Ý­n¹ï·s»D¸s²Õªº ±±¨îªº¡C¦b¥i¯à¨S¦³¥Î³Bªºª¬ªp¤U¡A¥æ³q¬y¶q ¤Ó¤j¡C ­«ÂI¬O·s»D±i¶Kªº¤å³¹·|³Q¨ú®ø¡A¦Ó·s»D¸s²Õ·|³Q¦Û°Ê¦a«Ø¥ß¡C¬°¤F½T»{ §t¦³newgroupªº±±¨î°T®§¤£·|§â§Ú­Ìµ¹²V¶Ã¤F¡A¦³­Ó¥s newgroupperm ªºÀÉ®×·|«ü©w §Ú­Ì©Ò¤¹³\ªº¨Æ±¡¡G

comp.os.linux   tale@uunet.com  yv
all             any             nq
¦b³o­Ó¨Ò¤lùØ¡A©Ò¦³¦b comp.os.linux ¤Uªº¦X¾A°Q½×¸s²Õ³£·|³Q«Ø¥ß (y)¡A¦Ó news ¨Ï¥ÎªÌ·|³Q ³qª¾ (v)¡C ¨ä©óªº·|³QÀRÀR¦a (q) ©¿²¤±¼ (n)¡C³Ì«á¤@¦æ¤w¸g¨¬°÷Åý§A¤â°Ê¦a«Ø¥ß©Ò¦³ªº¸s²Õ¤F¡C

ALT: ÁÙ¦³¤@­Ó NewsX ªº´À¥Nµ{¦¡ suck¡C

5.4 §Ú­n«ç»ò³]¥ß Leafnode?

ÁÙ¦³¤@­Ó¤£¦Pªº¸Ñ¨M¤è®×¬O¡A¦w¸Ë¾ã¦X®M¥ó leafnode¡C ¥¦¯à³B²z©Ò¦³­Ó¤H news spool ªº©Ò¦³¤u§@¡A¦Ó¥B«Ü®e©ö«Øºc¡C¥¦¥i¸g¥Ñ¤U¦C¦ì§}¨ú±o¡G

http://www.troll.no/freebies/leafnode.html

©M C News ¤@¼Ë¡A©Ò¦³ªº news ºûÅ@¤u§@³£À³¸Ó¬O¥H news¨Ï¥ÎªÌªº¨­¥÷¨Ó°µ¡G

leafnodeªº¦ì¸m¦b /usr/lib/leafnode¡C¦w¸Ë¥¦¡A°õ¦æ¡G

cd /usr/lib/leafnode
tar -xzvf leafnode-0.8.tgz
cd leafnode-0.8
make
su
make install

ª`·N¡A¦pªG§A±q¤@­Ó®M¥ó¤¤¦w¸Ë leafnode ªº¸Ü¡A/usr/local/sbin À³¸Ó§ï¦¨ /usr/sbin¡C

¹³¤§«e¦a¡A¥H root¨­¥÷¨Ó§ïÅܦb /etc/inetd.confÀÉ ùر±¨î NNTP ªº¨º¦æ

nntp  stream  tcp  nowait  news  /usr/sbin/tcpd /usr/local/sbin/leafnode
¨Ï¥Î¤U­±©R¥O¨Ó±Ò°Ê¥¦¡G
killall -HUP inetd

°õ¦æ exit¦^¨ì news¨Ï¥ÎªÌ¡C¦b /usr/lib/leafnode/config ÀÉùاïÅÜ©w¸q NNTP ¦øªA¾¹ªº¨º¦æ¡C¦b§Ú­Ìªº¨Ò¤l¤¤¡G

server = news.acme.xz

¥Hnewsªº¨­¥÷¤U crontab -e ©R¥O«á¡A Leafnode ´N·| ¦Û¤w¦ª°_·ÓÅU¦Û¤vªº¤u§@¡C

# ¨C¤Ñµ²§ô Leafnode¤@¦¸
0 4 * * * /usr/local/sbin/texpire

News ªº¥æ´«¤]¬O¥H news¨Ï¥ÎªÌ¨Ó§¹¦¨¡A¥H¤U­±ªº©R¥O (°²³] PPP ¤w¸g¬[¦n¥B¥¿°õ¦æ¤¤)¡G

/usr/local/sbin/fetch

·Q¾\Ū·s»D°Q½×¸s²Õªº¨Ï¥ÎªÌ¥i¥H¥Î §Ú­n¦p¦ó³]¥ß½u¤W·s»D¾\Ū¾¹©O?¤ºªº³B¤è¨Ó°µ¡A °£«D¥¦­Ì«Øºc¦Û¤vªº¥»¦aºÝ¾÷¾¹¡A¨Ò¦p¡G

export NNTPSERVER=localhost

¬ÛÃö¸ê®ÆÀ³¸Ó³£¦b¨º¨à¡C­º¥ý¡Afetch ·|¶Ç»¼¥i­q¾\ªº·s»D¸s²Õªº¦Cªí¡C ±µµÛ Leafnode ·|ºÊ±±¨Ï¥ÎªÌ©Ò­n¨Dªº¨º¨Ç¸s²Õ¡A¨Ã¦b¤U¦¸¥¦­Ì³Q±Ò°Ê®É±N ¥¦­Ì¥[¶i¨Ó¡C

µù¡G¦b NNTP »Ý¸g±ÂÅv¤~¯à¨Ï¥Î®É¡ALeafnode ¦n¹³´NµLªk¤u§@¤F¡C+.LP

ALT:¦³¤@­Óleafnodeªº´À¥N«~ nntpcache¥i¥Ñ¤U­±¦ì§}¨ú±o¡G

ftp://ftp.suburbia.net/pub/nntpcache/nntpcache.tgz ALT: ÁÙ¦³­Ó´À¥N¤è®×¬O¨Ï¥Î»P slrn-pull ®M¥ó ¤@°_ªº·s»D¾\Ū¾¹ slrn ¡C ³o­Ó·s»D¾\Ū¾¹¦b³Q½sĶ®É ³]©w¦n spool ¥\¯à¡C


Next Previous Contents