MS4W Installation Guide ======================= Author: Brian Fischer, Houston Engineering, Inc. Contact: GeoMOOSE mailing list Current For Version: 1.6.0 Last Updated: 2008-10-31 **VERY IMPORTANT NOTE**: If you are upgrading your GeoMOOSE installation and have made configuration changes or added your own data to the maps folder you should backup those files before proceeding. Once you have your folders backup, you should delete these files and folders before proceeding. Please backup your maps directories then delete "/MS4W/httpd.d/httpd_geomoose.conf", /MS4W/Apache/htdocs/geomoose-1.x.x.pkg.html" and /MS4W/apps/GeoMOOSE". Introduction ^^^^^^^^^^^^ GeoMOOSE is a client side framework that is developed for use with MapServer (http://mapserver.gis.umn.edu). GeoMOOSE requires MapServer to be installed and configured into order to take advantage of GeoMOOSE. In an effort to make it as simple as possible to get MapServer installed we have packaged GeoMOOSE in an MapServer for Windows (MS4W) package. Below are the steps necessary to download and install all the components required for GeoMOOSE. It is important to note if you plan to use Microsoft IIS as your webserver there are instructions below to configure the MS4W package with IIS. NOTE: If you are new to web servers and developing websites we STRONGLY recommend using Apache as your webserver. Alternatively, advance users can follow instructions at http://www.geomoose.org/moose1/index.php?option=com_content&task=view&id=33&Itemid=30 to run Apache and IIS on the same server. MS4W Installation ^^^^^^^^^^^^^^^^^ 1. If you currently have MS4W downloaded, extracted and running, you can skip to step 3. Otherwise follow instructions in step 2 to install MS4W. 2. Download the MS4W package from the Maptools website at http://www.maptools.org. Once you have it downloaded you can follow the installation instructions that come with MS4W. One important thing to note is to make sure you extract the .zip file to a root directory so the path is something like C:\MS4W. It does not have to be installed on the C drive, it can be installed at any root drive. You should not have two MS4W folders. The MS4W download will install Apache, MapServer and PHP. Once you have tested that MapServer is installed and running you can move on to step 3. For further information on installing or upgrading your MS4W package, please refer to the README_INSTALL.html file that comes with the MS4W package in the root folder. GeoMOOSE Installation ^^^^^^^^^^^^^^^^^^^^^ 3. If you are upgrading GeoMOOSE from a previous version, please backup your maps directories then please delete "/MS4W/httpd.d/httpd_geomoose.conf", /MS4W/Apache/htdocs/geomoose-1.*.*.pkg.html" and /MS4W/apps/GeoMOOSE". Download and unzip the "GeoMOOSE-1.x.x-ms4w.zip to the same root folder as your MS4W package, e.g., C:\. The folders are already setup properly to add the GeoMOOSE files into the appropriate MS4W folders. The result should produce adding a file to the "/MS4W/httpd.d and "/MS4W/Apache/htdocs folder. These files add an alias to Apache and an include file so GeoMOOSE shows up as a application in MS4W. It will also extract a GeoMOOSE folder to the "/MS4W/apps" folder. If you are an Apache user follow steps 4 and 5. If you are an IIS user skip to step 6. Configuring GeoMOOSE on Apache ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4. Restart MS4W's Apache server by double-clicking on the apache-restart.bat file in the MS4W folder. 5. Point your browser to MS4W's index.phtml file, e.g., http://localhost/ and look for "GeoMOOSE Demo Application, Version 1.6.0" section in the list of available applications. If GeoMOOSE was installed correctly the application should show up at the bottom of the page and the example State Demo application should run. If the GeoMOOSE application does not show up in the list of applications you may have to restart the Apache web service by opening up the services console under Control Panel -> Administrative tools. **VERY IMPORTANT NOTE:** If your not planning on using Microsoft IIS you can stop here at step 5! Configuring GeoMOOSE on Microsoft IIS 6.0 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 6. The steps below will help you configure the MS4W package and GeoMOOSE to work with Microsoft IIS 6.0. IIS allows you to create virtual directories to make folders accessible through the web. You will need to create 3 virtual directories under your website for MapServer and GeoMOOSE to run properly. Note: It is helpful if you understand how to setup websites and virtual directories in IIS. There are a number of websites and books to help you with this. 7. Create a virtual directory called "geomoose" and point it to the path "/MS4W/apps/GeoMOOSE\htdocs". 8. Create a virtual directory called "cgi-bin" and point it to the path "/MS4W/Apache/cgi-bin" 9. Create a virtual directory called "ms_tmp" and point it to the path "MS4W/tmp/ms_tmp" 10. Set permissions on the "MS4W/tmp/ms_tmp" to allow write permissions by the IIS_user account. Also in the IIS virtual directory properties set the execute permissions to "Scripts only" and permissions to write. 11. Set permissions on the "MS4W/Apache/cgi-bin" virtual directory execute permissions to "scripts and executables". 12. Set the web service extensions to allow .php and MapServer CGI. Point your PHP cgi to run from the "/MS4W/Apache/cgi-bin/php-cgi.exe" file. Also point your MapServer CGI to run from "/MS4W/Apache/cgi-bin/mapserv.exe" This is required otherwise IIS will not execute the programs needed. Also GeoMOOSE uses PHP mapscript for a couple of functions, so it is important to use the PHP mapscript that is already configured with the MS4W package. 13. Open a browser and point it to the website you have configured in IIS and you should see the demo application running at http://localhost/statedemo.html. 14. You may need to increase the amount of memory available to PHP for printing of high quality images. To do this open "MS4W/Apache/cgi-bin/php.ini" and find memory_limit and increase to at least 100M. Configuring the print service To install the print service you should follow the instructions at http://www.geomoose.org/moose1/index.php?option=com_content&task=view&id=31&Itemid=28. The print services uses PHP mapscript and the FPDF library that must be configured separately.