This is a static copy of the main site, preserved for historical purposes only. Please see this page for more information.

Installing on Dreamhost


    1. About this Guide
    2. Assumptions and Overview
    3. Install Python
    4. Install MySQL-Python
    5. Install Python Imaging Library
    6. Install Xapian (optional)
      1. Install xapian-core
      2. Install xapian-bindings
      3. Enable Xapian in Sycamore
    7. Install Sycamore
      1. Create the Database
      2. Download Sycamore
      3. Configure Sycamore
        1. Install in the Web Root
        2. Install in a Subdirectory
      4. Fix Python Location
      5. Populate the Database
      6. Configure mod_rewrite
      7. Enable Internet Access
        1. Install in the Web Root
        2. Install in a Subdirectory
      8. Enabling FastCGI (optional)
    8. Credits

About this Guide

Installing and configuring Sycamore on a [WWW]Dreamhost Shared Hosting Plan is rather involved because Dreamhost does not offer some of the libraries that Sycamore requires.

This how-to will outline step-by-step instructions on installing and configuring Sycamore to run on a Dreamhost Shared Hosting Plan.

Assumptions and Overview

The following is an outline of the installation process.

  1. Download, compile, and install [WWW]Python 2.4

  2. Download, compile, and install [WWW]MySQL Python bindings

  3. Download, compile, and install [WWW]Python Imaging Library

  4. Create a new MySQL user and database for Sycamore data

  5. Download, configure, install, and test [WWW]Sycamore

  6. Download, compile, and install [WWW]Xapian Core and Bindings (optional)

Install Python

Dreamhost comes with both Python 2.3 and 2.4. If you wish you might be able to skip this step and just refer to python2.4 everywhere but you might have problems when it comes time to install some of the packages. This how-to includes instructions on building the latest python from source.

Connect to your account using SSH and create a temporary directory called build that you will use for building the various software packages.

$ mkdir ~/build
$ cd ~/build

Download the latest release of [WWW]Python 2.4 and unpack the compressed archive.

$ wget
$ tar zxf Python-2.4.4.tgz
$ cd Python-2.4.4

Configure python to install in your home directory. This will put the python binaries in ~/bin and the libraries in ~/lib.

$ ./configure --prefix=$HOME --enable-unicode=ucs4
$ make
$ make install

Add and test the newly created bin directory to your environment search path. You can also do this by putting the first line in the ~/.bash_profile file.

$ export PATH=~/bin:$PATH
$ which python

Install MySQL-Python

[WWW]MySQL Python is a python library that allows python programs to connect to and use a MySQL database. Sycamore requires this library if it is configured to use a MySQL database. Since Dreamhost only offers MySQL this package is required. These instructions will outline how to install the latest MySQL-Python in your home directory.

Note: There is a bug with MySQL-Python version 1.2.2 so do not use it!

Download the latest supported version of MySQL-Python and unpack the archive.

$ cd ~/build
$ wget
$ tar zxf MySQL-python-1.2.1_p2.tar.gz
$ cd MySQL-python-1.2.1_p2

Download setuptools (this is for egg support in more recent package versions).

$ wget
$ chmod +x setuptools*
$ ./setuptools*

Alternate method to get setuptools (this will get the right version based on whatever python version you have)

$ wget
$ python

Build and install MySQL-Python. This will install the libraries into the ~/lib/python2.4/site-packages directory.

$ python build
$ python install

Install Python Imaging Library

The [WWW]Python Imaging Library allows Sycamore to manipulate images in various ways including resizing them. These instructions will install the PIL into your ~/lib/python2.4/site-packages directory.

Download and unpack the latest version of PIL.

$ cd ~/build
$ wget
$ tar zxf Imaging-1.1.6.tar.gz

Build, test, and install PIL. This will install the libraries into the ~/lib/python2.4/site-packages directory.

$ cd Imaging-1.1.6
$ python build_ext -i
$ python
57 tests passed.
$ python install

Install Xapian (optional)

Sycamore can use the [WWW]Xapian Open Source Search Engine Library to speed up search on the wiki. Xapian does not need root access to install and can be installed into your home directory. This is a small step for a large performance boost. It is highly recommended. You might have problems enabling this feature after the site is already installed.

Install xapian-core

Download and unpack the latest [WWW]xapian-core library.

$ cd ~/build
$ wget
$ tar zxf xapian-core-0.9.10.tar.gz

Configure, build, and install the libraries in your home directory. This will install binaries in ~/bin and libraries in ~/lib.

$ cd xapian-core-0.9.10
$ ./configure --prefix=$HOME
$ make
$ make install

Install xapian-bindings

Download and unpack the latest [WWW]xapian-bindings library.

$ cd ~/build
$ wget
$ tar zxf xapian-bindings-0.9.10.tar.gz

Configure, build, and install the library in your home directory. This will install only the python xapian bindings.

$ cd xapian-bindings-0.9.10
$ ./configure --without-php --without-ruby --without-java --without-csharp --without-tcl --with-python --prefix=$HOME XAPIAN_CONFIG=$HOME/bin/xapian-config
$ make
$ make install

Enable Xapian in Sycamore

Now that xapian-core and the python xapian-bindings are installed you can enable the xapian option in Sycamore. Edit the share/ configuration file and enable has_xapian

has_xapian = True

Install Sycamore

Once you have completed each of the above steps you are ready to run Sycamore.

Create the Database

Although Sycamore can be configured to use either MySQL or Postgres Dreamhost currently only offers MySQL databases so this guide assumes that MySQL will be used.

First you need to log into the [WWW]Dreamhost Panel and navigate to [WWW]Goodies > Manage MySQL

If you do not have a database host you need to add one. Click on Add Hostname and follow the directions. A good convention is to use*.

Then you need to create a new database. Go down to Create a New MySQL Database, enter in the database name sycamore* and select the hostname.

Then you need to create a new database user. Select an existing user or select Create a new User. Set the username to user*, password to password*.

* These are example values that should be changed when you install Sycamore. These default values will be used later and you should replace them with what you used in this step. It might help to write them down temporarily.

Download Sycamore

You need to grab the latest release of Sycamore. This is currently done by checking out the code from the source code repository.

$ mkdir ~/src
$ svn co ~/src/sycamore
$ cd ~/src/sycamore

This will place all the Sycamore source code files in to a directory named ~/src/sycamore.

Configure Sycamore

The main configuration file for Sycamore is located at share/ You need to modify a few variables for your environment. Find the following sections and replace them with the correct values.

For the database related options be sure to use the same values that you used when creating the database.

db_type = 'mysql'  # can be 'mysql' or 'postgres'
db_name = 'sycamore'
db_user = 'user'
db_user_password = 'password'
db_host = ''

Directory locations are dependent on your username and your domain name. It might help to use full paths here.

data_dir = '/home/USERNAME/src/sycamore/share/data'
web_root = '/home/USERNAME/'
domain = ''

The web_dir depends on where you want your wiki to be installed. Some people want their wiki to be the entire website and others want it to be a in a subdirectory off of the main website. The relative_dir option is currently a mystery. Just make it match what web_dir is set to but without the leading slash.

The URL prefix option is for certain static files used in themes and icons. This directory is normally called wiki. The following example is for the subdirectory configuration.

url_prefix = '/sycwiki/wiki'

Email addresses should be changed to one that you manage.

mail_from = ''
paypal_address = ''

Install in the Web Root

If you want Sycamore to be in the root directory of your website (so [WWW] loads Sycamore) then configure as follows.

web_dir = ''
relative_dir = ''
Install in a Subdirectory

If you want your wiki installed to a subdirectory called sycwiki just configure as follows:

web_dir = '/sycwiki'
relative_dir = 'sycwiki'

Fix Python Location

There is only one place where you need to fix the location of python. Since we installed our own python you need to tell the initial script where to find that binary.

The file you need to update is in all files in share/web in the Sycamore code. Change the first line to read (replace USERNAME with your username):

#!/home/USERNAME/bin/python -OO

Then add the following replacing USERNAME with your username:


Populate the Database

Now run the script and check the output for any errors. If you see any errors here you will probably not have a complete wiki site.

$ cd ~/src/sycamore
$ python Sycamore/
creating tables..
tables created
creating views...
views created
creating other stuff...
other stuff created
inserting basic pages...
You don't have Xapian installed...skipping configuration of search index.
Building page caches...
  --> Bookmarks
  --> Front Page
  --> Help
  --> Help/Help with Editing
  --> Help/Help with Formatting
  --> Help/Help with Headlines
  --> Help/Help with Images
  --> Help/Help with Linking
  --> Help/Help with Lists
  --> Help/Help with Macros
  --> Help/Help with Tables
  --> Orphaned Pages
  --> Outgoing Links
  --> Recent Changes
  --> Sandbox
  --> System Pages Group
  --> Title Index
  --> User Preferences
  --> User Statistics
  --> Users
  --> Wanted Pages
  --> Wiki Settings
  --> Wiki Settings/CSS
  --> Wiki Settings/Images
rebuilt page caches!

Configure mod_rewrite

To handle the Wiki's URLs create an .htaccess file and place the following rules. These rules prevent actual files and directories (like the ones for various themes) from being rewritten. It also forces all other URLs to be handled by the index.cgi python script.

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !index.cgi
RewriteRule ^(.*)$ index.cgi/$1 [L]

Enable Internet Access

Now that everything is installed on the file system you need to allow the code to be called from the internet. There are a couple ways you can do this but essentially you need a copy of index.cgi and all the theme files in the directory you've configured it to be in.

Install in the Web Root

If you configured Sycamore to be installed in the web root install it in ~/

$ cd ~/
$ cp -p ../src/sycamore/share/web/index.cgi .
$ cp -rp ../src/sycamore/share/web/wiki .
Install in a Subdirectory

If you've configured it to be in a subdirectory called sycwiki you should create a link called sycwiki pointing to $HOME/src/sycamore/share/web like so:

$ cd ~/
$ ln -s ../src/sycamore/share/web sycwiki

Enabling FastCGI (optional)

This step is optional but highly recommended. Dreamhost supports both CGI and FastCGI (using Apache mod_fastcgi). The instructions above outline running Sycamore using CGI. Using FastCGI with Sycamore will provide page load improvement.

You will need to [WWW]enable FastCGI for your account via the [WWW]Panel.

Next, rename index.fcgi to dispatch.fcgi as dreamhost monitors and kills off zombie processes that fork from anything other than dispatch.fcgi and cause HTTP 500 Internal Server Errors. More on that [WWW]here and [WWW]here

You must also modify the .htaccess file to point to dispatch.fcgi instead of index.cgi.

To start the FastCGI process, navigate to you wiki root ~/ and execute ./dispatch.fcgi at the shell prompt.


This guide was initially created by AdamDewitz in late 2006. It was updated by [sacramento]Sc0ttBeardsley in May 2007. And again by PaulIvanov in May 2008.

Any Questions?

Note: You must be logged in to add comments

2007-09-14 19:53:33   I'm having issues accomplishing an install on a Dreamhost account. I'm installing because I'm trying to learn, so I'm not really sure where I should be looking. I get the following error.

request.print_exception handler
Traceback (most recent call last):

AttributeError: 'NoneType' object has no attribute 'endswith'

Apparently it has something to do with, from what google tells me. I'm not sure if I screwed something up, or if this guide might not work anymore, or something else.

2008-05-21 17:51:16   I am looking to move from my current hosting provider [WWW] to a new company as I've outgrown them. I also want to install sycamore for commercial purposes, hence I can't simply use as they are geared to non-profit wikis. Has anyone recently attempted and succeeded in getting recent version of sycamore running on Dreamhost or any other shared hosting provider out there. Right now, Getting sycamore to run is my single determining factor in choosing a new webhost. Thanks in advance to anyone who shares their experience/insights. —HimySyed

2008-05-26 00:14:45   yes, HimySyed - about a month ago I installed and now run sycamore trunk on dreamhost. Beware that dreamhost has some special-stuff you need to do to run python and fastCGI (check their wiki) —PaulIvanov

This is a Wiki Spot wiki. Wiki Spot is a 501(c)3 non-profit organization that helps communities collaborate via wikis.