Skip to content
vanwars edited this page Sep 24, 2012 · 2 revisions

So far, we've only run this code on Ubuntu 10.04 Lucid. These instructions will be updated as we test with more Operating Systems.

Ubuntu 10.04 Lucid

Install Apache + Modules

$ sudo apt-get apache2 libapache2-mod-fcgid [whatever other dependencies you want...]
$ sudo apt-get install libapache2-mod-xsendfile #for serving static media 

Install Python

$ sudo apt-get install python2.6 python-dev python2.6-dev

Install GIS Libraries

http://www.perrygeo.net/wordpress/?p=10 Install gdal + python wrappers to GIS libraries that GeoDjango uses. Note that MapServer is optional, and is only helpful if you need to host tiles or map imagery external to Local Ground. Other map tile servers, of course, can also be substituted. Note: if add-apt-repository is not installed on your server, you can install it like this:

$ sudo apt-get install python-software-properties

Followed by...

$ sudo add-apt-repository ppa:ubuntugis/ppa
$ sudo apt-get update
$ sudo apt-get install mapserver-bin gdal-bin cgi-mapserver python-qt4 python-sip4 
  python-gdal python-mapscript gmt gmt-coast-low r-recommended gpsbabel shapelib

Install PostgreSQL & PostGIS

$ sudo apt-get install postgresql postgresql-8.4-postgis postgresql-server-dev-8.4 postgresql-contrib postgresql-plperl-8.4
$ sudo apt-get install libmail-sendmail-perl #for email notifications
$ sudo apt-get install pgadmin3 (probably not necessary on the server)

Install OpenCV 2.1

IMPORTANT: As of 8/2011, this was the simplest way to get OpenCV 2.1 running via the package manager. Please follow these instructions: http://opencv.willowgarage.com/wiki/Ubuntu_Packages To install OpenCV:

$ sudo add-apt-repository ppa:gijzelaar/opencv2
$ sudo apt-get update
$ sudo apt-get install opencv

Install the development files run:

$ sudo apt-get install libopencv-dev

Install the Python module:

$ sudo apt-get install python-opencv

If you want to install the documentation:

$ sudo apt-get install opencv-doc

Install Django 1.2

Please review installation guide for prerequisites: https://docs.djangoproject.com/en/dev/topics/install/?from=olddocs. Local Ground has only been tested using Django 1.2. Using newer versions might require some manual updating.

Install pip (if not already installed)

$ sudo apt-get install python-pip

Install Django:

$ sudo pip install django==1.2

Install Python module for PostgreSQL

$ sudo apt-get install python-psycopg2

Install MOD_WSGI

To integrate with Apache, download MOD_WSGI and follow the installation instructions: http://code.google.com/p/modwsgi/wiki/InstallationInstructions.

Be sure that the apache2-headers (threaded or not threaded, depending) and python-dev packages are also installed so that mod_wsgi can be compiled. Other useful links:

Install Third-Party Python Libraries

$ sudo pip install GDAL==1.8.0
$ sudo pip install PIL==1.1.7
$ sudo pip install django-debug-toolbar==0.8.5 #not required, but extremely useful
$ sudo pip install django-extensions==0.7.1
$ sudo pip install django-tagging==0.3.1
$ sudo pip install django-tagging-autocomplete==0.3.1
$ sudo pip install numpy==1.3.0
$ sudo pip install reportlab==2.4
$ sudo pip install simplejson==2.0.9

Install Tilecache

Optional, and only helpful if you need to host tiles or map imagery external to Local Ground. Installation & configuration files can also be found here: http://tilecache.org/.

$ sudo pip install tilecache
$ sudo pip install flup (for fcgi)
$ sudo pip install paste (for fcgi)

Install JDK (for the bar code reader)

$ sudo apt-get install openjdk-6-jdk

Install SciPy (for image processing)

$ sudo apt-get install python-scipy

Audio Processing

$ sudo apt-get install ffmpeg
$ sudo apt-get install libavcodec-extra-52 # installs mp3 codec

Clone this wiki locally