OpenBlock v1.1.0 documentation

Preparing Your System

These instructions cover manual installation of the prerequisites for OpenBlock and installation of the base Openblock software.

(You can skip this if you are cloning our AMI image.)

If you have problems...

Please drop a line to the or visit the IRC channel #openblock on freenode with any problems you encounter. We're glad to help.

System Requirements

Note: See for specific lists of packages to install based on your distribution or OS.

Linux, OSX, or some other Unix flavor is required. Windows is not supported by the OpenBlock team, and may never be; but patches are welcome :)

Generally, you need:

  • python 2.6 (2.7 might work; 2.5 is too old)
  • Postgresql 8.3, 8.4, or 9.0
  • PostGIS 1.4 or 1.5
  • libxml2 and libxslt
  • libgdal
  • git
  • subversion
  • wget
  • unzip

Optionally, it may be helpful to install prebuilt packages for the following if your distribution provides them:

  • python lxml bindings
  • python gdal bindings

may have some useful information as well, as the majority of the requirements are just those of GeoDjango + PostGIS.

Don't forget ldconfig!

Typically after installing libraries, you will need to run this command:

$ sudo ldconfig

... in order for new libraries to be found while building software.

Database Setup

GeoDjango requires a spatial database; more specifically, OpenBlock requires PostGIS. This documentation generally assumes you are installing OpenBlock and Postgres on the same server. If you are using a remote server, please read Running PostGIS on a remote server and make adjustments accordingly.

OpenBlock is known to work with Postgresql 8.3, 8.4, or 9.0, and PostGIS 1.4 or 1.5.

PostGIS template setup

Regardless of whether you run postgresql locally or on another host, you'll want a PostGIS template database. Some platforms install this automatically for you, some don't.

You (or your database admin) should follow the instructions for in the GeoDjango documentation and be sure to heed the Note about varying names and locations of the relevant files.

Database Access Settings

The following instructions (and the default settings) assume that there is an openblock database user which can create a database for use with openblock. You can create an openblock user by running:

$ sudo -u postgres createuser --createrole --createdb openblock

Depending on your database security setup, you may need to adjust the instructions, settings of postgres and/or settings of openblock.

Postgres administration is beyond the scope of these instructions, but as a quickstart, you can disable postgres security for local users by changing the pg_hba.conf file under etc (the precise location varies, but for postgresql 8.4 on Ubuntu it's /etc/postgresql/8.4/main/pg_hba.conf), comment out any line that starts with local all, and add a line like this:

local   all    all  trust

Then restart postgresql. This is not suitable for production.

See or the for more information.

Testing Database Access

If the openblock user is configured correctly, you should be able to execute:

$ createdb -U openblock test_ob_access
$ dropdb -U openblock test_ob_access

Next Steps

Now that your system is prepped, you are ready to move on to Installing the Openblock Software.