comparison INSTALL_Linux.txt @ 346:ab4e4c4b83c9

Add Install_Linux.txt with all my notes from the installtion this file should be cleaned for publishing
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 16 Nov 2012 17:02:07 +0100
parents
children
comparison
equal deleted inserted replaced
345:0e706cf2234c 346:ab4e4c4b83c9
1 ------------
2 Installation from Source
3 ------------
4 This Documentation describes how you can install MXD2Map from source on GNU/Linux Systems.
5
6 Download the Source tarball of mxd2map and extract it into a directory.
7 The Path used in this example is ~/mxd2map.
8
9 Requirements
10 ------------
11 To run the converter you need at least the following components:
12
13 * Sun Java6 SDK / JRE and ant
14 * ArcEngine10.x with a valid licence enabled
15 * Some additional Java Tools and libraries as documented below
16
17 Install ArcGIS SDK
18 ------------------
19 # As root:
20 # !!! Deactivate SELINUX !!!
21 # ArcGIS fails in many mysterious ways otherwise.
22 # write SELINUX=permissive into: /etc/sysconfig/selinux
23 setenforce Permissive
24
25 yum-install compat-libstdc++-33 compat-libstdc++-296 compat-libf2c compat-libgcc-296 \
26 compat-openldap-2.3 cairo compat-libf2c-34 mesa-libGLU compat-gcc-34 freeglut-2.4 gmp glibc gtk2 gtk2-devel \
27 libidn mesa-libGL mesa-libGLU openldap openmotif-devel openmotif openssl convmv
28 yum-groupinstall "Legacy Software Support"
29 yum-groupinstall "X Window System"
30 yum-groupinstall "Legacy Software Development"
31 yum-groupinstall "X Software Development"
32 yum-groupinstall "Development Tools"
33 useradd mxd2map
34 groupadd arcgis-users
35 usermod -a -G arcgis-users mxd2map
36 mkdir -p /usr/local/share/macrovision/storage
37 chmod g+w /usr/local/share/macrovision/storage
38 chgrp arcgis-users /usr/local/share/macrovision/storage
39
40 # Set passwd for user mxd2map and log in as that user
41
42 /mnt/ArcGIS-SDK/linux/EngineRT/Setup
43 # Click through the dialog leave everything as default
44 /mnt/ArcGIS-SDK/linux/ArcObjectsSDKJava/Setup
45 # Click through the dialog leave everything as default
46 # Register "ArcGIS Engine Runtime and ArcGIS Engine Developer Kit (Single Use)"
47 export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0
48 . ~/arcgis/developerkit10.0/init_devkit.sh
49 . ~/arcgis/developerkit10.0/java/tools/setenv_ant.sh
50
51 Install additional libraries
52 ----------------------------
53 cd ~/mxd2map
54 mkdir lib
55 ## Jargs
56 wget http://sourceforge.net/projects/jargs/files/jargs/1.0/jargs-1.0.tar.bz2/download -O - | \
57 tar -xj jargs.jar -O > jargs.jar
58
59 ## log4j
60 wget http://archive.apache.org/dist/logging/log4j/1.2.9/logging-log4j-1.2.9.tar.gz -O - | \
61 tar -xz log4j-1.2.9.jar -O > log4j.jar
62
63 ## Commons codec
64 wget http://apache.openmirror.de/commons/codec/binaries/commons-codec-1.7-bin.tar.gz -O - | \
65 tar -xz commons-codec-1.7.jar -O > commons-codec.jar
66
67 Install Mapserver from Source
68 -----------------------------
69 This documentation is a log of the steps neccessary to
70 build mapserver 6.2.0-rc1 on CentOS 5.
71 You might just want to install a binary package for your distribution
72 For a real documentation please refer to: http://mapserver.org/installation/unix.html
73
74 # Everything is installed into ~/dev
75 # As root:
76 yum groupinstall "Development Tools"
77 yum install freetype-devel libpng-devel zlib-devel curl-devel libtiff-devel libjpeg-devel fontconfig-devel \
78 libXpm-devel libxml2-devel expat-devel sqlite-devel agg-devel giflib-devel libxslt-devel libexslt-devel httpd-devel
79
80 # As user:
81 # set up some convienance
82 export DEVELDIR=~/devel
83 export SRCDIR=$DEVELDIR/src
84 alias configure="./configure --prefix=$DEVELDIR"
85 function cs {
86 mkdir -p "$SRCDIR"
87 if test -n "$1"; then
88 cd "$SRCDIR/$1"
89 else
90 cd "$SRCDIR"
91 fi
92 }
93
94 cs
95 wget http://download.osgeo.org/proj/proj-4.8.0.tar.gz
96 tar -xf proj-4.8.0.tar.gz
97 cs proj-4.8.0
98 configure && make && make install
99
100 cs
101 wget https://bitbucket.org/pierrejoye/gd-libgd/get/GD_2_0_33.tar.bz2
102 tar -xf GD_2_0_33.tar.bz2
103 cs pierrejoye-gd-libgd-5551f61978e3/src
104 configure && make && make install
105
106 cs
107 wget http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-1.4.0.tar.gz
108 tar -xf libgeotiff-1.4.0.tar.gz
109 cd libgeotiff-1.4.0
110 configure --with-proj=$DEVELDIR && make && make install
111
112 cs
113 wget http://downloads.esri.com/Support/downloads/ao_/FileGDB_API_1_2-32.tar.gz
114 tar -xf FileGDB_API_1_2-32.tar.gz
115 cs -ri FileGDB_API/include FileGDB_API/lib $DEVELDIR
116 export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0
117 . ~/arcgis/engine10.0/init_engine.sh
118 . ~/arcgis/engine10.0/java/tools/init_java.sh
119 . ~/arcgis/developerkit10.0/java/tools/setenv_ant.sh
120 . ~/arcgis/developerkit10.0/init_devkit.sh
121
122 cs
123 wget http://download.osgeo.org/gdal/gdal-1.9.2.tar.gz
124 tar -xf gdal-1.9.2.tar.gz
125 cs gdal-1.9.2
126 configure --enable-shared=no --enable-static=yes --with-fgdb=$DEVELDIR && make && make install
127
128 cs
129 wget http://download.osgeo.org/mapserver/mapserver-6.2.0-rc1.tar.gz
130 tar -xf mapserver-6.2.0-rc1.tar.gz
131 cs mapserver-6.2.0-rc1
132 configure -with-proj=$DEVELDIR --with-gd=$DEVELDIR \
133 --with-ogr=$DEVELDIR/bin/gdal-config \
134 --with-gdal=$DEVELDIR/bin/gdal-config \
135 --with-wfs --with-wcs --with-wmsclient --with-wfsclient --with-sos \
136 --with-xml2-config=/usr/bin/xml2-config --with-apache-module \
137 --with-apxs=/usr/sbin/apxs --with-exslt=yes --with-xslt=yes
138 # in this specific version you also need to apply https://github.com/unicolet/mapserver/commit/8ac6841c4c4857acddd87bdb4dfafb729aea91c3
139 # when building on x86 systems
140 make && make install
141 cd mapscript/java
142 make && make install
143 cp mapscript.jar ~/mxd2map/lib
144
145 Build MXD2map
146 -------------
147
148 cd ~/mxd2map
149 ant jar-norevision
150
151 Run MXD2map
152 -----------
153 ArcGIS needs some weird environment settings. Additionally it provides it's own versions
154 of basic libraries like libstdc++. Here is what you have to do (or at least what worked for me):
155
156 export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0
157 . ~/arcgis/engine10.0/init_engine.sh
158 . ~/arcgis/engine10.0/java/tools/init_java.sh
159 . ~/arcgis/developerkit10.0/java/tools/setenv_ant.sh
160 . ~/arcgis/developerkit10.0/init_devkit.sh
161 export LD_LIBRARY_PATH=$DEVELDIR/lib:$LD_LIBRARY_PATH
162 export LD_PRELOAD=$LD_PRELOAD:/usr/lib/libstdc++.so.6
163 export AWT_TOOLKIT=XToolkit
164
165 # Set the locale to some utf-8 value like
166 export LC_ALL=en_US.UTF-8
167
168 # Run it with:
169 LD_PRELOAD=$LD_PRELOAD:/usr/lib/libstdc++.so.6 java -Xss2m -jar mxd2map.jar
170
171 # Now edit the converter.properties sample so that it points to a valid mxd file
172 # together with a valid mapfile template.
173
174 # If your files contain special characters in windows encoding
175 # convert them with convmv:
176 convmv --notest -r -fcp1252 -t utf8 Bereisungen/
177
178 Setup Mapserver with Apache
179 ---------------------------
180 vim /etc/httpd/conf/httpd.con
181 # Change setting Directory "/var/www/cgi-bin"
182
183 <Directory "/var/www/cgi-bin">
184 AllowOverride None
185 Options ExecCGI
186 Order allow,deny
187 Allow from all
188 </Directory>
189
190 /etc/sysconfig/httpd
191
192 # Notes:
193 # Generate parameters to include all layers
194 export MAPNAME=ausbaustrecken_west && grep wms_title ${MAPNAME}.map | grep -v \"Layer\" | awk '{printf "&layers=" $2}' | sed s/\"//g | xargs -Ifoo echo "http://giid.polyhedra.intevation.de/cgi-bin/$MAPNAME.cgi?mode=browse&template=openlayers&foo"
195
196 # Modify the fonts.txt with fonts according to your installation.
197 sed -i 's/C:\/Windows\/Fonts/\/home\/aheinecke\/arcgis\/engine10.0\/fonts/' ttf-fonts/fonts.txt
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)