comparison INSTALL.txt @ 292:6e5fce16b495

Update/Rework installation dokumentation
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 31 Aug 2012 16:13:19 +0200
parents e6e5eaf431ac
children 5e7e6d99f997
comparison
equal deleted inserted replaced
291:d35744fcfc8e 292:6e5fce16b495
1 .. index:: installation, requirements, apache, UMN MapServer, compile, 1 .. index:: installation, requirements, apache, UMN MapServer, compile,
2 jar, logging, ArcSDE 2 jar, logging, ArcSDE
3 3
4 ------------ 4 ------------
5 Installation from Source
6 ------------
7 This Documentation describes how you can install MXD2Map from source. If you only
8 want to use MXD2Map it is strongly recommended that you use our convenient binary
9 installer.
10
5 Requirements 11 Requirements
6 ------------ 12 ------------
7 13
8 The current version of the converter only runs on Windows. This is because 14 Currently MXD2Map only runs on Windows, because the ArcObjects JDK API does not
9 the ArcObjects JDK API is not running properly on Linux though. In theory 15 work properly on GNU/Linux systems. All Free Software components of MXD2Map can
10 it should also run on Linux. 16 run on GNU/Linux as well as on Windows.
11 17
12 To run the converter you need at least the following componentes: 18 To run the converter you need at least the following components:
13 19
14 * Sun Java6 SDK to build, JRE to run 20 * Sun Java6 SDK to build, JRE to run
15 * ArcGIS Desktop10.x or ArcEngine10.x with a valid licence enabled 21 * ArcGIS Desktop10.x or ArcEngine10.x with a valid licence enabled
16 * UMN MapServer with Java MapScript-bindings (>=6.0.1 or recent development-version) 22 * UMN MapServer with Java MapScript-bindings (>=6.0.1 or recent development-version)
17 * Optinal: Apache2 Webserver for displaying the resulting Mapfiles 23
18 * Optional: MapServer compiled with ArcSDE-plugin 24 Additionally the following components are recommended:
19 * Optional: GDAL/OGR compiled with ArcSDE-support 25
20 * Optional: GDAL/OGR compiled with FileGeodatabase-support 26 * Apache2 Webserver for displaying the resulting Mapfiles
21 * Optional: Other GDAL/OGR-related tools 27 * MapServer compiled with ArcSDE-plugin
22 * Optional: Sphinx for building the docs 28 * GDAL/OGR compiled with ArcSDE-support
23 29 * GDAL/OGR compiled with FileGeodatabase-support
24 30 * Other GDAL/OGR-related tools
25 ------------ 31 * Sphinx for building the docs
26 Installation
27 ------------
28
29 Compile the converter-sources
30 -----------------------------
31
32 To compile the sources you need to have a properly configured
33 ant-environmet available. ArcGIS SDK provides an ant-installation which
34 suffices::
35
36 ant jar
37
38 or::
39
40 ant jar-norevision
41
42 Create run-environment
43 ----------------------
44
45 The current version of MXD2map needs a few steps to run properly.
46 The following steps assume the runtime folder to be c:/mxd2map/. This path can
47 be changed.
48
49 1. Copy ``mxd2map.jar`` to ``c:/mxd2map/``.
50
51 #. Copy folder "conf" from repository to ``c:/mxd2map/``
52
53 #. Create folder ``c:/mxd2map/lib/``
54
55 #. Get log4j from http://logging.apache.org/log4j/1.2/download.html
56
57 #. Get jargs http://jargs.sourceforge.net/ (Version 1.0)
58
59 #. Build the libraries and copy the resulting jar-files to ``c:/mxd2map/lib/``
60
61 #. Copy mapscript.jar and mapscript.dll to ``c:/mxd2map/lib/``
62
63 #. Create a folder ``c:/mxd2map/logs/``
64
65 #. Create or copy a converter.properties file to ``c:/mxd2map/``
66
67 Setup environment-variables
68 ---------------------------
69
70 For running the converter it is necessary to set up some environment
71 variables and adjust the path accordingly.
72
73 The following example shows the minimum env-vars needed::
74
75 @echo off
76 if "%1" == "setenv" goto setenv
77
78 %comspec% /k SDKShell.bat setenv %1
79 goto exit
80
81 :setenv
82 @echo Setting environment for using the GDAL and MapServer tools.
83
84 if "%2"=="hideoci" goto hideoci
85
86 set ocipath=0
87 set _path="%PATH:;=" "%"
88 for %%p in (%_path%) do if not "%%~p"=="" if exist %%~p\oci.dll set ocipath=1
89
90 if "%ocipath%"=="0" goto hideoci
91 @echo WARNING: If you encounter problems with missing oci libraries then type:
92 @echo SDKShell hideoci
93 goto setenv2
94
95 :hideoci
96 @echo Hiding the OCI plugin library.
97 if not exist %CD%\bin\gdal\plugins-optional mkdir %CD%\bin\gdal\plugins-optional
98 if exist %CD%\bin\gdal\plugins\ogr_OCI.dll move %CD%\bin\gdal\plugins\ogr_OCI.dll %CD%\bin\gdal\plugins-optional\ogr_OCI.dll
99 if exist %CD%\bin\gdal\plugins\gdal_GEOR.dll move %CD%\bin\gdal\plugins\gdal_GEOR.dll %CD%\bin\gdal\plugins-optional\gdal_GEOR.dll
100
101 :setenv2
102 SET PATH=C:\Program Files\ArcGIS\DeveloperKit10.0\java\jre\bin;C:\Program Files\ArcGIS\Engine10.0\bin;%CD%\bin;%CD%\bin;%CD%\bin\gdal\python\osgeo;%CD%\bin\proj\apps;%CD%\bin\gdal\apps;%CD%\bin\ms\apps;%CD%\bin\gdal\csharp;%CD%\bin\ms\csharp;%CD%\bin\curl;%CD%\bin\ms\java;C:\Program Files\Vim\vim71;C:\Program Files\TortoiseHg;%PATH%
103 SET GDAL_DATA=%CD%\bin\gdal-data
104 SET GDAL_DRIVER_PATH=%CD%\bin\gdal\plugins
105 SET PYTHONPATH=%CD%\bin\gdal\python\osgeo
106 SET PROJ_LIB=%CD%\bin\proj\SHARE
107 SET CURL_CA_BUNDLE=C:\ms4w\Apache\conf\ca-bundle\cacert.pem
108
109 :exit
110
111 The above batch-script ``SDKShell.bat`` needs to be sources before working
112 with MXD2map.
113
114 32
115 Install Apache Webserver 33 Install Apache Webserver
116 ------------------------ 34 ------------------------
35 To display the resulting mapfiles directly you need to
36 install a webserver like Apache2 and the UMN MapServer.
117 37
118 .. important:: 38 .. important::
119 If you are using `MS4W <http://www.maptools.org/ms4w/>`_, the following install instruction does not 39 If you are using `MS4W <http://www.maptools.org/ms4w/>`_, the following installation
120 help. MS4W does not provide the neede version to run MXD2map, though it 40 instruction does apply. , although it can be used to preview the `resulting` mapfiles
121 can be used to preview the `resulting` mapfiles! 41 MS4W does not provide the needed version to run MXD2map.
122 42
123 If you will be able to display the resulting mapfiles directly you need to 43 Download Apache from https://httpd.apache.org/download.cgi and install it by
124 install a webserver like Apache2 and the UMN MapServer CGI-file 44 executing the .msi-file and following the install-dialogs.
125 ``mapserv.exe``. 45
126 46 Make sure that you install apache as a service so it is available
127 Install Apache webserver by exedcuting the .msi-file and follow the 47 directly after system startup.
128 install-dialogs::
129
130 httpd-2.2.19-win32-x86-openssl-0.9.8r.msi
131
132 Make sure that you install apache as a service so it will be available
133 directly after system bootup.
134 48
135 49
136 Install UMN MapServer 50 Install UMN MapServer
137 --------------------- 51 ---------------------
138 52
139 The current documentation uses the Windows binary-builds from http://www.gisinternals.com/sdk/ 53 It is recommended to use the latest binary release version from http://www.gisinternals.com/sdk/
140 54 as the MapServer for MXD2Map.
141 1. Unzip the ZIP-file at ``c:/ms_6.1-dev`` 55
142 56 1. Unzip the MapServer ZIP-file at ``c:\ms_6.1-dev``
143 #. Configure Apache Webserver to find the cgi-bin-folder:: 57
58 #. Modify the Apache configuration (e.g. ``c:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf``)
59 by adding::
144 60
145 ScriptAlias /cgi-bin/ "C:/ms_6.1-dev/bin/" 61 ScriptAlias /cgi-bin/ "C:/ms_6.1-dev/bin/"
146 62
147 <Location "/cgi-bin"> 63 <Location "/cgi-bin">
148 Options None 64 Options None
149 Order allow,deny 65 Order allow,deny
150 Allow from all 66 Allow from all
151 </Location> 67 </Location>
152 68
153 #. Copy mapserv.exe from ``c:/ms_6.1-dev/bin/apps/ms`` to ``c:/ms_6.1-dev/bin/``
154
155 #. Add environment-variables to apache in order to have WMS-server available::
156
157 SetEnv PROJ_LIB "c:/ms_6.1-dev/bin/proj/SHARE" 69 SetEnv PROJ_LIB "c:/ms_6.1-dev/bin/proj/SHARE"
158 SetEnv PATH "c:/ms_6.1-dev/bin" 70 SetEnv PATH "c:/ms_6.1-dev/bin"
159 SetEnv PATH "c:/ms_6.1-dev/bin/gdal/python/osgeo" 71 SetEnv PATH "c:/ms_6.1-dev/bin/gdal/python/osgeo"
160 72
161 # set GDAL_DATA environment variable to location of supporting gdal files 73 # set GDAL_DATA environment variable to location of supporting gdal files
162 SetEnv GDAL_DATA "c:/ms_6.1-dev/bin/gdaldata" 74 SetEnv GDAL_DATA "c:/ms_6.1-dev/bin/gdaldata"
163 75
164 # set GDAL_DRIVER_PATH environment variable for gdal plugins 76 # set GDAL_DRIVER_PATH environment variable for gdal plugins
165 SetEnv GDAL_DRIVER_PATH "c:/ms_6.1-dev/bin/gdal/plugins" 77 SetEnv GDAL_DRIVER_PATH "c:/ms_6.1-dev/bin/gdal/plugins"
166 78
167 #. Optional: Add your proprietary DLLs to ``c:/ms_6.1-dev/bin`` for Oracle, SDE etc. 79
168 80 #. Copy mapserv.exe from ``c:\ms_6.1-dev\bin\ms\apps`` to ``c:\ms_6.1-dev\bin\``
81
82 #. Optional: Add additional Libraries (DLL's) to ``c:\ms_6.1-dev\bin`` for Oracle, SDE etc.
83
84 Install the Converter
85 ------------
86 The following steps assume the runtime folder to be c:\mxd2map.
87
88 1. Download the Source Package from https://mxd2map.org/download.html
89
90 #. Extract the tarball using 7-Zip (http://7-zip.org) or something similar to ``c:\mxd2map\``.
91
92 #. Create folder ``c:\mxd2map\lib\``
93
94 #. Create folder ``c:\mxd2map\logs\``
95
96 #. Get log4j from http://logging.apache.org/log4j/1.2/download.html
97
98 #. Get jargs http://jargs.sourceforge.net/ (Version 1.0)
99
100 #. Get apache commons codec from https://commons.apache.org/codec/download_codec.cgi
101
102 #. Copy the jar-files of log4j, jargs and commons codec to ``c:\mxd2map\lib\``
103
104 #. Remove the version numbers of the jar file names in lib, or adopt the build.xml accordingly!
105
106 #. Copy mapscript.jar and mapscript.dll from your MapServer Installation (e.g. ``c:\ms_6.1-dev\bin\ms\java``) to ``c:\mxd2map\lib\``
107
108 #. Copy the converter.properties.sample file to ``c:\mxd2map\converter.properties`` and edit it
109 according to your needs.
110
111 Compile the converter-sources
112 -----------------------------
113
114 To compile the sources you need to have a properly configured
115 ant-environment available. ArcGIS SDK provides an ant-installation which
116 suffices::
117
118 ant jar
119
120 or::
121
122 ant jar-norevision
123
124 Setup environment-variables
125 ---------------------------
126
127 For running the converter it is necessary to set up some environment
128 variables and adjust the path accordingly.
129
130 Adapt the following example script to set the minimum variables needed::
131
132 @echo off
133
134 rem ###########################EDIT HERE#############################
135
136 rem Set the following Path variables according to your installation:
137
138 set MXD2MAP_PATH=c:\mxd2map
139 set MAPSERVER_PATH=c:\ms_6.1-dev
140 set ARCGISSDK_PATH=c:\Program Files\ArcGIS\DeveloperKit10.0
141 set ARCGISENGINE_PATH=c:\Program Files\ArcGIS\Engine10.0
142
143 rem No editing should be necessary below this line (in an ideal world)
144 rem ##################################################################
145
146 if "%1" == "setenv" goto setenv
147
148 %comspec% /k SDKShell.bat setenv %1
149 goto exit
150
151 :setenv
152 @echo Setting environment for using the GDAL and MapServer tools.
153
154 if "%2"=="hideoci" goto hideoci
155
156 set ocipath=0
157 set _path="%PATH:;=" "%"
158 for %%p in (%_path%) do if not "%%~p"=="" if exist %%~p\oci.dll set ocipath=1
159
160 if "%ocipath%"=="0" goto hideoci
161 @echo WARNING: If you encounter problems with missing oci libraries then type:
162 @echo SDKShell hideoci
163 goto setenv2
164
165 :hideoci
166 @echo Hiding the OCI plugin library.
167 if not exist %GDAL_PATH%\bin\gdal\plugins-optional mkdir %GDAL_PATH%\bin\gdal\plugins-optional
168 if exist %GDAL_PATH%\bin\gdal\plugins\ogr_OCI.dll move %GDAL_PATH%\bin\gdal\plugins\ogr_OCI.dll %GDAL_PATH%\bin\gdal\plugins-optional\ogr_OCI.dll
169 if exist %GDAL_PATH%\bin\gdal\plugins\gdal_GEOR.dll move %GDAL_PATH%\bin\gdal\plugins\gdal_GEOR.dll %GDAL_PATH%\bin\gdal\plugins-optional\gdal_GEOR.dll
170
171 :setenv2
172 SET PATH=%ARCGISSDK_PATH%\java\jre\bin;%ARCGISENGINE_PATH%\bin;%MXD2MAP_PATH%\bin;%MAPSERVER_PATH%\bin\gdal\python\osgeo;%MAPSERVER_PATH%\bin\proj\apps;%MAPSERVER_PATH%\bin\gdal\apps;%MAPSERVER_PATH%\bin\ms\apps;%MAPSERVER_PATH%\bin\gdal\csharp;%MAPSERVER_PATH%\bin\ms\csharp;%MAPSERVER_PATH%\bin\curl;%MAPSERVER_PATH%\bin\ms\java;%PATH%
173 SET GDAL_DATA=%MAPSERVER_PATH%\bin\gdal-data
174 SET GDAL_DRIVER_PATH=%MAPSERVER_PATH%\bin\gdal\plugins
175 SET PYTHONPATH=%MAPSERVER_PATH%\bin\gdal\python\osgeo;%PYTHONPATH%
176 SET PROJ_LIB=%MAPSERVER_PATH%\bin\proj\SHARE
177
178 :exit
179
180 Save the above script as ``c:\mxd2map\SDKShell.bat`` and execute it before working with MXD2map.
169 181
170 Configure Logging 182 Configure Logging
171 ----------------- 183 -----------------
172 184
173 Logging is supported on different levels. MXD2map logs with Javas Log4J. A 185 Logging is supported on different levels. MXD2map logs with Log4J. A
174 sample configuration could look like this:: 186 sample configuration for Log4J could look like this::
175 187
176 #### Log just errors and warnings to a file. 188 #### Log just errors and warnings to a file.
177 log4j.rootLogger=DEBUG, MXD, Console 189 log4j.rootLogger=DEBUG, MXD, Console
178 190
179 log4j.appender.MXD=org.apache.log4j.RollingFileAppender 191 log4j.appender.MXD=org.apache.log4j.RollingFileAppender
191 203
192 204
193 Apache Webserver and UMN MapServer 205 Apache Webserver and UMN MapServer
194 .................................. 206 ..................................
195 207
196 They both support logging. MapServers outout ends up in Apaches logfiles 208 They both support logging. MapServers output ends up in Apaches logfiles
197 if not configured differently within a providing template. The loglevel 209 if not configured differently within a providing template. The loglevel
198 can be adjusted at template-level. For further information consult the UMN 210 can be adjusted at template-level. For further information consult the UMN
199 MapServer manual regarding logging at 211 MapServer manual regarding logging at
200 http://mapserver.org/optimization/debugging.html#steps-to-enable-mapserver-debugging. 212 http://mapserver.org/optimization/debugging.html#steps-to-enable-mapserver-debugging.
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)