メモ?

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 インストール

  1. Install a LAMP server
  2. Choose a language : Japanese
  3. キーボード : 日本語(106キー)
  4. ホスト名 : plagger
  5. ディスクのパーティショニング : ディスク全体を消去する
    1. ディスクに変更を書き込みますか? : はい
  6. 時間の設定 UTC? : いいえ
  7. ユーザとパスワードのセットアップ
    1. 新しいユーザの本名 : plagger
    2. あなたのアカウントのユーザ名 : plagger
    3. ユーザとパスワードのセットアップ : uslp3
      1. Ubuntu Server Lamp Plagger その3

sshを使えるようにする

  1. 一般ユーザでログイン
  2. sudo -s
    1. ここでのパスワードはインストール時に決めた一般ユーザのパスワードでOK
  3. mount /cdrom
  4. aptitude install openssh-server
  5. ifconfig (ネットワークインタフェースを確認)

(依存)パッケージインストール

Ubuntu は aptitudeというコマンド で パッケージを search したり install したりできるようだ。

  1. aptitude install screen
  2. aptitude install gcc
  3. aptitude install make
  4. aptitude install unzip
  5. aptitude install libxml2 libxml2-dev
  6. aptitude install expat libexpat-dev
  7. 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 インストール

  1. CPANシェル起動 perl -MCPAN -e shell
  2. 各種設定
    1. Policy on building prerequisites (follow, ask or ignore)? [ask] follow
      1. 依存関係をフォローさせる
      2. そのままリターンしちゃった場合は cpanプロンプトから
        o conf prerequisites_policy follow
        あるいは
        o conf init
        でやりなおすか
        vi /etc/perl/CPAN/Config.pm
        で直接なおしちゃうという手もある
    2. あとはよしなに。
  3. install WebService::Bloglines
  4. install Plagger
    1. 基本的にすべての質問はデフォルトのママ(リターンのみ)

Plagger設定

  1. accets コピー
    cp -a ~/.cpan/build/Plagger-0.7.7/assets /usr/local/share/perl/5.8.7/Plagger/
  2. 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は当然変更してください。
    また、最後にリターンだけの行をつけないとエラーになるそうな。
  3. テスト実行 plagger -c config.yaml
  4. logのlevel,bloglinesのmark_readを適当に修正。
  5. あとは cron組んで自動実行させるなり、いろいろプラグインを追加してみるなり、なんなり好きにしておくれ。
    1. 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 いんすとーるちゅうめも

これは初回インストール時にいろいろエラーになったときのログです。

  1. perl -MCPAN -e shell
    1. Policy on building prerequisites (follow, ask or ignore)? [ask] follow
  • とりあえず install Plagger -- 2006-08-20 (日) 02:50:20
    • は、無理なので、 install Bundle::CPAN
  • unzip がないな -- 2006-08-20 (日) 02:52:08
  • reload cpan -- 2006-08-20 (日) 02:54:12
  • clean Plagger -- 2006-08-20 (日) 02:55:01
  • install Plagger -- 2006-08-20 (日) 02:55:07
    *** 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がないな -- 2006-08-20 (日) 03:01:58
    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 がない -- 2006-08-20 (日) 03:18:44
    aptitude search expat
    aptitude install expat libexpat-dev
  • とりあえず plagger インストールおわり -- 2006-08-20 (日) 03:23:28
  • 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 -- 2006-08-20 (日) 03:29:40
    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 -- 2006-08-20 (日) 03:31:45
    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 -- 2006-08-20 (日) 03:38:39
  • cpan> install Net::SMTP::TLS -- 2006-08-20 (日) 03:38:49
  • これで plagger -c config.yaml すると、ちゃんとGmailにメールがキタ━━━━(゜∀゜)━━━━!!。 -- 2006-08-20 (日) 03:47:19
  • やっぱりいろいろ面倒だなぁ -- 2006-08-20 (日) 03:49:14
  • あー、aptitude install screen もしておくと便利かな -- 2006-08-20 (日) 03:51:44
  • あとで 0からインストールやりなおして、手順書つくるか… -- 2006-08-20 (日) 03:55:15
  • perl -MCPAN -e shell でいろいろ install するときも 何も聞かれないようにできればいいんだけどな -- 2006-08-20 (日) 03:56:47
  • 使用ディスク容量
    nakax@ubuntuserver:~$ df
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/sda1              7882560    689084   6793060  10% /
    こんなもんか。vmwareディスクイメージも 780MB程度。zip圧縮すると、260MBってとこだな 2006-08-20 (日) 04:05:06
  • cpan install WebService::Bloglines は必須なのか… -- 2006-08-20 (日) 05:20:21
  • お疲れ様です。すごい! -- まつい 2006-08-20 (日) 09:30:45

ダウンロード

コメント

最新の9999件を表示しています。 コメントページを参照

  • 朝までお疲れ様でした。 -- まつい 2006-08-20 (日) 09:37:19
    • いやー、ちゃんと動くとうれしいですねぇ。 次は Hotmail受信の Plaggerプラグイン化をやるかなー -- nakax 2006-08-20 (日) 09:38:29
      • さすが、はやいですね。自分もがんばらないと。 -- まつい 2006-08-20 (日) 10:07:39
  • 何度もやっていて、ここのドキュメントが最強にスムースでした。ホント助かります。ありがとうございます。 -- okdt 2006-12-20 (水) 16:41:51
    • どういたしまして。しがないメモですが、参考になったのなら幸いです。 -- nakax 2006-12-22 (金) 11:47:08
お名前:
Counter: 20818, today: 3, yesterday: 0

添付ファイル: filevmware-id.png 1414件 [詳細]

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2008-11-28 (金) 08:36:10 (3221d)