News Leafsite mini-HOWTO <author>Florian Kuehnert, sutok@gmx.de <date>v0.3, 4 January 1998 <p> <hrule> <!-- This HOWTO will help you to configure a small leafsite for Usenet News using the free software package Leafnode. For any questions, sugges- tions and comments, please write to Florian Kuehnert (sutok@gmx.de). Please send any bugs you found in this document to me as well. (C) 1998 by Florian Kuehnert. --> この HOWTO は、leafnode というフリーのソフトウェアを使って、ネットニュー スに小さな末端のシステムとして参加するための設定について説明しています。 質問、提案、感想は <htmlurl url="mailto:sutok@gmx.de" name="Florian Kuehnert (sutok@gmx.de)"> まで書き送ってください。この文書に間違いを発見した方は、どうか私に連絡してください。 (C) 1998 by Florian Kuehnert. [訳注: 日本語訳に関する間違いは、<htmlurl url="mailto:tsuchiya@pine.kuee.kyoto-u.ac.jp" name="土屋雅稔 (tsuchiya@pine.kuee.kyoto-u.ac.jp) ">まで。] [日本語訳の SGML 化に関する間違いは、 <htmlurl url="mailto:cz8cb01@linux.or.jp" name="早川 仁(cz8cb01@linux.or.jp)"> まで。] <hrule> <!-- <abstract></abstract>でくくると訳注の所の改行が出来ないので泣く泣く<p> で代用 --> <sect>何故 leafnode を使うのですか? <!-- 1. Why to use Leafnode? --> <p> <!-- In normal cases if you want to read news offline on your local computer you have to install a news server software like INN or CNews. Also you are in the need for an nntp or uucp connection to your newsfeed. In fact that such packages contain much more features than you need, you run better by installing Leafnode. --> ネットワークに常時接続されていないコンピュータでネットニュースを読みた いと思った場合、普通は INN や CNews といったニュースサーバーをインストー ルしなければいけません。また、nntp や uucp によって上流のニュースサー バーから記事の転送を受ける必要があります。それらのサーバーシステムは、 あなたが必要とする以上の機能を含んでいますから、leafnode をインストー ルすることをお勧めします。 <p> <!-- Leafnode is much simpler to use and very small but there are some disadvantages: Leafnode is slow and loses news in about any error situation. That's why you shouldn't use it for a big news server, nevertheless, it is appropriate for private users who don't want spend much time configuring INN. --> leafnode は、ずっと簡単に使える小さいシステムですが、いくつかの欠点も あります。leafnode は処理速度が遅く、また異常な状況では記事を喪失する 場合があります。ですから、大規模なニュースサーバーとして leafnode を用 いることは勧められません。しかし、INN を設定するために時間を費やしたく ない個人ユーザーにとっては leafnode は適当なシステムです。 <sect>何処で leafnode が手に入りますか? <!-- 2. Where to get Leafnode?X --> <p> <!-- Leafnode is available at ftp://ftp.troll.no/pub/freebies/ <ftp://ftp.troll.no/pub/freebies/> and has been developed by Arnt Gulbrandsen, an employee of Troll Tech AS. The recent version is 1.4 and in some distributions (for example Debian), Leafnode is included. However, be sure to use at least version 1.4 as several critical bugs were fixed. --> leafnode は、<htmlurl url="ftp://ftp.troll.no/pub/freebies/" name="ftp://ftp.troll.no/pub/freebies/"> から入手できます。Troll Tech AS で働いている Arnt Gulbrandsen によって開発と保守が行なわれてい ます。最新のバージョンは 1.4 で、Debian などのいくつかのシステムには leafnode が含まれています。バージョン 1.4 では、いくつかの重大なバグが 修正されていますので、必ず 1.4 以降のバージョンを利用してください。 [訳注: leafnode-1.4 は GNUS の特定のバージョンと組み合わせて利用するこ とができないなどの幾つかの RFC 違反があることが知られています。しかし、 leafnode のメンテナンスは現在止まっています。従って、leafnode を元にし て幾つかの改良が施された leafnode+ を利用する方が良いでしょう。 leafnode+ は、<htmlurl url="http://www.io.com/~kazushi/leafnode+/" name="http://www.io.com/~kazushi/leafnode+/"> などから入手可能です。] <sect>インストール方法 <!-- 3. How do I install it? --> <p> <!-- A small installation help comes with the package, but let's do it together :-) −− If Leafnode >=1.4 is shipped with your distribution, it would be the wisest to use the pre-compiled version and leave out the steps 1 to 4. --> leafnode の配布には、簡単なインストールの手引きが付属していますが、こ こで一緒にやってみましょう。あなたのシステムにバージョン 1.4 以降の leafnode が付属している場合、そのバイナリを利用すれば、1〜4のステップ を省略できます。 <p> <!-- 1.) Be sure that there is no other news server running on your computer. When you type $ telnet localhost nntp you should get an error message. If you get a connection get back to the prompt of your shell, you should uninstall INN, CNews or whatever you're running now and comment out the nntp-line in your /etc/inetd.conf. --> 1.) 別のニュースサーバーが動作していないか、確認してください。次のよう なコマンドを入力すると、 <it>$ telnet localhost nntp</it> 何らかのエラーメッセージが表示されるはずです。もしも、接続に成功したな らば、シェルに戻って、INN か CNews か、とにかくあなたのシステムで動作し ているニュースサーバーを取り除き、/etc/inetd.conf の nntp に関する行を コメントアウトします。 <!-- 2.) Make sure that there is a user called "news", check in /etc/password for the name. If there isn't, create one (either typing $ adduser news or using a tool shipped with your distribution). --> 2.) ユーザー名 news のユーザーが存在しているか /etc/passwd を確認して ください。いなかったら、作ってください。(以下のように adduser というコ マンドを使うか、 <it>$ adduser news</it> あなたのシステムに付属しているツールを使います。) <!-- 3.) Unpack the sources: $ tar xfz leafnode-1.4.tar.gz and change into the source directory $ cd leafnode-1.4 --> 3.) ソースを展開して、ディレクトリを移動します。 <it>$ tar xzf leafnode-1.4.tar.gz</it><newline> <it>$ cd leafnode-1.4</it> <!-- 4.) Compile the program and install it $ make; make install --> 4.) プログラムをコンパイルして、インストールします。 <it>$ make; make install</it> <!-- 5.) Edit /usr/lib/leafnode/config (it may be on any other place like /etc/leafnode when you use a pre-compiled version of your Linux distribution). The line "server =" should point to the news server of your ISP. --> 5.) /usr/lib/leafnode/config を編集します。(システムに付属しているバイ ナリを使っている場合は、/etc/leafnode などのようにファイルの位置が変わっ ているかも知れません。) あなたが契約しているプロバイダのニュースサーバー を "server =" という行に指定してください。 <!-- 6.) Edit /etc/nntpserver. It should include your local hostname (localhost or whatever your computer name is, the command hostname should help you). If in some startup file like /etc/profile or /.bash_profile the environment variable is defined, you should adjust to your computerエs name as well. --> 6.) /etc/nntpserver を編集します。このファイルには、あなたのコンピュータ のホスト名を記述します (単に localhost とするか、hostname というコマン ドで調べられるホスト名を使います)。/etc/profile や ~/.bash_profile な どの設定ファイルで指定されている環境変数の値も適切な値に変更してくださ い。 <!-- 7.) Edit the /etc/inetd.conf: Make sure that there is no line beginning with "nntp". If there is such a line, comment it out putting a "#" before it. Then add the following line: nntp stream tcp nowait news /usr/sbin/tcpd /usr/local/sbin/leafnode When someone (for example you :-) connects to your computer on the NNTP port, leafnode is started as server process. --> 7.) /etc/inetd.conf を編集します。行頭が nntp となっている行がないか確 認してください。もしもあったら、# を先頭に挿入してコメントアウトしてく ださい。その上で、次のような内容の行を挿入します。 <it>nntp stream tcp nowait news /usr/sbin/tcpd /usr/local/sbin/leafnode</it> このように設定することによって、だれか(例えばあなた)が、あなたのコンピュー タの nntp ポートに接続すると、leafnode がサーバーとして起動するように なります。 <!-- 8.) Go online and run the program "fetch" as root or news. The first time fetch is started, it will download a list of your ISP's newsgroups. This may take some time depending on the speed on your connection and the number of groups your ISP has in its active-File. --> 8.) ネットワークに接続して、root 権限か news 権限で、fetch を実行しま す。fetch は、あなたのプロバイダのニュースサーバーが提供しているニュー スグループのリストを取得します。これにかかる時間は、接続の速度とプロバ イダが提供しているニュースグループの数に依存します。 <!-- 9.) Start your favorite newsreader (slrn, (r)tin and knews are not a bad start) and subscribe to all your groups you read. Be careful not just to subscribe these groups, but also to enter them, even when they're empty. --> 9.) 好みのニュースリーダーを起動してください (slrn や (r)tin 、knews がいいでしょう)。そして、あなたが読みたいと思うニュースグループを購読す るように設定します。ただし、この段階ではそれらのニュースグループは空の ままです。 <!-- 10.) Start fetch again to download all the news of the groups want to get. --> 10.) 購読登録したニュースグループの記事を取り寄せるために、もう一度 fetch を実行します。 <sect>leafnode をメンテナンスする方法 <!-- 4. How do I maintain leafnode? --> <p> <!-- Now you have got a working news system up and running, but there are still some things to do. You may edit the file /usr/lib/leafnode/config to set the expire dates of your groups. This number means, when old messages should be deleted. The standard time of 20 days is much often too long if you read some groups with much traffic, 4 days or a week are in most cases a good time for your system. You may change the value for all groups ("expire = n" to hold all groups n days), but you tell leafnode to change this time for some separate groups writing groupexpire foo.bar n to set the expire time for the group foo.bar to n days. --> ここまでの設定で、ニュースシステムは動くようになりましたが、いくつかす るべきことが残っています。/usr/lib/leafnode/config を編集して、記事を 保存する期間を設定します。つまり、投稿からこの日数以上経過した記事は削 除されます。標準では、この期間は20日間となっています。記事の流量が多い ニュースグループをいくつか購読している場合には、20日間は長すぎるので、 4日間または1週間程度が適当でしょう。この期間は、全てのニュースグループ に対して共通に設定できます ("expire = n" という内容の行が、全てのニュー スグループに共通の保存期間の設定です)。また、ニュースグループ毎に個別 に設定することもできます。foo.bar という名前のニュースグループの記事の 保存期間を n 日と設定するには、次のようにしてください。 <it>groupexpire foo.bar n</it> <!-- This setting alone won't make leafnode deleting old messages, a separate program is responsible for this: texpire. It may be started as a cron job or by command line. If your computer is up all the time, you may want to add the following line to news' crontab file (to edit it, log in as news and type "crontab -e" or as type root "crontab -u news -e"): 0 19 * * * /usr/local/sbin/texpire This line causes the cron daemon to star texpire every day at 19:00. Check the crontab manual page for further adjustment. If your computer is not regularly switched on, you may start texpire just from time to time, when you notice that fetch gets slower. It works fine as with the "cron-method". --> leafnode が古い記事を削除するわけではありません。texpire という別のプ ログラムが記事の削除を行います。texpire は、cron によって自動的に実行 しても、コマンドラインから手動で実行しても構いません。あなたのコンピュー タが24時間稼働しているならば、ユーザー news の crontab に次のような行 を追加すると良いでしょう (ユーザー news としてログインして crontab -e を実行するか、root 権限で crontab -u news -e を実行するかしてください。)。 <it>0 19 * * * /usr/local/sbin/texpire</it> このように指定すると、毎日19時00分に cron によって texpire が実行され るようになります。より細かく調節するには、crontab のマニュアルを確認し てください。あなたのコンピュータに常に電源が入っているわけではない場合、 fetch の動作が遅いと感じたときに texpire を手動で実行すれば良いでしょ う。cron から texpire を実行した場合と全く同じように動作します。 <sect>leafnode の動作について <!-- 5. How does it work? --> <p> <!-- Leafnode is a "real" NNTP server, which means that you can also login from a different computer (via Internet, the local network etc.). Every time you enter a group in your newsreader, your reader sends the information to leafnode and requests it. If the group does not exist, leafnode will create an empty file /var/spool/news/interesting.groups, named like the group. When you run fetch the next time, it will fetch the messages of the group. If a newsgroup has not been visited for a certain time, leafnode will stop to fetch its articles and delete its name in /var/spool/news/interesting.groups. So if you just subscribed to a high traffic newsgroup by accident, you may delete its file there by hand for that you won't have to download all the postings there for the next week. --> leafnode は、本物の NNTP サーバーとして動作します。つまり、別のコンピュー タから leafnode を利用することができます (インターネットや LAN などを 経由して)。あるニュースグループを購読しようとすると、ニュースリーダー は leafnode にそのニュースグループに関する情報を送るように依頼します。 そのニュースグループの記事が存在しなければ、leafnode は /var/spool/news/interesting.groups/ にそのニュースグループと同じ名前の 空のファイルを作ります。fetch が次に実行された時、そのニュースグループ の記事を取り寄せます。ある期間[訳注: 標準では1週間]、購読されなかった ニュースグループがあると、そのニュースグループの記事の取得を中止し、 /var/spool/news/interesting.groups/ からそのグループを表すファイルを削 除します。もしも、間違って記事の多いグループを購読してしまった場合は、 そのグループを表すファイルを手動で削除すれば、そのグループの記事を取り 寄せないようにすることが出来ます。 <!-- A week is not enough for you? You want to go on holiday for three weeks and still get news? Unfortunately, there is no option in leafnode to change it. But you can edit the file leafnode.h and recompile it. The #defined constants are TIMEOUT_LONG and TIMEOUT_SHORT, just set the time in seconds up. Another, simpler solution is to define a cron-job that does "touch /var/spool/news/interesting.groups/*" every night. --> 1週間では短すぎるでしょうか? 3週間の休暇から帰ってきてもネットニュース を読み続けたい場合にはどうすれば良いでしょうか? 不運なことに、leafnode には、その期間を変更するためのオプションは用意されていません。しかし、 leafnode.h を編集してコンパイルし直すことによってこの期間を変更するこ とができます。TIMEOUT_LONG 定数と TIMEOUT_SHORT 定数に、設定したい期間 の秒数を設定してください。cron を使うと、もっと簡単に解決することもで きます。 <it>touch /var/spool/news/interesting.groups/*</it> を毎晩実行するようにします。 [訳注: ただし、このように cron を使うと、ニュースグループの購読を中止 するためには、そのグループを表すファイルを手動で削除する必要があります。] <!-- If you want to get a list of all avaible groups, look into the file /usr/lib/leafnode/groupinfo, where you will find a short description on the group. --> 購読可能な全てのニュースグループを知りたい場合は、 /usr/lib/leafnode/groupinfo を参照してください。このファイルには、ニュー スグループについての短い説明も含まれています。 <!-- If you want to re-read the list of newsgroups from your newsfeed (for example when you want to read a new group), just delete the file /var/spool/news/active.read. Fetch will create it the next time and get the new list. Fetch will also re-read the grouplist from time to time, so you don't have to do it by hand. --> 転送可能なニュースグループのリストを作り直したい場合は、 /var/spool/news/active.read を削除してください(例えば、新しく作成され たグループを購読したい場合など)。fetch を次に実行した時に、このファイ ルを生成し、リストを作り直します。しかし、fetch は時々リストを作り直し ていますから、手動でこれを行う必要はないはずです。 <sect>どのニュースリーダーを使うべきでしょうか? <!-- 6. What newsreader should I use? --> <p> <!-- There is not *the* newsreader for Linux, like there is not *the* editor. My favourite newsreader is emacs in gnus mode which is the most configurable reader for Linux. Many people are using slrn and tin on a terminal, many people use knews under X. There are also trn, nn and a lot more reader, so just try what you like. The only reader you shouldn't use is Netscape, it is big, feature-less, unstable, and it creates sometimes broken postings. However, it is your personal decision. --> Linux に決まったエディターがないのと同じように、決まったニュースリーダー もありません。私は、emacs 上で gnus を好んで使っていますが、これはもっ とも柔軟な設定が可能なニュースリーダーです。slrn や tin を端末上で使っ ている人もいますし、knews を X 上で使っている人もいます。trn や nn な ど他にも色々なニュースリーダーがありますから、好きなものを試してみましょ う。利用に適さない唯一のニュースリーダーは Netscape です。Netscape は、 大きく、特長もなく、不安定で、投稿に失敗したりします。いずれにせよ、あ なた自身が決めてください。 <!-- Anyway, knews is no bad idea for your first experiences as it is very user-friendly and easy to understand. --> とにかく、初めて使うなら、knews は悪くないと思います。knews は使いやす く、理解も容易ですから。 <sect>もっと情報を得るには? <!-- 7. Where do I get more information? --> <p> <!-- Some documentation is provided with the Leafnode package (read the files INSTALL and README, the sources are also quite interesting). If you want to know more about "professional" and "big" news servers, check the INN FAQ (they are provided with the INN package). To get information about your newsreader, type man "name of your newsreader" or check for other files in /usr/doc. --> leafnode には、いくつかの文書が付属しています(INSTALL と README は必ず 読んでください。ソースファイルも極めて興味深いものです)。もしも、もっ と専門的で大規模なニュースサーバーについて知りたければ、INN FAQ を調べ てみましょう(INN に付属しています)。あなたの使っているニュースリーダー についての情報は、マニュアルや /usr/doc 以下のファイルにあるでしょう。 <!-- If you have any questions concerning the news system, just ask in an appropriate newsgroup (look in the news.software.ALL hierarchy). --> ニュースシステムに関する質問は、適当なニュースグループに投稿してくださ い(news.software 以下のニュースグループなど)。 [訳注: 日本語のニュースグループとしては、fj.news.system などがあります。] <!-- If you have any question, comments or corrections concerning this HOWTO, just write to me (sutok@gmx.de). --> この文書に関する質問、感想、訂正は、<htmlurl url="mailto:sutok@gmx.de" name ="著者 (sutok@gmx.de)"> までメールしてください。 [訳注: 日本語訳に関する間違いは、 <htmlurl url="mailto:tsuchiya@pine.kuee.kyoto-u.ac.jp" name="土屋雅稔 (tsuchiya@pine.kuee.kyoto-u.ac.jp)">まで。] <sect>謝辞 <!-- 8. Thanks --> <p> <!-- I would like to thank Michael Schulz (michaels@home.on-luebeck.de) for his help concerning some language problems and Cornelius Krasel (krasel@wpxx02.toxi.uni-wuerzburg.de) for his "touch *"-trick. --> 文書の校正をしてくれた <htmlurl url="mailto:michaels@home.on-luebeck.de" name ="Michael Schulz (michaels@home.on-luebeck.de)"> と、 &dquot;touch *&dquot; トリックを教えてくれた <htmlurl url="mailto:krasel@wpxx02.toxi.uni-wuerzburg.de" name="Cornelius Krasel(krasel@wpxx02.toxi.uni-wuerzburg.de)"> に感謝します。 [日本語訳に関する謝辞: 校正に関して協力してくださった JF メーリングリストの皆さんに感謝します。] </article>