メモ?
ubuntu server に Plaggerを入れてみるメモ †
Plaggerって、便利そうだけど、インストール大変じゃない?(ぐぐるとこんなん)
それじゃ、誰でも使えるように パックしたものを仮想PCにして配っちゃえばいいじゃん?
ということで、適当に試した結果です。
使用ソフトのバージョン †
- VMware-server 1.01 build-29996
- Ubuntu Linux server LAMP (6.06.1 LTS)
- Kernel 2.6.15-26
- perl 5.8.7
- Plagger 0.7.7
- いまのところ使ってないけどインストールされてるもの
- Apache/2.0.55
- MySQL Ver 5.0.22
Ubuntu (Linux) server インストール †
- Install a LAMP server
- Choose a language : Japanese
- キーボード : 日本語(106キー)
- ホスト名 : plagger
- ディスクのパーティショニング : ディスク全体を消去する
- ディスクに変更を書き込みますか? : はい
- 時間の設定 UTC? : いいえ
- ユーザとパスワードのセットアップ
- 新しいユーザの本名 : plagger
- あなたのアカウントのユーザ名 : plagger
- ユーザとパスワードのセットアップ : uslp3
- Ubuntu Server Lamp Plagger その3
sshを使えるようにする †
- 一般ユーザでログイン
- sudo -s
- ここでのパスワードはインストール時に決めた一般ユーザのパスワードでOK
- mount /cdrom
- aptitude install openssh-server
- ifconfig (ネットワークインタフェースを確認)
(依存)パッケージインストール †
Ubuntu は aptitudeというコマンド で パッケージを search したり install したりできるようだ。
- aptitude install screen
- aptitude install gcc
- aptitude install make
- aptitude install unzip
- aptitude install libxml2 libxml2-dev
- aptitude install expat libexpat-dev
- aptitude install libssl-dev libio-socket-ssl-perl libnet-ssleay-perl
- aptitude install libcompress-zlib-perl libhtml-parser-perl libmime-perl libtemplate-perl libwww-perl libxml-libxml-perl libxml-libxml-common-perl libxml-parser-perl libyaml-perl libdate-manip-perl libnet-perl libtemplate-perl-doc
CPAN インストール †
- CPANシェル起動 perl -MCPAN -e shell
- 各種設定
- Policy on building prerequisites (follow, ask or ignore)? [ask] follow
- 依存関係をフォローさせる
- そのままリターンしちゃった場合は cpanプロンプトから
o conf prerequisites_policy follow
あるいは
o conf init
でやりなおすか
vi /etc/perl/CPAN/Config.pm
で直接なおしちゃうという手もある
- あとはよしなに。
- install WebService::Bloglines
- install Plagger
- 基本的にすべての質問はデフォルトのママ(リターンのみ)
Plagger設定 †
- accets コピー
cp -a ~/.cpan/build/Plagger-0.7.7/assets /usr/local/share/perl/5.8.7/Plagger/
- vi config.yaml
global:
plugin_path:
- /usr/local/share/perl/5.8.7/Plagger/Plugin
assets_path: /usr/local/share/perl/5.8.7/Plagger/assets
timezone: Asia/Tokyo
cache:
base: /tmp
log:
level: debug
# level: info
plugins:
- module: Subscription::Bloglines
config:
username: bloglines@userdomain.com
password: xxxxxxxxxxx
mark_read: 0
# mark_read: 1
fetch_meta: 1
- module: Widget::BloglinesSubscription
- module: Publish::Gmail
config:
mailto: gmail-user@gmail.com
mailfrom: gmail-user@gmail.com
mailroute:
via: smtp_tls
host: smtp.gmail.com:587
username: gmail-user@gmail.com
password: xxxxxxxxxx
username,passwordは当然変更してください。
また、最後にリターンだけの行をつけないとエラーになるそうな。
- テスト実行 plagger -c config.yaml
- logのlevel,bloglinesのmark_readを適当に修正。
- あとは cron組んで自動実行させるなり、いろいろプラグインを追加してみるなり、なんなり好きにしておくれ。
- 20分おきに実行させておくというなら、とりあえずこんな感じのシェルをつくって起動させておけばよいかも。(ホントはcronのほうがいいが…)
#!/bin/sh
#
# run_plagger.sh
#
SLEEP=1200
while true
do
echo ----------------------------------
date
plagger -c config.yaml
echo sleep $SLEEP
sleep $SLEEP
done
Plagger いんすとーるちゅうめも †
これは初回インストール時にいろいろエラーになったときのログです。
- perl -MCPAN -e shell
- Policy on building prerequisites (follow, ask or ignore)? [ask] follow
- とりあえず install Plagger --
- は、無理なので、 install Bundle::CPAN
- unzip がないな --
- reload cpan --
- clean Plagger --
- install Plagger --
*** Module::AutoInstall version 1.02
*** Checking for Perl dependencies...
[Core Features]
- YAML ...loaded. (0.58)
- Test::More ...loaded. (0.64 >= 0.42)
- Test::Base ...loaded. (0.52 >= 0.52)
- Class::Accessor::Fast ...missing.
- File::Find::Rule ...missing.
- UNIVERSAL::require ...missing. (would need 0.1)
- Template ...missing. (would need 2.13)
- Template::Provider::Encoding ...missing. (would need 0.04)
- YAML ...loaded. (0.58 >= 0.39)
- Text::Tags ...missing.
- DateTime ...missing. (would need 0.29)
- DateTime::Format::Mail ...missing.
- DateTime::Format::W3CDTF ...missing.
- DateTime::Format::Strptime ...missing.
- Digest::MD5 ...loaded. (2.33)
- LWP ...missing.
- HTML::Parser ...missing. (would need 3.51)
- URI::Fetch ...missing. (would need 0.071)
- Cache::Cache ...missing. (would need 1.04)
- Module::Pluggable::Fast ...missing.
- HTML::ResolveLink ...missing.
- Date::Parse ...missing.
- MIME::Types ...missing. (would need 1.16)
- Net::DNS ...missing.
- XML::Feed ...missing. (would need 0.11)
- XML::LibXML ...missing.
- XML::Atom ...missing. (would need 0.19)
- XML::RSS::LibXML ...missing. (would need 0.2)
- Encode ...loaded. (2.10 >= 2.1)
- Term::Encoding ...missing.
- File::HomeDir ...loaded. (0.58)
==> Auto-install the 24 mandatory module(s) from CPAN? [y]
[Better Encoding detection]
- Encode::Detect ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [y]
[POD Testing]
- Test::Pod ...missing.
- Test::Pod::Coverage ...missing.
==> Auto-install the 2 optional module(s) from CPAN? [n]
[Cookie sharing with Firefox]
- HTTP::Cookies::Mozilla ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Liberal XML parsing]
- XML::Liberal ...missing. (would need 0.13)
- XML::RSS::Liberal ...missing.
==> Auto-install the 2 optional module(s) from CPAN? [y]
[XPath support in Subscription and Feed Upgrader]
- HTML::TreeBuilder::XPath ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [y]
[CustomFeed::SVNLog]
- SVN::Core ...missing.
- SVN::Client ...missing.
==> Auto-install the 2 optional module(s) from CPAN? [n]
[Filter::Profanity]
- Regexp::Common::profanity_us ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Subscription::HatenaRSS]
- WWW::Mechanize ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Publish::Excel]
- Spreadsheet::WriteExcel ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Filter::Pipe]
- IPC::Run ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Publish::Planet]
- HTML::Scrubber ...missing.
- File::Copy::Recursive ...missing.
==> Auto-install the 2 optional module(s) from CPAN? [y]
[Notify::IRC]
- POE::Component::IRC ...missing.
- POE::Component::IKC::Client ...missing.
==> Auto-install the 2 optional module(s) from CPAN? [n]
[Publish::CSV]
- Text::CSV_PP ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Aggregator::Xango]
- Cache::FastMmap ...missing.
- POE::Component::Client::DNS ...missing.
- POE::Component::Client::HTTP ...missing.
- Xango ...missing. (would need 1.04)
- POE ...missing.
==> Auto-install the 5 optional module(s) from CPAN? [n]
[Publish::Feed]
- XML::Feed ...missing. (would need 0.09)
- XML::Atom ...missing. (would need 0.20)
==> Auto-install the 2 optional module(s) from CPAN? [y]
[Filter::GuessLanguage]
- Lingua::ZH::HanDetect ...missing.
- Locale::Language ...loaded. (2.07)
- Text::Language::Guess ...missing.
==> Auto-install the 2 optional module(s) from CPAN? [n]
[Publish::MT]
- Net::MovableType ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Filter::HatenaDiaryKeywordLink]
- XMLRPC::Lite ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Subscription::LivedoorReader]
- WWW::Mechanize ...missing.
- JSON::Syck ...missing. (would need 0.1)
==> Auto-install the 2 optional module(s) from CPAN? [n]
[Filter::Romanize]
- Text::Kakasi ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Filter::ImageInfo]
- Image::Info ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Publish::JavaScript]
- Template::Plugin::JavaScript ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Filter::Emoticon]
- Text::Emoticon ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Filter::HatenaFormat]
- Text::Hatena ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Publish::IMAP]
- Mail::IMAPClient ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Publish::2chdat]
- DateTime::Locale ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Notify::UpdatePing]
- XMLRPC::Lite ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Rule::Fresh]
- Time::Duration::Parse ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [y]
[Publish::Maildir]
- MIME::Lite ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[CustomFeed::FlickrSearch]
- Flickr::API ...missing.
- DateTime::Format::Epoch ...missing.
==> Auto-install the 2 optional module(s) from CPAN? [n]
[Subscription::OPML]
- XML::OPML ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [y]
[Filter::HatenaBookmarkUsersCount]
- XMLRPC::Lite ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Publish::PalmDoc]
- Palm::PalmDoc ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Publish::PDF]
- PDF::FromHTML ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Subscription::DBI]
- DBIx::Class::Schema ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Notify::Beep]
- Audio::Beep ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Subscription::Bloglines]
- WebService::Bloglines ...missing. (would need 0.11)
==> Auto-install the 1 optional module(s) from CPAN? [y]
[Bundle::Planet]
[Filter::TTP]
- URI::Find ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Search::KinoSearch]
- KinoSearch ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Publish::Gmail]
- Net::SMTP::TLS ...missing.
- MIME::Lite ...missing.
- Mail::Address ...missing.
==> Auto-install the 3 optional module(s) from CPAN? [y]
[Subscription::FOAF]
- XML::FOAF ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Publish::Delicious]
- Net::Delicious ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Filter::Babelfish]
- Locale::Language ...loaded. (2.07)
- WWW::Babelfish ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Filter::ResolveRelativeLink]
- HTML::ResolveLink ...missing. (would need 0.02)
==> Auto-install the 1 optional module(s) from CPAN? [n]
[CustomFeed::Mixi]
- WWW::Mixi ...missing. (would need 0.46)
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Search::Estraier]
- Search::Estraier ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Notify::NetSend]
- Net::NetSend ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Filter::RSSLiberalDateTime]
- Date::Parse ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Filter::HTMLScrubber]
- HTML::Scrubber ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [y]
[Rule::Deduped]
- DB_File ...loaded. (1.811)
[Publish::SWF]
- SWF::Builder ...missing.
- Text::WrapI18N ...loaded. (0.06)
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Subscription::PlanetINI]
- Config::INI::Simple ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
このあともいろいろ聞かれるが、そのままリターン
- libxml2がないな --
aptitude search libxml2
aptitude install libxml2 libxml2-dev
- もう一回 install Plagger
Couldn't chdir /root/.cpan/build/Plagger-0.7.7: No such file or directory at /usr/local/share/perl/5.8.7/CPAN.pm line 2294
Failed during this command:
MIYAGAWA/Template-Provider-Encoding-0.05.tar.gz: make_test NO
MSERGEANT/XML-Parser-2.34.tar.gz : make NO
ABH/XML-RSS-1.10.tar.gz : make_test NO
BTROTT/XML-Feed-0.12.tar.gz : make_test NO
- expat がない --
aptitude search expat
aptitude install expat libexpat-dev
- とりあえず plagger インストールおわり --
- accets コピー
# cp -a ~/.cpan/build/Plagger-0.7.7/assets /usr/local/share/perl/5.8.7/Plagger/ -- &new{2006-08-20 (日) 03:27:30};
- vi config.yaml
global:
plugin_path:
- /usr/local/share/perl/5.8.7/Plagger/Plugin
assets_path: /usr/local/share/perl/5.8.7/Plagger/assets
timezone: Asia/Tokyo
cache:
base: /tmp
log:
level: debug
# level: info
plugins:
- module: Subscription::Bloglines
config:
username: bloglines@userdomain.com
password: xxxxxxxxxxx
mark_read: 0
# mark_read: 1
fetch_meta: 1
- module: Widget::BloglinesSubscription
- module: Publish::Gmail
config:
mailto: gmail-user@gmail.com
mailfrom: gmail-user@gmail.com
mailroute:
via: smtp_tls
host: smtp.gmail.com:587
username: gmail-user@gmail.com
password: xxxxxxxxxx
最後にリターンだけの行をつけないとエラーになるそうな。
- plagger -c config.yaml
Can't locate WebService/Bloglines.pm in @INC (@INC contains: /usr/bin/lib
/etc/perl /usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl
.) at /usr/local/share/perl/5.8.7/Plagger/Plugin/Subscription/Bloglines.pm line 6.
BEGIN failed--compilation aborted at
/usr/local/share/perl/5.8.7/Plagger/Plugin/Subscription/Bloglines.pm line 6.
Compilation failed in require at /usr/local/share/perl/5.8.7/Plagger.pm line 263.
- cpan> install WebService::Bloglines --
Plagger::Plugin::Publish::Gmail [error] Error while sending emails:
Can't locate Net/SMTP/TLS.pm in @INC (@INC contains: /usr/bin/lib /etc/perl
/usr/local/lib/perl/5.8.7 /usr/local/share/perl/5.8.7 /usr/lib/perl5 /usr/share/perl5
/usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at
/usr/local/share/perl/5.8.7/Plagger/Plugin/Publish/Gmail.pm line 224.
- cpan> install Net::SMTP::TLS --
Checking for OpenSSL-0.9.6j or 0.9.7b or newer...
I could not find your OpenSSL in `INSTALLDIRS=site'
Please provide OpenSSL-0.9.6j or
OpenSSL-0.9.7b installation directory (get from
http://www.openssl.org/ if you don't have it; please note that
SSLeay is no longer supported, see README) (C-c to abort):
Failed during this command:
FLORA/Net_SSLeay.pm-1.30.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL INSTALLDIRS=site' returned status 2
SULLR/IO-Socket-SSL-0.999.tar.gz : make_test NO
AWESTHOLM/Net-SMTP-TLS-0.12.tar.gz : make_test NO
- SSL関連モジュールか
aptitude search ssl
aptitude install libssl-dev libio-socket-ssl-perl libnet-ssleay-perl -- &new{2006-08-20 (日) 03:36:09};
- cpan> install IO::Socket::SSL --
- cpan> install Net::SMTP::TLS --
- これで plagger -c config.yaml すると、ちゃんとGmailにメールがキタ━━━━(゜∀゜)━━━━!!。 --
- やっぱりいろいろ面倒だなぁ --
- あー、aptitude install screen もしておくと便利かな --
- あとで 0からインストールやりなおして、手順書つくるか… --
- perl -MCPAN -e shell でいろいろ install するときも 何も聞かれないようにできればいいんだけどな --
- 使用ディスク容量
nakax@ubuntuserver:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 7882560 689084 6793060 10% /
こんなもんか。vmwareディスクイメージも 780MB程度。zip圧縮すると、260MBってとこだな
- cpan install WebService::Bloglines は必須なのか… --
- お疲れ様です。すごい! -- まつい
ダウンロード †
コメント †
Counter: 23752,
today: 1,
yesterday: 1