Mapserver Installation

 

Author: Chen Zhang
Last update: 8/30/17

Installing Mapserver from Package

sudo apt-get install cgi-mapserver mapserver-bin mapserver-doc php5-mapscript python-mapscript

Test:

/usr/lib/cgi-bin/mapserv -v

Installing Mapserver from source

Download MapServer

The latest release of Mapserver can be downloaded at http://download.osgeo.org/mapserver/.

Take Mapserver 7.0.6 as example:

wget http://download.osgeo.org/mapserver/mapserver-7.0.6.tar.gz
tar -xzf mapserver-7.0.6.tar.gz

Required External Libraries

Cmake

apt-get install cmake

libpng

Description: libpng should be on your system by default. Versions back to 1.2.7 should work.

apt-get install libpng-dev

freetype

Description: Version 2.x or above is required.

sudo apt install libfreetype6

libjpeg

Description: libjpeg allows MapServer to render images in JPEG format. A sufficient version should be installed by default on your system (probably version 6b from 1998).

apt-get install libjpeg-dev

zlib

Description: Zlib should be on your system by default. Though not used directly by mapserver, it’s a mandatory dependency of libpng.

[to be continued]

Reference

Official

  1. Install mapserver on ubuntu 18.04 from official repository
  2. Compiling on Unix

Blogs and Posts

  1. https://goworldwind.org/mapserver-and-data-installation/