Modified: 22 October 2005
POPFileは、POPサーバーですから、もともとPOPサーバーのインストールされている環境では、ポートがぶつかって起動できません。ポートを変える実験もしていますが。
必要環境のチェック
Perlのチェック
POPFileは、"perl 5.7.3" 以降のバージョンが必須だそうです。
以下のように、"perl -v" で確認してください。
# perl -v
This is perl, v5.8.0 built for i386-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2002, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'. If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
#
ダウンロード
以下からダウンロードします。Linux版は、「POPFile Cross Platform」をダウンロードします。
http://sourceforge.net/projects/popfile
2005年10月22日時点で、"popfile-0.22.2.zip" がダウンロードできました。
さらに、日本語パッチをダウンロードします。
http://sourceforge.jp/projects/popfile/files
2005年10月22日時点で、"POPFile-0.22.2jpn.zip" がダウンロードできました。
必ず、リリースノートを読んで、POPFileのバージョンに対応したものをダウンロードします。
Perlの確認
以下の5つのモジュール
- MIME::Base64
- MIME::QuotedPrint
- Text::Kakasi
- Encode
- BerkeleyDB
のインストールを確認します。
$ perl -MMIME::Base64 -e 'print $MIME::Base64::VERSION'
2.12
$ perl -MMIME::QuotedPrint -e 'print $MIME::QuotedPrint::VERSION'
2.03
$ perl -MText::Kakasi -e 'print $Text::Kakasi::VERSION'
Can't locate Text/Kakasi.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .).
BEGIN failed--compilation aborted.
$ perl -MEncode -e 'print $Encode::VERSION'
1.83
$ perl -MBerkeleyDB -e 'print $BerkeleyDB::VERSION'
0.26
$
"Text::Kakasi"がインストールされていないので、「"Text::Kakasi"のインストール」を参考にインストールしてください。
"DBI"と"DBD/SQLite"のインストール
以下からダウンロードして、インストールします。
# tar zxvf DBI-1.48.tar.gz # cd DBI-1.48 # perl Makefile.PL # make # make test # make install # tar zxvf DBD-SQLite2-0.33.tar.gz # cd DBD-SQLite2-0.33 # perl Makefile.PL # make # make test # make install # tar zxvf HTML-Template-2.7.tar.gz # cd HTML-Template-2.7 # perl Makefile.PL # make # make test # make install # tar zxvf TimeDate-1.16.tar.gz # cd TimeDate-1.16 # perl Makefile.PL # make # make test # make install
POPFileのインストール
インストール先のディレクトリを指定して解凍します。
# unzip popfile-0.22.2.zip -d /var/www/html/popfile Archive: popfile-0.22.2.zip inflating: /var/www/html/popfile/popfile.pl inflating: /var/www/html/popfile/otto.gif inflating: /var/www/html/popfile/pix.gif : inflating: /var/www/html/popfile/skins/sleetImages/top.gif inflating: /var/www/html/popfile/skins/sleetImages/topLeft.gif inflating: /var/www/html/popfile/skins/sleetImages/topRight.gif #日本語モジュールを、解凍して上書きします。
# unzip POPFile-0.22.2jpn.zip Archive: POPFile-0.22.2jpn.zip creating: POPFile/ creating: POPFile/Classifier/ inflating: POPFile/Classifier/Bayes.pm inflating: POPFile/Classifier/MailParse.pm creating: POPFile/UI/ inflating: POPFile/UI/HTML.pm inflating: readme.txt # cd POPFile # cp Classifier/*.pm /var/www/html/popfile/Classifier cp: `/var/www/html/popfile/Classifier/Bayes.pm' を上書きしてもよろしいですか(yes/no)? yes cp: `/var/www/html/popfile/Classifier/MailParse.pm' を上書きしてもよろしいですか(yes/no)? yes # cp UI/*.pm /var/www/html/popfile/UI cp: `/var/www/html/popfile/UI/HTML.pm' を上書きしてもよろしいですか(yes/no)? yes #"popfile.pl" に実行属性を設定します。
# cd /var/www/popfile # chmod ug+x popfile.pl
POPFileの起動
まずは、起動のテストをして見ます。
# perl popfile.pl POPFile Engine loading Loading... {core: config history logger mq} {classifier: bayes wordmangle} {interface: html xmlrpc} {proxy: nntp pop3 smtp} {services: imap} POPFile Engine v0.22.2 starting Initializing... {core: config history logger mq} {classifier: bayes wordmangle} {interface: html xmlrpc} {proxy: nntp pop3 smtp} {services: imap} Starting... {core: config history logger mq} {classifier: bayes wordmangle} {interface: html} {proxy: pop3} {services:} POPFile Engine v0.22.2 running上記のような表示になれば起動が成功です。エラーが出る場合は、モジュールが不足していますので、エラーメッセージを見ながらモジュールを追加していきます。
管理ツールの基本動作のチェック
デフォルトでは、インストールしたマシンからしか管理画面が開けないので、LAN上の別のPCから開くために、"/var/www/popfile/popfile.cfg"を、以下のように変更します。
: html_local 0 :設定がうまくできていたら、同じサーバーから、"http://192.168.0.100:8080" を指定すれば、以下のような画面が表示されます。
![]()
とりあえず、インストールは成功しました。引き続いて最初の設定を行います。