Archive for Dreamhost

Trac on Dreamhost (my story)

Eureka!

After quite a bit of trial and error I finally got Trac 0.11 running on Dreamhost, using Python2.4 with subversion bindings and all.

My attempts were further complicated by the fact that I had already been using the Dreamhost subversion provided and had not installed my own.

For anyone else who may be having similar issues, here are the steps I took to get it going.

1. I set up subversion using the interface provided via the Dreamhost admin panel.

2. I setup Trac using the DreamyTrac scripts.

If all is fine you may be able to stop here believe it or not, but for me I ran into troubles with Dreamhost’s default Python install (Python2.3) and email workflow. Furthermore when I switched Trac to use Python2.4 I found out that Dreamhost hadn’t set up 2.4 with the subversion bindings. I switched back to 2.3 for awhile but found I was quite limited in what plug-ins etc I could install until I got it working with 2.4. blah blah blah, shutup and just tell us how what you did right?

3. I set up my own local Python version for 2.4 using virtualenv. But this still needs the subversion binding installed

4. I mostly followed the steps here at natmaster on installing SWIG and Subversion, replacing any reference to the default python directory with my virtualenv python directory

eg. $HOME/inst/bin/python2.4 instead of /usr/bin/python

Initially I got an error about needing to specify the apr directory, this can be specified on Dreamhost by adding the following configure options to those provided on natmaster.

–with-apr=/usr/local/dh/apache2/template/bin/apr-config –with-apr-util=/usr/local/dh/apache2/template/bin/apu-config

once that is done run the make commands as described on natmaster.

5. After all that is done, the libsvn and svn for python should be available in $HOME/packages/lib/svn-python/. I copied these into my site-packages folder for the python in my virtualenv.

eg. cp -rf $HOME/packages/lib/svn-python/ $HOME/inst/lib/python2.4/site-packages

6. Update your trac.cgi or trac.fcgi file to use the virtualenv python install. My trac.fcgi was found in $HOME/packages/share/trac/cgi-bin.

eg. change #!/usr/bin/python to #!/$HOME/inst/bin/python2.4

7. Done! At least in my case Trac was now properly running on Python2.4

I found a few tales on the web out there and ended up having to borrow bits and pieces from here and there, as well as adding a few of my own personal touches.

So I thought I would add my story, as it may help others in similar circumstances.

Comments (1)