comparison doc/admin-manual/installation-base.tex @ 949:11d8cc2deb92 1.0

merged doc/1.0
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:13:58 +0200
parents 3b67f53ff57b
children cbfe708b9a17
comparison
equal deleted inserted replaced
899:3f9fc88aec2b 949:11d8cc2deb92
1 \section{Installation and Configuration}
2
3 This section describes preconditions for the entire system and an installation
4 on a Debian 5.0.x (Lenny) for the GNV-System without an running X-Environment.
5 Mostly, the debian package management\footnote{Further information at
6 \url{http://www.debian.org/doc/manuals/debian-reference/ch02.en.html}}
7 using \verb+ aptitude+ is used in this manual.
8
9 If existing configurations have to be changed, the following notation will be
10 used: \verb|+| for adding a line replacing the marked by \verb|-|.
11
12 \subsection{Preconditions}
13
14 \subsubsection*{System}
15
16 \begin{itemize}
17 \item Storage for the delivered software: 100 MB
18 \item Current processor on a 32-bit Architecture (Beginning
19 2010)\footnote{Running on a 64-bit system should work out of the box
20 and improve scalibility issues (not tested yet).}
21 \item RAM: 1 GB for production as minimum.\footnote{This value depends
22 mainly on the amount of connected users.}
23 \item Network access to Database Backend
24 \item RW-Access to the filesystem for logging, shapefile-export,
25 caching
26 \end{itemize}
27
28 \subsubsection*{Database: Software and Data}
29
30 The software has been developed for the following system:
31
32 \begin{itemize}
33 \item ESRI ArcSDE 9.3.1 on Oracle 10.2\footnote{The development
34 started in ESRI ArcSDE 9.2. There are known
35 problems with this version.}
36 \item ArcMarineBSH, model package "Time Series and Measurements"
37 \item ArcMarineBSH, model package " MeshFeature"
38 \item ArcMarineBSH, model package "Marine Feature"
39 \item ArcS57 -- International Hydrographic Organization (IHO) S-57 for
40 ENC Data Model. - ESRI Data Models. http://support.esri.com/datamodels
41 \item CONTIS -- Federal Maritime and Hydrographic Agency (BSH). Continental
42 Shelf Information System -- \\
43 \url{http://www.bsh.de/en/Marine\_uses/Industry/CONTIS\_maps/index.jsp}
44 \item GNV specific schema MapViewer interface -- Schema for integrating with MapViewer and
45 their WMS services
46 \item GNV specific schema for managing the cache -- The central
47 dataware house is updated regulary. To keep the cache up-to-date,
48 needs to cleaned after database updates.
49 \end{itemize}
50
51
52 \subsection{Operating System}
53
54 {\em Hint}: Configuring of partitions, firewalls, etc. for the system is out of
55 the scope of this documentation.
56
57 \subsection{Java Environment}
58
59 \subsubsection*{Installation Sun Java 6}
60
61 This GNV-system is developed for Sun Java 6.
62
63 Add non-free packages of the Debian distribution to the system in
64 \verb+/etc/apt/sources.list+:
65
66 \begin{lstlisting}
67 [...]
68 deb http://ftp.de.debian.org/debian/ lenny main non-free
69 deb-src http://ftp.de.debian.org/debian/ lenny main
70
71 deb http://security.debian.org/ lenny/updates main
72 deb-src http://security.debian.org/ lenny/updates main
73 [...]
74 \end{lstlisting}
75
76
77 Install Sun Java 6 and its dependencies by executing the following:
78
79 \verb+ apt-get install sun-java6-jdk+
80
81
82 \subsubsection*{Install Native Components for Java6 (optional)}
83
84 This step is optional but recommended\footnote{For background
85 information, c.f. \url{http://tomcat.apache.org/tomcat-5.5-doc/apr.html}}.
86
87 For a better support of the native server technologies, the package
88 \verb+libtcnative+ can be installed.
89
90 \begin{lstlisting}
91 apt-get install libtcnative-1
92 cd /usr/lib/jvm/java-6-sun/jre/lib/i386/client
93 ln -s /usr/lib/libtcnative-1.so
94 \end{lstlisting}
95
96 \subsubsection*{Configuration}
97
98 To ensure that the Apache Tomcat and the GNV Artifact-Server will use
99 Sun Java 6 exclusively, switch to the default Java version
100 globally\footnote{This manual assumes that there are no other packages
101 depending to another Java version.}.
102
103 Use \verb+update-alternatives+ mechanism of the Debian
104 system\footnote{Background information: {\tt man update-alternatives}}, execute:
105
106 \verb+ update-alternatives --list java+
107
108 Lists all installed Java-Environments. E.g.:
109
110 \begin{lstlisting}
111 Auswahl Alternative
112 -----------------------------------------------
113 1 /usr/bin/gij-4.3
114 + 2 /usr/lib/jvm/java-gcj/jre/bin/java
115 3 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
116 * 4 /usr/lib/jvm/java-6-sun/jre/bin/java
117 \end{lstlisting}
118
119
120 \verb+update-alternatives --config java+
121
122 Opens a dialog to reconfigure the java version which should be used as default.
123 Type the Number of the the java which should be used.
124 For the example above, type "4".
125
126 \subsubsection*{Test of the Installation}
127
128 Execute \verb+ java -version+
129
130 Check if a version of 1.6.0* has been set. Check:
131
132 \begin{lstlisting}
133 java version "1.6.0_12"
134 Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
135 Java HotSpot(TM) Server VM (build 11.2-b01, mixed mode)
136 \end{lstlisting}
137
138
139 \subsection{Tomcat Application Server}
140 To run the GNV-System a Apache Tomcat Server Version 5.5 is required.
141 This section describes the steps for installing and configuring
142 Apache Tomcat.
143
144 \subsubsection*{Installation}
145
146 To install the Tomcat Application-Server and its dependencies, execute:
147
148 \verb+ apt-get install tomcat5.5+
149
150 \subsubsection*{Configuration}
151
152 Adapt some run-time specific properties in
153 \verb+/etc/default/tomcat5.5+:
154
155 \begin{lstlisting}
156 - #JAVA_OPTS="-Djava.awt.headless=true -Xmx128M"
157 + JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m -server"
158
159 - #TOMCAT5_SECURITY=yes
160 + TOMCAT5_SECURITY=no
161 \end{lstlisting}
162
163 {\bf Hint: As there is no Java security policy for the GNV WebClient,
164 Java Security Management is switched off.}
165
166 The Apache Tomcat is integrate with Apache WebServer just via the Apache
167 JServ Protocoll (AJP). To secure the connection, just local connections
168 are allowed for AJP on Tomcat\footnote{For background information, c.f.
169 \url{http://tomcat.apache.org/tomcat-5.5-doc/connectors.html}}.
170
171 Modify the \verb+ /etc/tomcat5.5/server.xml+:
172 \begin{lstlisting}
173
174 # Deactivate Standard HTTP Connector:
175
176 +<!--
177 <Connector port="8180" maxHttpHeaderSize="8192" address="127.0.0.1"
178 maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
179 enableLookups="false" redirectPort="8443" acceptCount="100"
180 connectionTimeout="20000" disableUploadTimeout="true" />
181 +-->
182
183 - <Connector port="8009"
184 - enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
185
186 + <Connector port="8009"
187 + enableLookups="false" redirectPort="8443" protocol="AJP/1.3" address="127.0.0.1"/>
188 \end{lstlisting}
189
190 To activate these changes, restart Apache Tomcat:
191
192 \verb+ /etc/init.d/tomcat5.5 restart+
193
194 \subsubsection*{Test of the Installation}
195
196 Check if the port 8009 is opened via:
197 \verb+ netstat -nltp | grep 8009+
198
199 A possible listing looks like this:
200 \begin{lstlisting}
201 tcp 0 0 127.0.0.1:8009 0.0.0.0:* LISTEN 19252/jsvc
202 \end{lstlisting}
203
204 So fare, there is no commandline client for AJP to test the connection.
205 If there are problems, setup \verb+ mod_jk+ module in Apache WebServer
206 and check its according log files.
207
208 \subsection{Apache Webserver}
209 This section describes the required steps for the installation and configuration
210 of the Apache Webserver Version 2.2. Apache WebServer controls all
211 HTTP-Connections to the outside of the system. Apache Tomcat is
212 integrated via mod\_jk.
213
214 \subsubsection*{Installation}
215
216 To install the Apache Webserver you have to execute the following command:
217
218 \verb+ apt-get install apache2+
219
220 To establish the connection between the Tomcat application server and
221 Apache Webserver an additional Module "mod\_jk" has to be installed.
222
223 \verb+ apt-get install libapache2-mod-jk+
224
225 \subsubsection*{Configuring mod\_jk}
226
227 Edit the settings for mod\_jk in
228 file \verb+ /etc/libapache2-mod-jk/workers.properties+. For further
229 information, there are comments in the configuration file\footnote{Background
230 information can be found at \\
231 \url{http://tomcat.apache.org/connectors-doc/generic\_howto/workers.html}}.
232
233
234 \begin{lstlisting}
235 - workers.java_home= /usr/lib/jvm/java-gcj/
236 + workers.java_home=/usr/lib/jvm/java-6-sun
237 \end{lstlisting}
238
239 In file \verb+ /etc/apache2/httpd.conf+:
240
241 \begin{lstlisting}
242 + JkWorkersFile "/etc/libapache2-mod-jk/workers.properties"
243 + JkLogFile "/var/log/mod_jk.log"
244 \end{lstlisting}
245
246 After finishing the configuration, enable the module in Apache
247 WebServer: \verb+ a2enmod jk+ and restart the server
248 \verb+ /etc/init.d/apache restart+.
249
250
251 \subsubsection*{Publish the site in Apache WebServer}
252
253 Depending of the existing configuration of Apache WebServer, the
254 following steps can differ. In this case, a vanilla configuration is
255 assumed\footnote{Background information about Apache WebServer can
256 be found at \url{http://httpd.apache.org/docs/2.2/}}.
257
258 Disable default configuration
259 \verb+ a2dissite default+
260
261 Adapt eMail-address for configuration in
262 \verb+ $ARTIFACT_SERVER_HOME/install/debian/apache2/gnv+.
263
264 Enable the specific site (VirtualHost) in Apache WebServer:
265 \begin{lstlisting}
266 cp -i $ARTIFACT_SERVER_HOME/install/debian/apache2 to /etc/apache2/sites-available
267 # Activate site for GNV
268 a2ensite gnv
269 /etc/init.d/apache reload
270 \end{lstlisting}
271
272
273 \subsubsection*{Test of the Installation}
274
275 You can test the installation by executing the following url:
276
277 \verb+ curl "http://localhost/gnv/" -o test+
278
279 After a successful installation, the file {test} will contain HTML describing
280 the startpage of the GNV WebClient.
281
282
283 \subsection{UMN MapServer: Installation and configuration}
284 The UMN MapServer is part of the artifact server. It is responsible for
285 rendering shapefiles produced by the artifact-server and publish them as
286 OGC Web Map Service.
287
288 \subsubsection*{Installation}
289 It is recommended to use a more recent version than the one in Debian
290 Lenny. In the installation package, there is a debian package of
291 MapServer that should be installed.
292
293 In order to verify the integrity of the installation package, it is necessary to import
294 a GPG-Key which was used to sign the packages:
295
296 \begin{lstlisting}
297 gpg --keyserver hkp://keys.gnupg.net --recv-keys EC70B1B8
298 gpg --export EC70B1B8 | apt-key add -
299 \end{lstlisting}
300
301 Installing the mapserver-gp and its dependencies, executing the following command:
302
303 \begin{lstlisting}
304 cd $ARTIFACT_SERVER_HOME/install/debian/umn-mapserver
305 dpkg -i cgi-mapserver-gp_5.6.3-1~gp+1_i386.deb
306 \end{lstlisting}
307
308 Provide a possibility to integrate MapServer properly and transfer
309 configurations to MapServer during runtime:
310
311 \begin{lstlisting}
312 cd /usr/lib/cgi-bin
313 cp -i $ARTIFACT_SERVER_HOME/install/debian/umn-mapserver/gnv-wms .
314 \end{lstlisting}
315
316 For setting proper contact details in the WMS Capabilities response,
317 edit the file \verb+ $ARTIFACT_SERVER_HOME/conf/maptemplates/mapfile.vm+
318 in the section WEB $\rightarrow$ METADATA.
319
320 \subsubsection*{Test of installation}
321 Check for a sucessful installation via:
322
323 \begin{lstlisting}
324 cd root
325 curl \
326 "http://localhost/cgi-bin/gnv-wms?service=WMS&request=GetCapabilities&version=1.1.1" \
327 -o mapserver
328 \end{lstlisting}
329
330 For a sucessful configuration, the response document \verb+ mapserver+
331 contains a XML document describing the capabilities of the mapserver.

http://dive4elements.wald.intevation.org