wiki:MapServerInstall

MapServer compilation for Debian & Ubuntu

Required libaries

ensure that some required libraries are installed from apt sources:

Download packages list for: Debian 4.0, Debian 5.0 and Ubuntu 10.04.

Import list and update system with apt

   dpkg --set-selections < ...-packages.txt
   apt-get dselect-upgrade

Download MapServer specific libraries

   wget http://www.libgd.org/releases/gd-2.0.35.tar.gz ;
   wget http://download.osgeo.org/proj/proj-4.7.0.tar.gz ;
   wget http://download.osgeo.org/geos/geos-3.2.2.tar.bz2 ;
   wget http://btr0x2.rz.uni-bayreuth.de/packages/databases/PostgreSQL/source/v8.4.5/postgresql-8.4.5.tar.gz ;
   wget http://postgis.refractions.net/download/postgis-1.5.2.tar.gz ;
   wget http://download.osgeo.org/gdal/gdal-1.7.2.tar.gz ;
   wget http://de.php.net/get/php-5.3.3.tar.gz/from/de.php.net/mirror ;
   wget http://download.osgeo.org/mapserver/mapserver-5.6.5.tar.gz ;
   wget http://www.antigrain.com/agg-2.4.tar.gz ;

Some optional libraries

   wget http://www.gaia-gis.it/spatialite/libspatialite-amalgamation-2.3.1.tar.gz ;
   wget http://tinyows.org/tracdocs/release/tinyows-0.9.0.tar.bz2 ;

For ECW support download SDK from ER Mapper site

Compilation

Unpack the files

  tar zxf *.tar.gz
  tar jxf *.tar.bz2
  unzip *.zip

then cd to directory and run

for GD, PROJ4, GEOS, ECW SDK

   ./configure
   make
   make install

PostgreSQL

   LDFLAGS=-lstdc++  ./configure   --with-openssl  --with-krb5
   make
   make install

PostGIS

   ./configure  --with-pgconfig=/usr/local/pgsql/bin/pg_config
   make
   make install

PHP as Apache2 module

Add a line in /etc/apache2/httpd.conf (commented out!)

    #LoadModule dummy_module /usr/lib/apache2/modules/mod_dummy.so
    ./configure  --with-gd=/usr/local --with-jpeg-dir=/usr/lib   \
    --with-png-dir=/usr/lib   --with-tiff-dir=/usr/lib --with-zlib-dir=/usr/lib  \
    --with-freetype-dir=/usr/local/freetype2  --with-mysql --with-regex=php  \
    --enable-dbase --with-pgsql=/usr/local/pgsql/bin/pg_config  --with-db4  \
    --enable-soap --with-openssl  --with-curl --with-xmlrpc  --with-xsl   \
    --with-apxs2=/usr/bin/apxs2 --enable-zip  

   make
   make install 

GDAL with ecw 3.3

    ./configure --with-pg=/usr/local/pgsql/bin/pg_config   --with-geos=yes   --with-xerces   \
    --with-xerces-lib="-L/usr/lib -lxerces-c -lpthread"  --with-xerces-inc=/usr/include/xercesc  \
    --with-mysql=no --with-ecw=/usr/local  --with-python   --with-spatialite=/usr/local
    
    make
    make install

If you do not need ECW support drop the --with-ecw=/usr/local

AGG

   if you get errors for MS compilation: in 'Makefile.in.Linux' add '-fPIC' to 'AGGCXXFLAGS = ...', like
   AGGCXXFLAGS = -fPIC -O3 -I/usr/X11R6/include -L/usr/X11R6/lib 

   make

MapServer

  ./configure --with-gd=/usr/local/  --with-zlib --with-png   --with-freetype=/usr/bin \
    --with-proj  --with-gdal=/usr/local/bin/gdal-config  --with-ogr  --with-wfs  --with-wfsclient  \
    --with-wcs  --with-wmsclient   --with-wfsclient --without-pdf --without-tiff  --without-eppl   \
    --with-geos=/usr/local/bin/geos-config  --with-postgis=/usr/local/pgsql/bin/pg_config  --with-threads \
    --with-php=/usr/local/include/php --with-httpd=/usr/sbin/apache2 \
    --with-agg=../agg-2.4

   make
   make install

Spatialite

   ./configure --enable-proj --enable-geos
   make
   make install

tinyows

   ./configure --prefic=/usr/local/share --with-pg_config=/usr/local/pgsql/bin/pg_config \
     --with-fastcgi=/var/lib/apache2/fastcgi

   make
   make install
Last modified 7 years ago Last modified on Oct 7, 2010, 6:00:35 PM