OSをインストールする際に, /var/spool/newsを500Mきっておきました. これはちょっと多すぎですが, 余裕をもって‥‥
まずは$INN/config/config.dataの作成.
$INN/sample-configs/config.data-FreeBSD-2.0を参考に変更
diffの結果
gold{news}% diff config.data ../sample-configs/config.data-FreeBSD-2.0 22c22 < CFLAGS $(DEFS) -O2 --- > CFLAGS $(DEFS) -g 39c39 < LIBS -lutil -lcrypt --- > LIBS -lutil 354c354 < CHECK_INCLUDED_TEXT DONT --- > CHECK_INCLUDED_TEXT DO 357c357 < INEWS_PATH DONT --- > INEWS_PATH DO 396c396 < WANT_TRASH DO --- > WANT_TRASH DONT 424c424 < CLIENT_TIMEOUT (20 * 60) --- > CLIENT_TIMEOUT (10 * 60) 552c552 < _PATH_PERL /usr/local/bin/perl --- > _PATH_PERL /usr/bin/perl5 598c598 < _PATH_GZIP /usr/bin/gzip --- > _PATH_GZIP /usr/contrib/bin/gzip 815c815 < INNWATCH_INODES 4 --- > INNWATCH_INODES 7 853c853 < WANT_PGPVERIFY DONT --- > WANT_PGPVERIFY DO 864c864 < _PATH_NEWSHOME /usr/home18/news --- > _PATH_NEWSHOME /usr/news
MANPATH=/usr/news/man
BINDIR=/usr/news/bin
SPOOLDIR=/var/news/spool
configdir=/var/news/etc
% cd $INN % make world % cd site % make all % cd site % vi *
gold{news}% foreach i (`find .`) [~/inn-1.7.2/site] foreach> echo $i foreach> diff $i orig/$i foreach> end . Only in .: active
% diff ./actsync.cfg.orig ./actsync.cfg 4c4 < host=gold.yy.ics.keio.ac.jp --- > host=news.foo.bar.com
% diff ./expire.ctl orig/./expire.ctl 22,24d21 < < ## ヒストリの保存期間 < ## この例では14日間 28,37d24 < < ## 各記事に対する保存期間 < ## 第一フィールドはニュースグループの指定 < ## 第二フィールドはA(all) or M(moderated) (普通はAみたい) < ## 第三フィールドは最短保存期間(日) < ## 第四フィールドは通常保存期間(日) < ## 第五フィールドは最長保存期間(日) < ## expireヘッダがある記事は最短・最長に従った範囲内で < ## ヘッダに従う < 56,79d42 < < ## for all of yy < ## 最低1日、普通20日、最長無限 < yy.*:A:1:20:never < < ## for all of hoy < ## 最低1日、普通20日、最長無限 < hoy.*:A:1:20:never < < ## for all of yagami < ## 最低1日、普通10日、最長無限 < yagami.*:A:1:10:never < < ## for all of fj < ## 最低1日、普通10日、最長無限 < fj.*:A:1:10:never < < ## for all of japan < ## 最低1日、普通10日、最長無限 < japan.*:A:1:10:never < < ## for all of comp < ## 最低1日、普通10日、最長無限 < comp.*:A:1:10:never
% diff ./hosts.nntp orig/./hosts.nntp 8,12d7 < < ## cannot use *(wild card) < ## : の後ろにはパスワードを書く < ## 書かないのが普通 < 14,29d8 < ## < ## for yy < ## < hibari.yy.ics.keio.ac.jp: < silver.yy.ics.keio.ac.jp: < gold.yy.ics.keio.ac.jp: < lime.yy.ics.keio.ac.jp: < platinum.yy.ics.keio.ac.jp: < titanium.yy.ics.keio.ac.jp: < uranium.yy.ics.keio.ac.jp: < plutonium.yy.ics.keio.ac.jp: < ## < ## for upper site < ## < cs-relay.cs.keio.ac.jp: < news0.cc.keio.ac.jp:
% diff ./inn.conf orig/./inn.conf 18,25c18,19 < < ## organization: 団体名 < ## server: サーバの名前 < ## pathhost: サーバ名の一部 < organization: GOLD(FreeBSD-2.2.5) in yy.ics.keio.ac.jp < server: gold < pathhost: gold-yy-cs-keio < domain: yy.ics.keio.ac.jp --- > organization: A poorly-installed InterNetNews site > server: localhost
% diff ./moderators orig/./moderators 21,22d20 < fj.*:%s@creamy.ics.es.osaka-u.ac.jp < jp.inet.*:%s@utsun.s.u-tokyo.ac.jp 25,32d22 < < # < # for local < # < yy.*:%s@yy.cs.keio.ac.jp < yagami.*:%s@cc.keio.ac.jp < keio.*:%s@keio.ac.jp < fj.*:%s@creamy.ics.es.osaka-u.ac.jp
% diff ./newsfeeds orig/./newsfeeds 1,10c1,35 < ## これは記事のフィードに関する設定を行うファイルです。 < ## もっとも基本的なフォーマットは以下の通りで、 < ## 4つのフィールドから成ります。 < ## < ## <サイト名>:<グループ名>:<フラグ>:<プログラム名> < ## < ## サイト名は記事のフィードを行うサイトの名前を書きます。 < ## 送られてきた記事のPathヘッダに<サイト名>がなければ記事を転送します。 < ## あればそこから送られてきた記事であるので転送しません。 < ## --- > ## $Revision: 1.17 $ > ## newsfeeds - determine where Usenet articles get sent > ## Format: > ## site[/exclude,exclude...]\ > ## :pattern,pattern...[/distrib,distrib...]\ > ## :flag,flag...\ > ## :param > ## Summary of flags: > #### Aitems Article checks -- d (must have Distribution header) > ## p (don't check for site in Path header). > ## Bhigh/low Internal buffer size before writing to output. > ## H[count] Article must have less then count hops; default is 1. > ## Isize Internal buffer size (if a file feed) > ## Nm Only moderated groups that match the patterns. > ## Nu Only unmoderated groups that match the patterns. > ## Ssize Start spooling if more than size bytes get queued. > ## Ttype Feed types -- f (file) m (funnel; param names the > ## real entry) p (pipe to program) c (send to stdin > ## channel of param's sub-process); x (like c, but > ## handles commands on stdin). > ## Witems What to write -- b (article bytesize) f (full path) > ## g (first newsgroup) m (Message-ID) n (relative > ## path) s (site that fed article) t (time received) > ## * (names of funnel feed-in's or all sites that get > ## the article) N (Newsgroups header) D (Distribution > ## header) H (all headers) O (overview data) R > ## (replication data). > ## Param field depends on T flag. For Tf, relative paths are from the > ## out.going directory. For Tp and Tc, it is a shell command to execute. > ## If a Tm refers to this entry (which will have its own T param) then "*" > ## is expanded to all the funnel sites that triggered this one. Useful > ## for spawning one mail process, e.g. > ## > ## This file is complicated -- see newsfeeds.5! 11a37,56 > ## This is the local site. > ## The "pattern" field gives the intial subscription list for > ## all other sites. You might want to put "!control,!junk,! .*" > ## there. The "distrib" subfield limits incoming articles. > ## > ## You can also have ME/bad.site: to refuse articles from a particular > ## site (by matching the Path: entry). Other pseudo-sites may be put > ## in here, to REFUSE certain types of 3rd-party cancel messages > ## (See the "Cancel FAQ" news.admin.net-abuse.misc): > ## cyberspam Spam cancels, munged articles, binary postings > ## spewcancel just munged articles from runaway gateways > ## bincancel just binary postings to non-binaries groups > ## > ## Note that refusing articles means you won't offer them to sites you feed > > ## Default of everything to everybody except for junk, control, anything > ## with "local" as the newgroup prefix (i.e. matches "localhost.stuff") or > ## groups under foo. Articles posted to any group under alt.binaries.warez > ## will not get propogated, even if they're cross posted to something that > ## is. 13,31c58,91 < :!*,yy.*,yagami.*,keio.*,jp.*,fj.*,tnn.*,\ < comp.*,sci.*,misc.*,soc.*,talk.*,news.*,rec.*,\ < alt.*,@alt.binaries.warez.*,bionet.*,bit.*,biz.*,ddn.*,\ < gnu.*,k12.*,ieee.*,u3b.*,vmsnet.*,\ < ba.*,ca.*,info.*,to.*/!local:: < < yy-cs-keio\ < :!*,yy.*,yagami.*,keio.*,jp.*,fj.*,tnn.*,\ < comp.*,sci.*,misc.*,soc.*,talk.*,news.*,rec.*,\ < alt.*,@alt.binaries.warez.*,bionet.*,bit.*,biz.*,ddn.*,\ < gnu.*,k12.*,ieee.*,u3b.*,vmsnet.*,\ < ba.*,ca.*,info.*,to.*/!local,!yy:: < < cs-keio\ < :!*,yagami.*,keio.*,!jp.*,fj.*,japan.*,!japan.binaries.*,\ < comp.*,sci.*,misc.*,soc.*,talk.*,news.*,rec.*,\ < alt.*,bionet.*,bit.*,biz.*,ddn.*,gnu.*,k12.*,ieee.*,u3b.*,vmsnet.*,\ < ba.*,ca.*,info.*,to.cs-keio/!local,!yy,!hoy\ < :Tf,Wnm: --- > :*,@alt.binaries.warez.*,!junk,!control*,!local*,!foo.*\ > /world,usa,na,gnu,bionet,pubnet,u3b,eunet,vmsnet,inet,ddn,k12\ > :: > > ## Create the links for cross posted articles > #crosspost:*:Tc,Ap,WR:/usr/news/bin/crosspost > > # Feed all moderated source postings to an archiver > #source-archive!:!*,*sources*,!*wanted*,!*.d\ > # :Tc,Wn:/usr/news/bin/archive -f -i /usr/spool/news.archive/INDEX > > ## News overview > #overview!:*:Tc,WO:/usr/news/bin/overchan > > # Feed all local non-internal postings to nearnet; sent off-line via > # nntpsend or send-nntp. > #nic.near.net\ > # :!junk/!foo\ > # :Tf,Wnm:nic.near.net > > # A real-time nntplink feed > #uunet\ > # :/!foo\ > # :Tc,Wnm:/usr/news/bin/nntplink -i stdin news.uu.net > > # Capture all Foo, Incorporated, postings > #capture\ > # :*/foo\ > # :Tp,H2:/usr/news/local/capture %s > > # A UUCP feed, where we try to keep the "batching" between 4 and 1K. > #ihnp4\ > # :!junk,!control/!foo\ > # :Tf,Wnb,B4096/1024:
% diff ./nnrp.access orig/./nnrp.access 15,18d14 < < ## ホスト名:許容するアクセスの種類:ユーザネーム:パスワード: < ## アクセスを許すニュースグループ < 26d21 < *.yy.ics.keio.ac.jp:Read Post:::*
% diff ./nntpsend.ctl orig/./nntpsend.ctl 13,25c13,15 < ## < ## 第一フィールドをnewsfeedsの第一フィールドと同じにしなくちゃならない < < ##nsavax:erehwon.nsavax.gov::-S -t60 < ##walldrug:walldrug.com:4m-1m:-T1800 -t300 < ##kremvax:kremvax.cis:2m: < < # for gold < gold-yy-ics-keio:gold.yy.ics.keio.ac.jp:: < # for hibari < yy-cs-keio:hibari.yy.ics.keio.ac.jp:: < # for cs-relay < cs-keio:cs-relay.cs.keio.ac.jp::-T1800 -t300 --- > nsavax:erehwon.nsavax.gov::-S -t60 > walldrug:walldrug.com:4m-1m:-T1800 -t300 > kremvax:kremvax.cis:2m:
% cd $INN % su
# ./BUILD
root@gold{~news/inn-1.7.2} fg su news (wd: ~) gold{news}% cd site [~/inn-1.7.2] gold{news}% cp active.hibari /var/news/etc/active [~/inn-1.7.2/site] gold{news}% chown news !$ [~/inn-1.7.2/site] chown news /var/news/etc/active gold{news}% inncheck -perm [~/inn-1.7.2/site] /usr/news/bin/innd:0: mode 550, should be 555 /usr/news/bin/rnews:0: in group uucp, should be news /usr/news/bin/rnews:0: mode 4550, should be 2555 /usr/news/bin/inndstart:0: in group news, should be bin /usr/news/bin/inndstart:0: mode 4550, should be 555 /var/news/etc/active:0: mode 640, should be 644 /var/news/etc/history:0: mode 664, should be 644 /var/news/etc/history.dir:0: mode 664, should be 644 /var/news/etc/history.pag:0: mode 664, should be 644 /usr/news/bin/makegroup:0: missing /usr/news/bin/updatemods:0: missing gold{news}% chmod 555 /usr/news/bin/innd [~/inn-1.7.2/site] gold{news}% chgrp news /usr/news/bin/rnews [~/inn-1.7.2/site] gold{news}% chmod 2555 /usr/news/bin/rnews [~/inn-1.7.2/site] gold{news}% suspend [~/inn-1.7.2/site] Suspended (wd now: ~news/inn-1.7.2/site) root@gold{site} chgrp bin /usr/news/bin/inndstart root@gold{site} chmod 0555 /usr/news/bin/inndstart root@gold{site} fg gold{news}% chmod 644 /var/news/etc/active [~/inn-1.7.2/site] gold{news}% chmod 644 /var/news/etc/history [~/inn-1.7.2/site] gold{news}% chmod 644 /var/news/etc/history.dir [~/inn-1.7.2/site] gold{news}% chmod 644 /var/news/etc/history.pag [~/inn-1.7.2/site] gold{news}% inncheck -perm [~/inn-1.7.2/site] /usr/news/bin/makegroup:0: missing /usr/news/bin/updatemods:0: missing gold{news}% inncheck [~/inn-1.7.2/site]
% whoami news % touch /var/log/news/news.crit % touch /var/log/news/news.err % touch /var/log/news/news.notice % touch /var/log/news/news % touch /var/log/news/errlog
# vi /etc/inetd.conf ----commentout nntp's field
# vi /etc/syslog.conf
# ./BUILD # vi /etc/inetd.conf ----uncommentout nntp's field
# vi /etc/aliases news: kazuki@yy.ics.keio.ac.jp usenet: news # newaliases
newsとrootのPATH,MANPATHなどを変更
root@gold{~news/inn-1.7.2} su news -c /usr/news/bin/rc.news Starting innd. root@gold{~news/inn-1.7.2} May 26 21:41:14 gold inndstart: inndstart cant setgroups Operation not permitted May 26 21:41:14 gold inndstart: inndstart cant bind Permission denied root@gold{~news/inn-1.7.2} ll /usr/news/bin/inndstart -r-xr-xr-x 1 root bin 12288 May 26 02:20 /usr/news/bin/inndstart* root@gold{~news/inn-1.7.2} chmod 4555 /usr/news/bin/inndstart root@gold{~news/inn-1.7.2} ll /usr/news/bin/inndstart -r-sr-xr-x 1 root bin 12288 May 26 02:20 /usr/news/bin/inndstart* root@gold{~news/inn-1.7.2} root@gold{~news/inn-1.7.2} ll /usr/news/bin/inndstart -r-xr-xr-x 1 root bin 12288 May 26 02:20 /usr/news/bin/inndstart* root@gold{~news/inn-1.7.2} chmod 4555 /usr/news/bin/inndstart root@gold{~news/inn-1.7.2} ll /usr/news/bin/inndstart -r-sr-xr-x 1 root bin 12288 May 26 02:20 /usr/news/bin/inndstart* root@gold{~news/inn-1.7.2} su news -c /usr/news/bin/rc.news Starting innd. root@gold{~news/inn-1.7.2} May 26 21:42:56 gold innd: SERVER descriptors 360 May 26 21:42:56 gold innd: SERVER outgoing 347 May 26 21:42:56 gold innd: SERVER ccsetup control:11 May 26 21:42:56 gold innd: SERVER lcsetup localconn:13 May 26 21:42:56 gold innd: SERVER rcsetup remconn:4 May 26 21:42:56 gold innd: yy-cs-keio opened yy-cs-keio:15:file May 26 21:42:56 gold innd: cs-keio opened cs-keio:16:file May 26 21:42:56 gold innd: SERVER starting% rc.news
# kill -HUP `cat /var/run/inetd.pid`
Jan 19 19:45:22 gold inetd[125]: nntp/tcp: bind: Address already in use
# ln -s /usr/news/bin/news.daily /var/news/etc/.news.daily
これをやらないと怒られた
% inncheck -perm
エラーを訂正
/usr/news/bin/makegroup:0: missing
/usr/news/bin/updatemods:0: missing
この2つのエラーは関係ない.inn-1.4位のときに使ってたもの
create active file!
telnet news.server.provider.ne.jp nntp |& active.orig list quit
% cp active.orig active % vi active# su news -c /var/news/bin/rc.news?????????????? # rc.news % makehisory % % %きちんと動いているかどうか確かめるために‥‥
kazuki@platinum{/etc} telnet gold nntp Trying 131.113.47.18... Connected to gold.yy.ics.keio.ac.jp. Escape character is '^]'. 200 gold.yy.ics.keio.ac.jp InterNetNews server INN 1.7.2 08-Dec-1997 ready ihave 435 Bad Message-ID ihave <1@test> 335 ^] telnet> quit Connection closed. kazuki@platinum{/etc} telnet gold nntp Trying 131.113.47.18... Connected to gold.yy.ics.keio.ac.jp. Escape character is '^]'. 200 gold.yy.ics.keio.ac.jp InterNetNews server INN 1.7.2 08-Dec-1997 ready mode reader 200 gold.yy.ics.keio.ac.jp InterNetNews NNRP server INN 1.7.2 08-Dec-1997 ready (posting ok). ^] telnet> quit Connection closed.fstabを書き換える--->終り?
umountする--->fstab書き換える--->終り?
-->