The source code of theboar.org.
- Debian Lenny or Ubuntu
- Python 2.5 (probably)
- PostgreSQL 8.3
All these sequences of commands expect you to be in the same directory as this readme.
To install dependencies in Debian or Ubuntu, run:
$ sudo apt-get install csstidy python-cairo python-cjson python-imaging python-psycopg2 libgeos-3.2.0 proj postgis gdal-bin postgresql-8.4-postgis
$ sudo easy_install pip
Either in a virtualenv, or as root if you really have to:
$ pip install -r requirements.txt
Create a PostGIS template database:
$ sudo su - postgres
$ createdb -E UTF8 template_postgis
$ createlang -d template_postgis plpgsql
$ psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql
$ psql -d template_postgis -f /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql
Open a shell in the template:
$ psql -d template_postgis
And execute these SQL statements:
GRANT ALL ON geometry_columns TO PUBLIC;
GRANT ALL ON spatial_ref_sys TO PUBLIC;
Create a database, replacing username
with your system user:
$ sudo su postgres
$ createdb -T template_postgis -O username boar
To get started, you'll need a database dump from the live server:
$ ssh root@theboar.org "sudo -u postgres pg_dump boar | bzip2" | bunzip2 | psql boar
Download a recent tarball from:
http://www.apache.org/dyn/closer.cgi/lucene/solr/
Extract it and set up the configurations::
$ tar -xzf apache-solr-1.4.0.tgz
$ cd apache-solr-1.4.0/example/
$ rm -rf solr
$ ln -s `pwd`/../../solr solr
To run the Solr development server, you will need to change into
apache-solr-1.4.0/example/
and run:
$ java -jar start.jar
If you need to rebuild your Solr index, run:
$ cd boar/
$ ./manage.py rebuild_index
With the Solr server also running:
$ cd boar/
$ ./manage.py runserver
$ fab deploy
That's it.