Jeff CutsingerSemantic Nonsense → 1812 Install Instructions

N

1812 Install Instructions

As promised, step-by-step instructions on how to install 1812.

I assume that you have a shell account. If your hosting company doesn't provide this, there are ways around it, mostly. I'll discuss the alternatives as we go.

Getting Python Ready

  1. Install Python 2.5. 1812 will not work on Python 2.4 or lower without tweaking (I tried). If you have a shell account, you should be able to do this by installing to your home directory. It goes something like ./configure --prefix=/home/user/python2.5; make; make install. Your needs may be different.
  2. Install EasyInstall. While technically not necessary, this will make your life much easier.
  3. easy_install kid
  4. easy_install paste
  5. easy_install selector

If you do not have the ability to install your own python packages (or get someone to do it for you), you can work around this by downloading the packages, unpacking them, and moving the relevant subdirectory/file into the 1812 directory.

Getting 1812

  1. Install Bazaar.
  2. bzr get http://bitworking.org/projects/1812

Installing 1812

  1. Move 1812 into your cgi-bin directory.
  2. Edit admin.cgi, replacing #!/home/jcgregorio/bin/python2.5 with whatever is appropriate.
  3. Repeat with main.cgi.
  4. Copy config-example.ini to config.ini and edit as appropriate.
  5. Replace titlebar.html and footer.html with what you like.

You should now be able to visit cgi-bin/1812/main.cgi/. Notice the slash. It's important for that to be there. You'll get there without it, but all the links will be broken. cgi-bin/1812/admin.cgi/ should work too, but clicking on the links will get you 404s. When you have content they will go away.

Obviously this method requires CGI, which I don't think is much of a problem seeing as almost every host ever has support for it. However, since 1812 is a WSGI app, it should also be possible to get it going with FastCGI/SCGI, mod_python, or paste's built-in webserver. I did try running it under the wsgiref standalone server, but it seems broken to the point that you can't use it with 1812 (it lacks REQUEST_URI or something of the sort).

Fixing 1812

Most of 1812 works like a charm. The only thing I have found that is seriously broken is the service document. By default there's no way to get to it (as far as I know) which means you can't add any content to your site. I'd like to know if there's something I'm missing here. Here's how I fixed it:

  1. Rename templates/appservice.atom to templates/appservice.atomserv.
  2. Edit robaccia.py. Add 'atomserv': ('application/atomserv+xml; charset=utf-8', 'xml'), to the extensions dictionary (it should end up at around line 9).
  3. Edit view/admin.py. In the AppCollection class, move get_service_document (line 75) out and remove the self parameter. Change it to reflect the renamed template (appservice.atomserv).
  4. Edit urls/admin.py. Before the draft collection url (line 44), add the following line: urls.add('/service/', GET=view.get_service_document)

cgi-bin/admin.cgi/service/ should now respond with a valid atom service document, so you can point your favorite APP client at it and start adding content. Joe's own

Clean URLs

Some people might be OK with cgi-bin/main.cgi/ in all their urls, but those people aren't nearly trendy or hip enough. Lamers. Clean URLs are all the rage these days, so we need some mod_rewrite black magic like so:

RewriteCond %{REQUEST_URI} /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)blog(.*) cgi-bin/1812/main.cgi$2 [L]

Congratulations!

If you've followed these instructions so far, you now have a working install of 1812. The default templates all say Joe Gregorio and Bitworking, so you'll have to do something about that unless you don't mind masquerading about on the web.

Sorry, comments on this entry are closed. Thanks for participating.

CC *