Appendix A. Mapserver Debian Installation

Some Debian packages are available for Php5 and Mapserver[4]. For now only the cgi version of Php is available because of threading issues with Mapserver.

A.1. Prerequisites for Debian Woody

These packages have some dependencies on packages available in the so-called Sarge Debian repository version. Thus, if you are using Debian Woody, you will need to add the following lines to your /etc/apt/sources.list:

#debian sarge
deb http://ftp.<country>.debian.org/debian/ sarge main contrib

Of course, replace <country> by two-letter country code of your nearest mirror. See http://www.debian.org/mirror/list for the full mirrors list.

A.2. Setting Up Your Repository and Preferences File

Add the following to your /etc/apt/sources.list :

# cartoweb
deb http://dev.camptocamp.com/packages/debian/ sarge main
deb-src http://dev.camptocamp.com/packages/debian/ sarge main

You may want to pin c2c packages higher than 1000 to have them preferred over the upstream ones, even if downgrading. Add in /etc/apt/preferences:

Package: *
Pin: release o=c2c
Pin-Priority: 1100

A.3. Installing the packages

To install Mapscript and PHP 5, type the following:

apt-get update
apt-get install  php5-mapscript 

If want to install PostGIS and PostgreSQL:

apt-get install  postgis

A.4. Additional Steps

  1. Update your /etc/php5-c2cms-cgi/php.ini to load the php_mapscript.so extension:
    extension=php_mapscript.so

  1. you may want to raise the memory limit:
    memory_limit = 30M


[4] Some of the packages were inspired from http://agrogeomatic.educagri.fr/