Database Reference
In-Depth Information
4. Check whether or not MapServer has been installed correctly and has
WMS_SERVER
and
WFS_SERVER
support enabled by running it as a
command-line tool with the
-v
option.
On Linux, run the
$ /usr/lib/cgi-bin/mapserv -v
command and
check for the for following output:
MapServer version 6.2.1 OUTPUT=GIF
OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
SUPPORTS=GD SUPPORTS=AGG
SUPPORTS=FREETYPE SUPPORTS=CAIRO
SUPPORTS=SVG_SYMBOLS SUPPORTS=ICONV
SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI
SUPPORTS=THREADS SUPPORTS=GEOS INPUT=JPEG
INPUT=POSTGIS INPUT=OGR INPUT=GDAL
INPUT=SHAPEFILE
On Windows, run the following command:
> c:\ms4w\Apache\cgi-bin\mapserv.exe -v
5. Now, check whether MapServer is working from within httpd, using
ht-
tp://localhost/cgi-bin/mapserv
(
http://localhost/cgi-bin/
mapserv.exe
for Windows). If you get a
No query information to
decode. QUERY_STRING is set, but empty
response message,
MapServeriscorrectlyworkingasaCGIscriptinApacheandisreadytoac-
cept http requests.
6. Download the world countries shapefile from
http://thematicmapping.org/
downloads/TM_WORLD_BORDERS-0.3.zip
.
A copy of this shapefile is in-
cludedinthebookdataset.Extracttheshapefiletothe
working/chp09
dir-
ectoryandimportitinPostGISusingthe
shp2pgsql
tool(besuretospecify
the spatial reference system,
EPSG:4326
, with the
-s
option), as follows: