Providing geoscience data globally Navigation
Main content
Bottom links

OneGeology

Home > How to serve a OneGeology WMS > Setting up a MapServer WMS > MS4W Software installation > Using the MS4W zip
Information:

This is the OneGeology archive website, for the latest information return to the main OneGeology website

4.2.1 Using the MS4W zip (or full exemplar zip)

Unzip the downloaded file to the top level of one of your web server computer drives; it will create a folder ms4w, which will contain all the required program files. You can unzip into another location and then move the ms4w folder to the top level (root directory), but if you wish to run the software from another location you will need to manually edit several configuration files (or use the NSIS installer); we do not detail how to edit the configuration files here.

You can edit the apache-install.bat (inside the newly created ms4w directory) file to change the name of the service (for example, you may wish to note which version of MapServer is being run, or you may wish to run more than one copy on different ports), but if you do so, remember to also change the apache-restart.bat and apache-uninstall.bat files at the same time. To edit the file you need to right click on the file and select edit, NOT open.

To start the installation you must first run the setenv.bat script inside the newly created ms4w directory (e.g. by double-clicking it). This should set up your server with all the correct environment variables and paths required to run your Apache/MapServer installation.

Now run the apache-install.bat script (e.g. by double-clicking it). Open your Services control panel and check that you can see a service called something like ‘Apache MS4W Web Server’and that it is started.

If you get an error when trying to run the apache-install.bat script with message ‘The system cannot execute the specified program’, then the most likely cause is that your server has not got the Microsoft VC++ 2008 Redistributable Package (http://www.microsoft.com/downloads/details.aspx?familyid=
9B2DA534-3E03-4391-8A4D-074B9F2BC1BF&displaylang=en")
installed, and you will need to install it before running apache-install.bat. The installer for this package is available from the Microsoft download center.

Open http://localhost in a web browser and check that you get a MS4W - MapServer 4 Windows welcome page. Click the link to /cgi-bin/mapserv.exe under the Features heading and check you get an error message like ‘No query information to decode. QUERY_STRING is set, but empty’.

You have successfully installed MapServer.

If you wish to check which version of MapServer you have installed, you need to open a Command Window, navigate to the mapserv.exe file (typically at this stage of the setup, C:\ms4w\Apache\cgi-bin\) and type: mapserv -v

You should get a result like:

MapServer version 6.0.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE 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

That’s it!

Section last modified: 11 June 2013

Back | Next