You are on page 1of 15

MapServer Enterprise Installation for Microsoft Windows

Thank you for using the MapServer Enterprise 0.9.1 release (November 2005). This document contains installation and configuration instructions for Microsoft Windows operating systems. For information about building MapServer Enterprise Server and Web Extensions, refer to the following document: BuildMapServerEnterprise For Windows.html. Similarly, BuildMapServerEnterprise For Linux.html contains installation instructions for Linux. Any data/resources created with the MapServer Enterprise 0.9.1 release will not necessarily be compatible with future versions of MapServer Enterprise. This document contains the following sections: Where to Install the Software Supported Operating Systems Minimum Hardware Requirements Installing the MapServer Enterprise 0.9.1 Release on Microsoft Windows Sample Data and Sample Application Uninstalling the MapServer Enterprise 0.9.1 Release from Microsoft Windows

Where to Install the Software


It is highly recommended that the MapServer Enterprise 0.9.1 release be installed on test machines only. The MapServer Enterprise software may not be fully compatible with existing applications such as Autodesk Map or applications requiring the current release of the Autodesk DWF Viewer. The MapServer Enterprise software consists of two components: Server Web Extensions Recommended Server/Web Extensions Installation Install the MapServer Enterprise Server and Web Extensions on the same server computer.

Autodesk MapServer Studio


Autodesk MapServer Studio is an authoring tool that you can use with MapServer Enterprise. To download the Autodesk MapServer Studio Preview, go to
http://www.autodesk.com/gis.

Page 1

Client
The MapServer Enterprise 0.9.1 release is not compatible with earlier versions of the Autodesk DWF Viewer. To get the latest DWF viewer, go to www.autodesk.com/dwf.

Supported Operating Systems


The MapServer Enterprise 0.9.1 release can be used with the following operating systems: Server: Windows 2000 Server, Windows 2003 Server (or with SP1)

Supported Web Servers


IIS (5.0, 5.1 or 6.0) Apache 2.0.54

Minimum Hardware Requirements


The MapServer Enterprise 0.9.1 release requires the following: Server: Intel Pentium, III/IV 1 GHz, 1Gb of RAM Web Extensions: Intel Pentium, III/IV 1 GHz, 1Gb of RAM DWF Viewer: Intel Pentium, 128Mb of RAM

Page 2

Installing the MapServer Enterprise 0.9.1 Release on Microsoft Windows


Installing the Server 1. Download and unzip ServerWindows.zip from
http://mapserverfoundation.org/htdocs/dl_mirror.php?file=ServerWi ndows.zip

2. 3. 4. 5.

Run Server\Windows\Setup.exe. Follow the on-screen instructions. Select a server type of Site Server. Reboot (recommended).

The installer will configure the MapServer Enterprise 0.9.1 Server to run as a service under the name of MapServer Enterprise Server. Installing Web Extensions Web Extensions installs the following four sub-components: 1. FastCGI MapAgent for handling HTTP operations. 2. Web Extensions API and Viewer Surround - available in PHP, .Net and Java. You can select one of them during installation. - To use Web Extensions API and Viewer Surround in PHP, you should have PHP 5.0.5 configured with IIS (5.0, 5.1 or 6.0) or Apache 2.0.54 - To use Web Extensions API and Viewer Surround in .Net, you should have .Net Framework 2.0 configured with IIS (5.0, 5.1 or 6.0) - To use Web Extensions API and Viewer Surround in Java, you should have Apache 2.0.54 and Tomcat 5.5.12 3. Site Administrator for managing MapServer Enterprise Site. This requires PHP 5.0.5 configured with IIS (5.0, 5.1 or 6.0) or Apache 2.0.54 on your system. 4. Documentation - Web Extensions API reference guide can be installed via Custom Install option

Page 3

Before installing the Web Extensions, you must have PHP 5.0.5 configured with IIS or Apache for using Site Administrator.
Recommended PHP settings:

The default PHP installation sets very low resource limits for PHP scripts. This directly affects the amount of information that MapServer Enterprise can work with. After installing PHP, the following changes should be made in php.ini (in C:\Windows folder) to facilitate the use of reasonably sized data sets. Original values in php.ini:
output_buffering = Off max_execution_time = 30 max_input_time = 60 memory_limit = 8M post_max_size = 8M upload_max_filesize = 2M default_socket_timeout = 60

Change these values to:


output_buffering = 4096 max_execution_time = 180 max_input_time = 120 memory_limit = 128M post_max_size = 256M upload_max_filesize = 256M default_socket_timeout = 60

With these parameter changes, it should be possible to use data files up to 256 MB in size. After you have completed the PHP configuration with IIS or Apache, do the following to install the Web Extensions:

Page 4

Installing the Web Extensions for PHP

1. Download WebExtensionsWindows.zip from 2. 3. 4. Follow the on-screen instructions and select PHP option. 5. Select Custom install option to include Web Extensions API reference and Developer Guide.
Installing the Web Extensions for Java http://mapserverfoundation.org/htdocs/dl_mirror.php?file=WebExten sionsWindows.zip Unzip WebExtensionsWindows.zip Run WebExtensions\Windows\Setup.exe

The web extensions for Java require some other third-party software to be installed as well. Please do the installation in the following order.
Apache

Download Apache 2.0.54+ from http://httpd.apache.org/download.cgi. The Win32 binary installer (msi) is the easiest to use. Using the msi, install Apache as service on port 80. You can specify another port but reserve 8080 for Tomcat to make the later configuration steps easier. Please note that IIS also uses port 80, If you are running IIS, please stop it or use a different port number for Apache. Once installed, you should see be able to see the Apache welcome page by hitting the web server (http://locahost).
Java runtime

Download Java Runtime 5 (JRE 5.0) from


http://java.sun.com/j2se/1.5.0/download.jsp Tomcat

and install.

Download Tomcat 5.5.x from http://tomcat.apache.org/download-55.cgi. Grab the Windows executable for the Core binary distribution. Install Tomcat as a service on port 8080. Once installed, the Tomcat welcome page should be accessible through http://locahost:8080. Download the Apache / Tomcat connector. This is a prebuild Apache module for connecting to Tomcat. It should work with Apache 2.0.54+.
http://www.tux.org/pub/net/apache/dist/tomcat/tomcatconnectors/jk/binaries/win32/jk-1.2.14/mod_jk-1.2.14-apache-2.0.54.so Web extensions for Java

1. Download WebExtensionsWindows.zip from 2. 3.


http://mapserverfoundation.org/htdocs/dl_mirror.php?file=WebExten sionsWindows.zip Unzip WebExtensionsWindows.zip Run WebExtensions\Windows\Setup.exe

Page 5

4. Follow the on-screen instructions and select Java option. 5. Select Custom install option to include Web Extensions API reference and Developer Guide. Note: The option to select IIS or Apache is used for configuring the Site Administrator application.
Setting up the web extensions

Rename the pre-built Apache/Tomcat connector binary to mod_jk.so and place it in the Apache modules directory. Add a workers.properties file in C:/Program Files/Apache Group/Apache2/conf/workers.properties
# Define 1 real worker using ajp13 worker.list=worker1 # Set properties for worker1 (ajp13) worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 worker.worker1.lbfactor=50 worker.worker1.cachesize=10 worker.worker1.cache_timeout=600 worker.worker1.socket_keepalive=1 worker.worker1.recycle_timeout=300

Add the following declaration to httpd.conf:


LoadModule jk_module modules/mod_jk.so

JkWorkersFile "C:/Program Files/Apache Group/Apache2/conf/workers.properties" # Where to put jk logs JkLogFile "C:/Program Files/Apache Group/Apache2/logs/mod_jk.log" # Set the jk log level [debug/error/info] JkLogLevel info # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T" # Send everything for context /examples to worker named worker1 (ajp13) JkMount /MapServer/MapViewerJava/* worker1 JkMount /MapServer/JavaViewerSample/* worker1

Add this redirection at the end of httpd.conf:


Redirect /MapServer/MapViewerHtml http://localhost/MapServer/MapViewerJava

Page 6

Add a MapServer.xml context file to


C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\Catalina\localhost <!-Context configuration file for the Tomcat Manager Web App $Id: manager.xml,v 1.3 2004/08/26 17:03:34 remm Exp $ --> <Context docBase="C:/Program Files/MapServerEnterprise/WebExtensions" privileged="true" antiResourceLocking="false" antiJARLocking="false"> <!-- Link to the user database we will get roles from --> <ResourceLink name="users" global="UserDatabase" type="org.apache.catalina.UserDatabase"/> </Context>

Add the location of the Web Extension libraries to the system path, that is c:\program files\MapServerEnterprise\WebExtensions if you installed at the default location.
Installing the Web Extensions for .Net 2.0

If ASPX is not registered with IIS, use the following information: - For IIS 5.1, follow the instructions fromhttp://www.codeguru.com/columns/VB/article.php/c7277/. - For IIS 6.0, open the Control Panel, and select Add/Remove Programs. Click Add/Remove Windows Components. Select Application Server, and then select ASP.NET. 1. Download WebExtensionsWindows.zip from 2. 3. 4. Follow the on-screen instructions and select .Net option. 5. Select Custom install option to include Web Extensions API reference guide and Developer Guide.
http://mapserverfoundation.org/htdocs/dl_mirror.php?file=WebExten sionsWindows.zip Unzip WebExtensionsWindows.zip Run WebExtensions\Windows\Setup.exe

Page 7

Testing the Server and Web Extensions Installation This procedure assumes that the Server and Web Extensions are installed on the same system. 1. Start Internet Explorer or Firefox browser. 2. For Web Extensions configured with IIS, type URL
http://<servername>/MapServer/MapAgent/index.html

For Web Extensions configured with Apache, type URL


http://<servername:8080>/MapServer/MapAgent/index.html

3. 4. 5. 6.

Click EnumerateResources. Enter Administrator as the User ID and admin as the password. Note: The User ID and password are case-sensitive. Click Submit.

The result should be an XML document like this:

Running Site Administrator The Site Administrator program is a Web application that is installed and configured with the Web Extensions installation. Use the following information to run it and log in: Site: http://servername/MapServer/MapAdmin/Login.php User ID: Administrator Password: admin Notes: User ID and Password are case-sensitive. servername is a variable. It must be replaced with the name of the machine hosting the MapServer Enterprise Server. If everything is installed on one machine, you can use localhost, i.e. http://localhost/...

Page 8

Sample Data and Viewer Sample Application


Sample Data and Viewer Sample Application (for PHP/.Net/Java) are available for use with the MapServer Enterprise 0.9.1 release. Setting up the samples is a 2 step process: 1. Load Sample Data on to the Server 2. Deploy Viewer Sample Application for PHP or .Net or Java on Web Extensions Instructions for loading of the Sample Data on the Server Note: These instructions assume that Server and Web Extensions are installed in the default install locations and working correctly. 1. Download package Sheboygan.mgp from 2.
http://mapserverfoundation.org/htdocs/dl_mirror.php?file=Sheboyga n.mgp Copy package Sheboygan.mgp to C:\Program Files\MapServerEnterprise\Server\Packages http://<servername>/MapServer/MapAdmin/Login.php

3. Start Site Administrator 4. Enter Administrator as the User ID and admin as the password. 5. Select Configure Services menu and check that Packages folder path in Resource Services section is same as in Step 2 6. Select Load Packages menu 7. You should see Sheboygan.mgp in list of packages. Select it. 8. Click on Load Package 9. After the package has been loaded successfully, the status column will say Successfully loaded 10. If you encounter any problems, please check log file C:\Program Files\MapServerEnterprise\Server\Packages\Sheboygan.mgp.log for details. If you have Autodesk MapServer Studio Preview, which can be downloaded from www.autodesk.com/gis, you can use it to test that Sample Data has been loaded correctly. You would need following info to connect to ServerSite URL http://<servername>/MapServer User ID: Administrator Password: admin After connecting to server, you should be able to see them in the Studio Site Explorer (you may need to click the Site Explorer Refresh button if you installed the samples while Studio was running).

Page 9

Alternatively, use can use HTML test forms to test that sample data has been loaded correctly. Like if you execute EnumerateResources operation and specify Type as WebLayout (or any other resource type), you should get a response with 3 WebLayouts:
Library://Samples/Sheboygan/Layouts/SheboyganPhp.WebLayout Library://Samples/Sheboygan/Layouts/SheboyganAsp.WebLayout Library://Samples/Sheboygan/Layouts/SheboyganJsp.WebLayout

Page 10

Viewer Sample Application deployment Download the Viewer Sample Application code for PHP, .Net or Java depending upon Web Extensions API and Viewer Surround you selected during installation of Web Extensions. Instruction below cover1. Setting up Viewer Sample Application (PHP) for Web Extensions API and Viewer Surround for PHP configured with IIS 2. Setting up Viewer Sample Application (PHP) for Web Extensions API and Viewer Surround for PHP configured with Apache 3. Setting up Viewer Sample Application (.Net) for Web Extensions API and Viewer Surround for .Net configured with IIS

Page 11

4. Setting up Viewer Sample Application (Java) for Web Extensions API and Viewer Surround for Java configured with Apache and Tomcat Note: These instructions assume that Server and Web Extensions are installed in default install location and working correctly.
Setting up Viewer Sample Application (PHP) with IIS

1. Download PhpViewerSample.zip from 2.


http://mapserverfoundation.org/htdocs/dl_mirror.php?file=PhpViewe rSample.zip Create a folder PhpViewerSample under C:\Program Files\MapServerEnterprise\WebExtensions and unzip file from Step1 in this

folder. 3. Open the Internet Information Services application (available from Administrative Tools) and navigate the tree to the "Default Web Site". Right-click the "Default Web Site" item and choose "New->Virtual Directory". 4. Click "Next", and enter "PhpViewerSample" for the Alias and click "Next". At the Directory prompt enter or select the directory "PhpViewerSample located in the directory containing the files extracted in step 2 and click "Next". 5. Under Allow the Following make sure the "Read" and "Run scripts" options are checked and then click "Next". Then click "Finish" to create the virtual directory. If the Web Extensions is installed into the default location (C:\Program Files\ MapServerEnterprise\WebExtensions) then there is nothing else to do. If the Web Extensions is not installed in the default location, the sample file AppConstants.php will need to be edited. Open that file with a text editor and update the two paths in that file to reference the installed location of the Web Extensions. This sample app can be used with DWF Viewer or HTML Viewer. For DWF Viewer (Internet Explorer only), use the URLhttp://<servername>/PhpViewerSample/DwfViewerSample.php

Please make sure that system you are launching Internet Explorer on has the MapServer Enterprise 0.9.1 version of the DWF Viewer (6.5.0.679) installed. For HTML Viewer (Internet Explorer or Firefox), use the URLhttp://<servername>/PhpViewerSample/HTMLViewerSample.php

Note: servername is the name or IP Address of the computer that has the Web Extensions and Sample Application installed.

Page 12

Setting up Viewer Sample Application (PHP) with Apache

1. Download PhpViewerSample.zip from 2.


http://mapserverfoundation.org/htdocs/dl_mirror.php?file=PhpViewe rSample.zip Create a folder PhpViewerSample under C:\Program Files\MapServerEnterprise\WebExtensions and unzip file from Step1 in this

folder. 3. Open the file C:\Program Files\Apache Group\Apache2\conf\httpd.conf and add the following lines at the end:
Alias /PhpViewerSample C:\Program Files\MapServerEnterprise\WebExtensions\PhpViewerSample

4. Save the changes and restart the Apache2 service. If the Web Extensions is installed into the default location (C:\Program Files\ MapServerEnterprise\WebExtensions) then there is nothing else to do. If the Web Extensions is not installed in the default location, the sample file AppConstants.php will need to be edited. Open that file with a text editor and update the two paths in that file to reference the installed location of the Web Extensions. This sample app can be used with DWF Viewer or HTML Viewer. For DWF Viewer (Internet Explorer only), use the URLhttp://<servername>/PhpViewerSample/DwfViewerSample.php

Please make sure that system you are launching Internet Explorer on has the MapServer Enterprise 0.9.1 version of the DWF Viewer (6.5.0.679) installed. For HTML Viewer (Internet Explorer or Firefox), use the URLhttp://<servername>/PhpViewerSample/HTMLViewerSample.php

Note: servername is the name or IP Address of the computer that has the Web Extensions and Sample Application installed.
Setting up Viewer Sample Application (.Net) with IIS

1. Download DotNetViewerSample.zip from 2.


http://mapserverfoundation.org/htdocs/dl_mirror.php?file=DotNetVi ewerSample.zip Create a folder DotNetViewerSample under C:\Program Files\MapServerEnterprise\WebExtensions and unzip file from Step1 in this

folder. 3. Copy webconfig.ini from C:\Program 4.


Files\MapServerEnterprise\WebExtensions to DotNetViewerSample Create a bin folder under DotNetViewerSample

folder

Page 13

5. Copy AwDotNetApi.dll and AwUnmanagedApi.dll from C:\Program Files\MapServerEnterprise\WebExtensions\MapViewerNet\bin to


C:\Program Files\MapServerEnterprise\WebExtensions\DotNetViewerSample\bin

folder 6. Open the Internet Information Services application (available from Administrative Tools) and navigate the tree to the "Default Web Site/MapServer". Right-click the "MapServer" item and choose "New->Virtual Directory". 7. Click "Next", and enter "DotNetViewerSample" for the Alias and click "Next". At the Directory prompt enter or select the directory "DotNetViewerSample located in the directory containing the files extracted in step 2 and click "Next". 8. Under Allow the Following make sure the "Read" and "Run scripts" options are checked and then click "Next". Then click "Finish" to create the virtual directory. 9. You might have to Create Application for /MapServer/MapViewerNet. Right click the MapViewerNet and click on Create for Application name. This sample app can be used with DWF Viewer or HTML Viewer. For DWF Viewer (Internet Explorer only), use the URLhttp://<servername>/MapServer/DotNetViewerSample/DwfViewerSample.aspx

Please make sure that system you are launching Internet Explorer on has the MapServer Enterprise 0.9.1 version of the DWF Viewer (6.5.0.679) installed. For HTML Viewer (Internet Explorer or Firefox), use the URLhttp://<servername>/MapServer/DotNetViewerSample/HTMLViewerSample.aspx Setting up Viewer Sample Application (Java) with Apache and Tomcat

1. Download JavaViewerSample.zip from http://mapserverfoundation.org/htdocs/dl_mirror.php?file=JavaViewerSample.zip http://mapserverfoundation.org/htdocs/dl_mirror.php?file=JavaViewerSample.zip 2. Create a folder JavaViewerSample under C:\Program Files\MapServerEnterprise\WebExtensions and unzip file from Step1 in this folder. 3. Make a copy of the file named MapServer.xml located in {TOMCAT_HOME}\conf\Catalina\localhost, and rename the copy JavaViewerSample.xml For DWF Viewer (Internet Explorer only), use the URLhttp://<servername>/MapServer/JavaViewerSample/DwfViewerSample.jsp

Please make sure that system you are launching Internet Explorer on has the MapServer Enterprise 0.9.1 version of the DWF Viewer (6.5.0.679) installed. For HTMLViewer (Internet Explorer or Firefox), use the URLhttp://<servername>/MapServer/JavaViewerSample/HTMLViewerSample.jsp

Page 14

Uninstalling the MapServer Enterprise 0.9.1 Release from Microsoft Windows


1. Follow the standard Microsoft Windows procedure for uninstalling a program from your computer. 2. Remove the folder in which the MapServer Enterprise 0.9.1 was installed. Note: Before uninstalling Autodesk MapServer Studio Preview, be sure that the mgie.exe process is not running. Open the Windows Task Manager and search for the mgie.exe process. If it appears in the list, select it. Click End Process. After the mgie.exe process no longer appears in the list, you can proceed to uninstall Autodesk MapServer Studio Preview.

Page 15