INNを使ってニュースサーバを構築します。

1. インストール

ports-currentのinn-1.7.2を使ってインストールします。
/usr/ports/news/innに展開されているものとします。

インストールします。
% make install

以下を実行して、最後にnを入力します)
% cd work/inn-1.7.2
% sh makedirs.sh

最終的なインストールをします。

% sh BUILD
NOTE:  If you just type [RETURN] to any question, this script will
       assume you are being cautious, and default to whatever answer
       is "safer."  This usually means recompiling.

       You cannot install over a running system; this script will
       remind you about this later.

A c version of subst exists;
config/subst: FreeBSD/i386 compact demand paged dynamically linked executable not stripped
-- do you want to use it [y or n]?  y

Have you already built the executables [y or n]?  y

Setting umask to 0027

Do the spool, etc., directories exist [y or n]?  y

You are now ready to install the INN programs and config files.
You CANNOT DO THIS if INN is running now -- you must shut down
your news system first.
Do you want to continue with the installation [y or n]?  y

略

/bin/sh ./putman.sh SOURCE " -m 0444" tally.unwanted.8 /usr/local/man/man8/tally.unwanted.8
/bin/sh ./putman.sh SOURCE " -m 0444" writelog.8 /usr/local/man/man8/writelog.8

Building the data files.

Start a subshell to edit the config files [y or n]?  n

略
パーミッションを修正します。
% chown news.news /usr/local/news/lib/active
% chmod 644 /usr/local/news/lib/active

2. 各種設定

/usr/local/news/lib/expire.ctl
/usr/local/news/lib/hosts.nntp
/usr/local/news/lib/inn.conf
/usr/local/news/lib/newsfeeds
/usr/local/news/lib/nnrp.access
/etc/syslog.conf

3. 設定ファイルのチェック

inncheckを実行して、出たエラーをメッセージに従って直します。
% perl /usr/local/news/bin/inncheck

inncheckは、何か設定を変更するたびに実行して下さい。

4. 起動

INNを起動します。
% /usr/local/etc/rc.news

% ps -auxとして、newsユーザでinndが起動していれば成功です。
起動しなければsyslogにエラーが出るので、/var/log/news/news.*を見て、修正して下さい。

4. cronに登録

% crontab -e -u newsとして、
30 0 * * * /usr/local/news/bin/news.daily delayrm
と記入します。

これが毎日INNをチェックして、エラーその他をメールで報告します。

5. 管理

ニュースグループの追加
% ctlinnd newgroup ニュースグループ名
/usr/local/news/lib/activeにニュースグループ名が追加されて、
/var/newsにニュースのディレクトリが作られます。

ニュースグループの削除
% ctlinnd rmgroup ニュースグループ名
/usr/local/news/lib/activeからニュースグループ名が削除されます。
ただし、/var/newsのニュースディレクトリは削除されません。

ニュースサーバの起動
% /usr/local/etc/rc.news

ニュースサーバの終了
% ctlinnd shutdown x
ニュースサーバのあるディスクにfsckをかける時は必ず実行して下さい。

関連ページ

INNに関するFAQ


元へ戻る