MapServer at osgeo7

From OSGeo
Revision as of 08:01, 27 July 2020 by Jmckenna (talk | contribs) (initial template)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Start page

Server Overview

  • osgeo7
    • contained named "mapserver"
    • Debian 10 "Buster"
    • gcc (Debian 8.3.0-6) 8.3.0

Status

  • 2020-07-24
    • compiled MapServer, GDAL, PROJ from source
    • moved all demo services

Participants

  • Jeff McKenna
  • contact jmckenna for access (occurs by proxyjump through download container)

MapServer Installation on AdhocVM

  • MapServer master compiled, also GDAL 3.1.2, and PROJ 7.1.0 compiled from source
  • *home: /mapserver/

Apache Configuration

A virtualhost is setup for demo.mapserver.org, through:

  • /etc/apache2/sites_available/demo.mapserver.org

Note that a proxy is setup through osgeo7's nginx to point to the local Apache which is running on port 8081

  • server logfiles live at:
   /var/log/apache2/demo.mapserver.org-error_log
   /var/log/apache2/demo.mapserver.org-access_log
  • mapserv and other service endpoints live at: /usr/lib/cgi-bin/

Restarting Apache

  • set the FGS environment, in /osgeo/mapserver/fgs/ execute the command:
   . setenv.sh
  • then execute:
   fgs stop ; fgs start

Adding Apache Aliases

  • add symbolic links from /var/www/mapserver.org/ to your app in /mapserver/apps/

Services on osgeo7

For each service you configure on demo.mapserver.org, please edit /var/www/mapserver.org/index.html and list your new service.

MapServer Tutorial (7.4.3)

World Blue Marble

WMS Service (for Documentation)

  • Small mapfile serving a raster file, and a single point, line, and poly file. Used in the MapServer docs.
  • On Disk: /osgeo/mapserver/ogc-demos/map/wms.map
  • On Web: https://demo.mapserver.org/cgi-bin/wms?
  • Administrator: jmckenna

WMS Landsat7 Service (for Documentation)

WFS Service (for Documentation)

  • Small mapfile serving a point and polygon shapefile. Used in the MapServer docs.
  • On Disk: /osgeo/mapserver/ogc-demos/map/wfs.map
  • On Web: https://demo.mapserver.org/cgi-bin/wfs?
  • Administrator: jmckenna

WCS Service (for Documentation)

  • Minnesota DNR demo, includes MODIS and NDVI imagery. Used in the MapServer docs.
  • On Disk: /osgeo/mapserver/ogc-demos/map/wcs.map
  • On Web: https://demo.mapserver.org/cgi-bin/wcs?
  • Administrator: jmckenna

OGR Examples (for Documentation)

WMS OpenStreetMap Service (for Documentation)

  • OSM data for Colorado loaded into PostgreSQL database, served by MapServer. Used in the MapServer OpenLayers app on main site.
  • On Disk: /osgeo/mapserver/osm/map/osm.map
  • Port: 5433
  • On Web: https://demo.mapserver.org/cgi-bin/foss4g?
  • Administrator: jmckenna
  • mapfile styling comes from the 'mapserver-utils' project
    • 'default.style' was used because there were errors with 'mapserver.style'
  • To log into the 'osm' database:
    • cd /osgeo/mapserver/fgs
    • . setenv.sh
    • psql -U postgres -d osm -p 5433
      • password for postgres user is postgres

Caching for mapserver.org OpenLayers viewer

  • geocache.xml lives in:
   /osgeo/mapserver/mapcache/
   sudo /osgeo/mapserver/httpd/bin/apachectl restart
  • mapfile:
   /osgeo/mapserver/osm/map/osm.map
  • seed command:
   sudo geocache_seed -c geocache.xml -t osm-denver -g osmgrid -z 0,13
  • cache directory:
   /osgeo/mapserver/mapcache/disk-cache

HTML Legend Examples (for Documentation)

MapServer 7.x CGI

7.6-dev

  • A statically compiled "mapserv76" CGI has been compiled to support the V7+ tutorial. This is a static build so it has no external dependency.
  • Web URL: https://demo.mapserver.org/cgi-bin/mapserv76
  • Source build in /osgeo/mapserver/mapserver-git-branch-7-6/build
  • Administrators: jmckenna
  • build instructions for reference:
$ cd /osgeo/mapserver/
$ git clone -b branch-7-6 https://github.com/mapserver/mapserver.git mapserver-git-branch-7-6
$ cd mapserver-git-branch-7-6
$ mkdir build
$ cd build
$ cmake .. -DWITH_CLIENT_WMS=1 -DWITH_CLIENT_WFS=1 -DWITH_SOS=1 -DWITH_WCS=1 -DWITH_WMS=1 -DWITH_WFS=1 -DWITH_FCGI=0 -DWITH_PROJ=1 -DWITH_GDAL=1 -DWITH_OGR=1 -DUSE_POINT_Z_M=1 -DWITH_PIXMAN=0 -DLINK_STATIC_LIBMAPSERVER=1 -DWITH_PYTHON=0 -DWITH_FRIBIDI=0 -DWITH_HARFBUZZ=0 -DWITH_CAIRO=0 -DWITH_FCGI=0 -DWITH_PROTOBUFC=0 -DWITH_KML=1
$ make
$ cp /osgeo/mapserver/mapserver-git-branch-7-6/build/mapserv /osgeo/mapserver/fgs/www/cgi-bin/mapserv76
$ cp /osgeo/mapserver/mapserver-git-branch-7-6/build/mapserv /osgeo/mapserver/fgs/www/cgi-bin/mapserv

7.4.4

  • A statically compiled "mapserv74" CGI has been compiled to support the V7+ tutorial. This is a static build so it has no external dependency.
  • Web URL: https://demo.mapserver.org/cgi-bin/mapserv74
  • Source build in /osgeo/mapserver/mapserver-git-branch-7-4/build
  • Administrators: jmckenna
  • build instructions for reference:
$ cd /osgeo/mapserver/
$ git clone -b branch-7-4 https://github.com/mapserver/mapserver.git mapserver-git-branch-7-4
$ cd mapserver-git-branch-7-4
$ mkdir build
$ cd build
$ cmake .. -DWITH_CLIENT_WMS=1 -DWITH_CLIENT_WFS=1 -DWITH_SOS=1 -DWITH_WCS=1 -DWITH_WMS=1 -DWITH_WFS=1 -DWITH_FCGI=0 -DWITH_PROJ=1 -DWITH_GDAL=1 -DWITH_OGR=1 -DUSE_POINT_Z_M=1 -DWITH_PIXMAN=0 -DLINK_STATIC_LIBMAPSERVER=1 -DWITH_PYTHON=0 -DWITH_FRIBIDI=0 -DWITH_HARFBUZZ=0 -DWITH_CAIRO=0 -DWITH_FCGI=0 -DWITH_PROTOBUFC=0 -DWITH_KML=1
$ make
$ cp /osgeo/mapserver/mapserver-git-branch-7-4/build/mapserv /osgeo/mapserver/fgs/www/cgi-bin/mapserv74
$ cp /osgeo/mapserver/mapserver-git-branch-7-4/build/mapserv /osgeo/mapserver/fgs/www/cgi-bin/mapserv

7.0.6

  • A statically compiled "mapserv70" CGI has been compiled to support the V7+ tutorial. This is a static build so it has no external dependency.
  • Web URL: https://demo.mapserver.org/cgi-bin/mapserv70
  • Source build in /osgeo/mapserver/mapserver-git-branch-7-0/build
  • Note that this binary has to be installed under the FGS server's /osgeo/mapserver/fgs/www/cgi-bin/ directory since that's where the https://demo.mapserver.org/cgi-bin/ points to
  • Administrators: dmorissette / jmckenna
  • build instructions for reference:
$ cd /osgeo/mapserver/
$ git clone https://github.com/mapserver/mapserver.git mapserver-git
$ cd mapserver-git/
$ git checkout branch-7-0
$ mkdir build
$ cd build
$ cmake .. -DLINK_STATIC_LIBMAPSERVER=1 -DWITH_PYTHON=0 -DWITH_FRIBIDI=0 -DWITH_HARFBUZZ=0 -DWITH_CAIRO=0 -DWITH_FCGI=0
$ make
$ cp /osgeo/mapserver/mapserver-git-branch-7-0/build/mapserv /osgeo/mapserver/fgs/www/cgi-bin/mapserv70