[mapserver-users] Re: How to enable MapServer to work as a WFS server (SUPPORTS=WFS_SERVER) ?

Matt Pettis matthew.pettis at gmail.com
Wed Nov 23 20:14:18 EST 2011


You will have to compile from source, going through the configure/make steps. 
In particular, you will have to get the source, unzip/untar the source, and
cd into the top-level directory, and run the `configure' script.  In
particular:

$ ./configure --with-wfs

You will probably want/need more options than `--with-wfs', though.  I've
taken the advice off of the main mapserver website and created my own script
that has the options that I want, and rerun that when I need to.  This
script is at the bottom.  I also include commented-out options in case I
want to recompile with them turned on.

Be aware of a few things:

1. If you have never compiled from source, you will likely need to get
new/updated libraries for some libraries that mapserver expects.  For
instance, after running my configure script below, it stopped and gave me a
warning that some gif headers were missing.  I am on Ubuntu, and to satisfy
that, I had to get the libraries:

$ sudo aptitude install libgif-dev

You may end up doing this a lot for missing dependencies.

2. Some options need you to point to specific directories where libraries
are, and they may not be in the location you think they are.  You can see
that below, for example, in the flag: `--with-gd=/usr/'  That means that the
`library' directory that contains the gd header files is directly under
`/usr'.  You will have to confirm that this is the case on your system. 
They may be elsewhere, and a likely second place that that `library'
directory might lie is `/usr/local/'.

3. Usually, the 3rd step after successfully running`configure' and `make' is
`make install'.  Mapserver can't do the last step, so you will have to
manually move/copy the compiled `mapserv' executable directly to the
`cgi-bin' directory for whatever webserver you are using.  This makes sense,
as mapserver isn't aware of what webserver you are using, and different
webservers have their `cgi-bin' (or equivalent) directory at different
locations.


I was a configure/compile newbie when I started doing this, and these are
pieces of info I wished I had known...

HTH,
Matt




./configure \
        --with-gd=/usr/ \
        --with-freetype=/usr/ \
        --with-proj=/usr/ \
        --with-tiff \
        --with-jpeg \
        --with-fastcgi=/usr \
        --with-ogr=/usr/bin/gdal-config \
        --with-wfs \
        --with-postgis=/usr/bin/pg_config \
#        --with-sde=/usr/sde/sdeexe90 \
#        --with-httpd=/usr/sbin/httpd \
#        --with-sde-version=90 \
#        --with-gdal=/usr/local/bin/gdal-config \
#        --with-wfsclient \
#        --with-wmsclient \
#        --enable-debug \
#        --with-curl-config=/usr/bin/curl-config \
#        --with-oraclespatial=/usr/oracle \
#        --with-threads \
#        --with-wcs \
#        --with-libiconv=/usr \ # new in 4.8
#        --with-geos=/usr/local/bin/geos-config \ # new in 4.8
#        --with-libiconv=/usr \ # new in 4.8
#        --with-xml2-config=/usr/bin/xml2-config \ # new in 4.10
#        --with-sos \ # new in 4.10
#        --with-agg=/path/to/agg-2.4


--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-enable-MapServer-to-work-as-a-WFS-server-SUPPORTS-WFS-SERVER-tp7026672p7026763.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list