Setting Up Zope Topic Maps (ZTM3)

I originally intended to post this as a follow up to the Topic Maps 2009: Conference Day entry, but as our little baby girl wanted out 1 month prior to the ETA, I all of a sudden got my hands full — and so I didn’t get to finish it until recently. Anyways, here goes…

ZTM WebdeskThe newest version of the open source CMS (SMS (?)) based on Zope and Topic MapsZTM3 reached beta stage earlier this year.

While its predecessor — ZTM2, running on Zope 2.x — has been empowering a multitude of web portals for years (examples: Arctic-Council.org, Forbrukerportalen.no, Hoyre.no), ZTM3 is a new and completely re-written ZTM implementation built on the Zope 3 eco system.

It initially started with the new University of Bergen (UiB) web site, which is the only publicly available ZTM3 empowered site to date (presented at Topic Maps 2009), and is (as far as I know) currently used by the UiB and one additional organization.

Released under the LGPL/GPL license and fully open source, there is, however, no reason why it should end there.

I’m just starting to get familiar with ZTM3 myself, and this blog post is both a result of my own initial testing & previewing of ZTM3, as well as an attempt to raise awareness about ZTM3′s existence amongst my fellow web developers.

Lets start by having a look at how you can set up and get started with ZTM3, and then move on to more “advanced” stuff in subsequent postings (I only hope that those can follow in not too long).

No prior knowledge of Zope or Topic Maps is required…

Installing ZTM3

Fortunately, the ZTM3 team — lead by Arnar Lundesgaard — has created an installation procedure that makes setting up a ZTM3 instance rather easy.

Where you earlier (in ZTM3′s alpha stage) had to do a lot of <bzr branch http://www.ztmproject.org/code/ztm.*>, trying and failing which packages were needed, you now install it using zopeproject.

Here’s how you’d do it on Linux (skip forward if you’ve already got Python and Zope installed).

Installing the Prerequisites

1. Python 2.4.x

First you have to install the recommended Python version for Zope3 (currently stated as Python 2.4.3 in the Zope 3.3.0 docs).

Unless you’ve already got build-essential installed on your system, open a terminal window and execute the following command:

sudo apt-get install build-essential

Next, download and install Python 2.4.3 (might be a good idea to create and move to a new directory before doing this):

wget http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tgz
tar -zxvf Python-2.4.3.tgz
cd Python-2.4.3
./configure -with-zlib=/usr/include
make
sudo make install
cd ..

2. Zope 3.3.1

You should now be ready to install Zope 3.3.1.

wget http://www.zope.org/Products/Zope3/3.3.1/Zope-3.3.1.tgz
tar -zxvf Zope-3.3.1.tgz
cd Zope-3.3.1
./configure --with-python=/usr/local/bin/Python2.4
make
sudo make install
cd ..

3. easy_install

Since ZTM uses zopeproject, we also have to get and install easy_install:

wget http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c9-py2.4.egg#md5=260a2be2e5388d66bdaee06abec6342a
sudo sh
setuptools-0.6c9-py2.4.egg --prefix=/usr/local
cd ..

4. zopeproject

With easy_install in place, we can install zopeproject by running the following command:

sudo easy_install zopeproject

When prompted, provide username, password and path to buildout-eggs directory (easist to leave this blank).

2. Creating a new ZTM project

Start by creating a new zopeproject

zopeproject myZtmProject

Edit the buildout.cfg file in the newly created myZtmProject folder (example file):

Edit site.zcml (example file):

  • Add a new package include; ztm.publishing.

Do a buildout — that is, execute the command:

./bin/buildout

The packages needed to build the ZTM project will now be fetched by buildout.

If this step fails while fetching a package, redo until successful. Personally, I’ve had to perhaps run this 5 times in order to get a successful buildout. This is only necessary on the first (ever) buildout you do, though.

You can now start the ZTM server by issuing the following command:

./bin/paster serve deploy.ini

With the server successfully running, you can now visit the site at http://localhost:8080/ and log in to the administrator console at http://localhost:8080/manage/.

Leave a comment

2 Comments

  1. I now see that the ZTM project’s site ztmproject.org has been updated with an installation instruction similar to the one I included in this post. Darn, I could have saved myself the effort :D

    They also mention a ztm.demonstration package, which I will be sure to try out. I can only imagine you will to ;)

    Reply
  2. Arnar Lundesgaard

     /  03/05/2009

    Heh, sorry about that. :-)

    The ztm.publishing and ztm.demonstration combo is a bit confusing to understand right now as one have to skip back and forth between the administration interface and the publishing interface to do anything useful. There will be a new release on the 14th of May that should make it easier to get get a grip on what’s going on.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • @twitter

  • Tags

  • Topics

  • Recent Comments

  • Topic Map Feeds