今日の役に立たない一言 - Today’s Trifle! -

古い記事ではさまざまなテーマを書いていますが、2007年以降はプログラミング関連の話がほとんどです。

自宅サーバ構築 - Roller編

Geronimoが起動したので、Rollerを入れてみることに。roller-installation-guide.pdf には「2 The 5-minute install」なんてタイトルがある。本当に5分でインストールできるんかい?(そんなわけがない)

STEP 1: Download Roller and un-package into a directory on your disk via Zip or GNU Tar.
STEP 2: Create a database for the Roller tables.
For exmaple, on MySQL you might do something like this:
    % mysql -u root -p
    password: *****
    mysql> create database rollerdb;
    mysql> grant all on rollerdb.* to scott@'%' identified by 'tiger';
    mysql> grant all on rollerdb.* to scott@localhost identified by 'tiger';

STEP 3: Create a roller-custom.properties file in your Servlet container's classpath, e.g. on Tomcat you'd put it in common/classes. Put the settings below into the file and substitute your database and mail connection parameters for those in bold.
STEP 4: Check your Servlet container's JDBC and JavaMail setup.Make sure you've got the JDBC driver for your database in your Servlet container's classpath, e.g. on Tomcat place the driver JAR in common/lib. And on Tomcat, if you want to be able to send mail you'll need to add the JavaMail and Activation jars (mail.jar and activation.jar) there too.

STEP 1 と STEP 2 は問題なし。でも STEP 3 で書かれてる Tomcat の common/classes なんてないし。たぶん、roller/WEB-INF/classes でかまわんのじゃないかってことで、そこにファイルを作ってみた。STEP 4 もディレクトリの指定が違ってるっぽいので、$GERONIMO/repository の下に適当にディレクトリを掘ってそこに置いた。

STEP 5: Deploy Roller to your Servlet containerusing your container's Admin Console deploy Roller as a directory. The Roller WAR directory is in the installation directory under webapp/roller.

書かれてる通りに素直にコピーしてみようと思ったけど、その前に何かを修正しろとどっかに書いてあった記憶が。
Roller 4.0 on Geroni
ここの Configura Roller for Geronimo

2. Open $ROLLER_INSTALL/webapp/roller/WEB-INF/web.xml and comment out the elements at the bottom of the file.

と書いてあったので、その部分をコメントアウトする。そして、$ROLLER/webapp/roller を $GERONIMO/deploy にコピー!

[root@challenger geronimo-tomcat6-jee5-2.0.2]# cp -R ../apache-roller-4.0/webapp/roller deploy
[root@challenger geronimo-tomcat6-jee5-2.0.2]# 11:19:27,666 WARN  [TomcatModuleBuilder] Web 
application . does not contain a WEB-INF/geronimo-web.xml deployment plan.  This may or may not 
be a problem, depending on whether you have things like resource references that need to be resolved. 
You can also give the deployer a separate deployment plan file on the command line.

なんか警告が出てるし。気にせずに Roller にアクセスしてみたら・・・

まあ、そんな簡単に動くわけないよね。。。
で、roller-install-guide.pdf の続きを読んでみると、「Section 3 以降を読んでなんとかしろ」ということらしい。

STEP 6: Browse to Roller and get Rollin'(probably at http://localhost:8080/roller). If Roller is up and running, then proceed to Section 8 Getting started with Roller. If Roller isn't up and running and you can 't figure out why, then try the normal installation procedure starting with Section 3 below.

続く・・・