Feedjack 動かす試験

とりあえず chroot なソレを作り直し。

# debootstrap etch /home/xxx/jail http://ftp.jp.debian.org/debian/
# echo "proc /home/xxx/jail/proc proc none 0 0" >> /etc/fstab
# mount proc /home/xxx/jail/proc -t proc
# cp /etc/hosts /home/xxx/jail/etc/hosts
# chroot /home/xxx/jail /bin/bash
/# cd /dev
/dev# /sbin/MAKEDEV generic
/dev# wget http://ftp-master.debian.org/archive-key-4.0.asc -O - | apt-key add -
/dev# apt-get update
/dev# aptitude install locales mtools -fy
/dev# cd /
/# useradd -m guest
/# passwd guest
/# apt-get install -fy apache2 libapache2-mod-python
/#

apache2 からは以下のような事を言われたので

Setting Apache2 not to start, as something else appears to be using Port 80. To allow apache2 to start, set NO_START to 0 in /etc/default/apache2. Apache2 has been set to listen on port 80 by default, so please edit /etc/apache2/ports.conf as desired. Note that the Port directive no longer works.

修正して start。あとは sqlite なソレ達ですがどうか。

# apt-get install -fy sqlite3 python-pysqlite2

次は Django なソレを

# wget http://www.djangoproject.com/download/0.96.1/tarball/
# tar zxvf Django-0.96.1.tar.gz
# cd Django-0.96.1
# python setup.py install
#

次は feedparser なんですが、ココから feedparser-4.1.zip をオトして解凍。README が以下

Universal Feed Parser
Parse RSS and Atom feeds in Python. 3000 unit tests. Open source.

Copyright (c) 2002-5 by Mark Pilgrim
open source, see LICENSE file for details

        • -

To install:
$ python setup.py install

Full documentation is available in the docs/ directory, or online at
http://feedparser.org/docs/

てーコトで install しておく。

# python setup.py install

この /usr/lib/python2.4/site-packages に入る方式はどうなんだろ、と思いつつ、Feedjack をナニ

# wget http://www.feedjack.org/download/Feedjack-0.9.12.tar.gz
# tar zxvf Feedjack-0.9.12
#

で INSTALL の中が以下

Thanks for downloading Feedjack.

You need:

  • Python 2.3 or greater (www.python.org)
  • Feedparser 4.1 (www.feedparser.org)
  • Django (www.djangoproject.com)

You will need the development version of django (post magic-removal merge):
http://www.djangoproject.com/documentation/install/#installing-the-development-version

Now run this command:
python setup.py install

For more detailed information read http://www.feedjack.org/

ここでも setup.py せえ、ってあるな。

# python setup.py install

なんか微妙な出力を確認するも彼方に流れた。こっから先が微妙。やっぱきちんとチュートリアルをヤッといた方が良いみたい。どこまでヤッたんだかなぁ、という世界。
feedjack なドキュメントを以下に引用 (http://www.feedjack.org/ より引用)

You need:

* Python 2.3 or greater
* Feedparser 4.1
* A recent version of Django.

Then execute python setup.py install

After that you must set up your Feedjack static directory inside your Django MEDIA_URL directory. It must be set in a way that Feedjack's static directory can be reached at MEDIA_URL/feedjack/

For instance, if your MEDIA_URL resolves to /var/www, and Feedjack was installed in /usr/lib/python2.4/site-packages/Feedjack-0.9.0-py2.4.egg, just type this: ln -s /usr/lib/python2.4/site-packages/Feedjack-0.9.10-py2.4.egg/feedjack/static/feedjack /var/www/feedjack

You must also add 'feedjack' in your settings.py under INSTALLED_APPS and then manage.py syncdb from the command line

Then you must add an entry in your Django urls.py. Just include feedjack.urls like this: urlpatterns = patterns('', (r'^admin/', include('django.contrib.admin.urls')), (r'', include('feedjack.urls')), )

That's all.

との事。MEDIA_URL とか INSTALL_APPS とかナンデスカソレハな世界。ログ云々は微妙かもしれませんが、相当集中してトライしてみる事にします。