arcanum_jp’s blog

おっさんの日記

いまさらPebble

 ブログを構築する必要があり、今更PHPだのPerlだので作られたものをさわるのは面倒なのでJavaベースのブログを探していた。以前からPebbleは知っていて、warファイルを配置するだけでデータはXMLで管理なのでデータベースなどの面倒な設定が不要で簡単かなぁって思っていたが・・・

インストール

下記のプロジェクトサイトからダウンロードしてくる。

http://pebble.sourceforge.net/

Pebble is a lightweight, open source, Java EE blogging tool. It's small, fast and feature-rich with unrivalled ease of installation and use. Blog content is stored as XML files on disk and served up dynamically, so there's no need to install a database. All maintenance and administration can be performed through your web browser, making Pebble ideal for anybody who is constantly on the move or doesn't have direct access to their host. You can see example blogs here and here.

 僕がダウンロードしたのはpebble-2.4.zip、これを解凍すると、pebble.warがあるので、これをAPサーバーに配置する。あとはサーバーを起動してhttp://hostname/pebbleでアクセス可能。Tomcatなんかだとデフォルトで8080ポートなんで、http://locaohost:8080/pebbleでOK

 でも、このままだとデータフォルダ、ログフォルダが変な場所になってしまうので、変える必要がある。配置されたWebアプリケーションの下記のファイルを変更する。

/WEB-INF/pebble.properties

# the location where your Pebble data is stored, default is ${user.home}/pebble
dataDirectory=${user.home}/pebble
^^^^^^^^^^^^^^^^^^^^
↓たとえば...
dataDirectory=c:/pebble/dat

WEB-INF/classes/log4j.properties

...前略
log4j.appender.File=org.apache.log4j.FileAppender
log4j.appender.File.File=pebble.log
log4j.appender.File.layout=org.apache.log4j.PatternLayout
log4j.appender.File.Append=false
log4j.appender.File.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n

log4j.logger.net.sourceforge.pebble.audit.AuditTrail=INFO, AuditFile

log4j.appender.AuditFile=org.apache.log4j.FileAppender
log4j.appender.AuditFile.File=pebble-audit.log
log4j.appender.AuditFile.layout=org.apache.log4j.PatternLayout
log4j.appender.AuditFile.Append=false
log4j.appender.AuditFile.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
  ...後略