Skip to content

PrimaGIS main site

Home » Documentation » PrimaGIS .6 Documentaiton » PrimaGIS .6 Install instructions

PrimaGIS .6 Install instructions

Document Actions

Base instructions for installing PrimaGIS .6 on Ubuntu

These instructions are based on you having an Ubuntu Edgy install, and that you want to run Python 2.4.x/ Zope 2.9.5 / Plone 2.5.

However, they also in theory support Dapper, and Python 2.3.5 / Zope 2.86 / Plone 2.1.

In general, things in italics are things you should type at a terminal prompt.

If you are running Dapper, you can change your etc/apt/sources.list to point to the Edgy.
You can do this by modifying your /etc/apt/source.list to include the following.
However this may irreparably damage your system by udpating dependencies you depend on.
So do at your own risk.

 deb http://archive.ubuntu.com/ubuntu/ edgy main restricted
deb-src http://archive.ubuntu.com/ubuntu/ edgy main restricted
deb http://ca.archive.ubuntu.com/ubuntu/ edgy universe multiverse
deb-src http://ca.archive.ubuntu.com/ubuntu/ edgy universe multiverse

Now run sudo apt-get update, to update your sources and then sudo apt-get upgrade

Moving on, we are going to try to get a bunch of things with apt-get.

sudo apt-get install gcc python-gdal postgresql-8.1-postgis libgd2-xpm libfreetype6-dev \
libgd2-xpm-dev bison libcurl3 libcurl3-dev python-dev libtiff4-dev postgresql-server-dev-8.1 \
msttcorefonts libgdal1-1.3.1-dev g++ subversion python-elementtree python-simplejson \
python-imaging python-psycopg2 python-egenix-mxdatetime python-setuptools

Next, download (via firefox, or wget): Geos 2.2.3, mapserver 4.8.4, and swig 1.3.27.

wget http://geos.refractions.net/geos-2.2.3.tar.bz2
wget http://cvs.gis.umn.edu/dist/mapserver-4.8.4.tar.gz
wget http://umn.dl.sourceforge.net/sourceforge/swig/swig-1.3.27.tar.gz
bzcat geos-2.2.3.tar.bz2 | tar -x
tar -xzvf mapserver-4.8.4.tar.gz
tar -xzvf swig-1.3.27.tar.gz

Unarchive these to a folder of your choosing.

First, install GEOS, by going to the geos folder and running ./configure, make, and then sudo make install.

Then put the GEOS libraries and include files where PCL will be a be able to find them:

sudo cp -afr /usr/local/lib/*geos* /usr/lib/
sudo cp -afr /usr/local/include/*geos* /usr/include

Next, install swig, by going to swig and running ./configure, make, and then sudo make install

Ensure you are defaulting to the correct version of swig by running swig -version and seeing it is 1.3.27.
If not, you will need to substitute  '/usr/local/bin/swig' instead of just 'swig' in a few lines from now,

Next, go to the mapserver folder, and run:

./configure --with-tiff --with-jpeg --with-png --with-freetype --with-postgis \
--with-zlib --with-threads --with-proj --with-gdal --with-wcs --with-ogr \
--with-wmsclient --with-wfsclient

After configuring, run:

make
cd mapscript/python
swig -modern -python -o mapscript_wrap.c ../mapscript.i [*or substitute the correct path for SWIG, as mentioned above] sudo python setup.py install

Next, let's download and install PCL.

svn co http://svn.gispython.org/gispy/PCL/trunk PCL
cd PCL/PCL-Core
sudo python setup.py build
sudo python setup.py install

Go to PCL-Mapserver and modify  setup.py to point to your mapserver source tree (e.g., /home/josh/mapserver-4.8.4).

cd ../PCL-Mapserver
sudo python setup.py build
sudo python setup.py install

Go to PCL-GDAL and find out what version of GDAL libraries you have with gdal-config.
Then  and modify tsetup.py to change libraries=['gdal'] to your version of gdal (e.g.,  libraries=['gdal1.3.1']).

cd ../PCL-GDAL
gdal-config --libs
... (look at the output of gdal-config and modify tsetup.py accordingly) ... sudo python setup.py build
sudo python setup.py install

Moving on, let's download and install Quadtree and owslib

svn co http://icon.stoa.org/svn/pleiades/Quadtree/trunk Quadtree
cd Quadtree
sudo python setup.py build
sudo python setup.py install
cd ..
sudo easy_install OWSLib


install zope / plone, ZCO and PrimaGIS and atcolorpickerwidget

You can do this install whatever way you want.  However, this documentation was tested by using the following zope/plone install:

svn co http://svn.gispython.org/zope/ZCO/branches/pcl-0.11-compatibility ZCO
svn co http://svn.gispython.org/zope/PrimaGIS/trunk PrimaGIS
wget http://umn.dl.sourceforge.net/sourceforge/plone/Plone-2.5.1-final.tar.gz
wget http://www.zope.org/Products/Zope/2.9.5/Zope-2.9.5-final.tgz
wget http://sterngasse.at/sterngasse/downloads/opensource/ATColorPickerWidget-0.1.1.tgz

ZOPE: .

./configure --with-python=/usr/bin/python2.4
make
sudo make install
/opt/Zope-2.9/bin/mkzopeinstance.py
/home/josh/z295
  • copy or move the folders in the  Plone-2.5.1  to z295/Products
  • move ZCO, PrimaGIS, and ATColorPickerWidget to z295/Products
  • Start Zope:
z95/bin/runzope

Add a Plone site
Go to Plone site and install ZCO and PrimaGIS

Download the PrimaGIS data file, and extract to a location readable by your user that runs Zope (eg /home/josh/data)

Go to the ZMI and root of the plone site and edit the properties of portal_gis so the fonts points to your fonts.txt from the data file you extracted and your temp file points to /tmp

Under portal_gis contents modify the world_borders, and ensure it points to the world_borders.ovf from the data file you extracted

In the plone site, create the demo

http://localhost:80/Portal/createPrimaGISDemo
Josh Livni
Jennifer Bowen
Chris Calloway
zcologia
lautaportti
Recent Items
No items published or changed since your last log-in.