Mercurial > dive4elements > river
annotate doc/INSTALL_DE @ 7786:61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Wed, 05 Mar 2014 17:52:19 +0100 |
parents | b1dfc7934e9d |
children | a18c97f9d752 |
rev | line source |
---|---|
7769 | 1 =============================================================================== |
2 Installation Dive4Elements-river | |
3 =============================================================================== | |
4 | |
5 Diese Anleitung geht davon aus, dass ein Benutzer 'd4euser' existiert, der | |
6 angemeldet ist und mit dem die Schritte der Installation durchgeführt werden. | |
7 | |
7776
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
8 Die Installationsanleitung wurde mit Debian wheezy getestet. Die Versionen |
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
9 der im nächsten Schritt installierten Pakete waren zu diesem Zeitpunkt: |
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
10 _ openjdk-7-jdk 7u25-2.3.10-1~deb7u1 |
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
11 _ tomcat6 6.0.35-6+deb7u1 |
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
12 _ postgresql-9.1-postgis 1.5.3-2 |
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
13 _ apache2 2.2.22-13+deb7u1 |
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
14 _ cgi-mapserver 6.0.1-3.2+deb7u2 |
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
15 _ ttf-freefont 20120503-1 |
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
16 Für die Installation aus den Quellen: |
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
17 _ maven2 2.2.1-12 |
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
18 _ mercurial 2.2.2-3 |
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
19 _ subversion 1.6.17dfsg-4+deb7u4 |
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
20 _ build-essential 11.5 |
7769 | 21 |
22 Erforderliche Pakete zum Installieren von D4E-river | |
23 =================================================== | |
24 $ su root | |
7784
9cefe1ab5b10
INSTALL_DE: install Java 7 prior to tomcat to avoid Java 6 installation.
Tom Gottfried <tom@intevation.de>
parents:
7783
diff
changeset
|
25 $ apt-get install openjdk-7-jdk |
9cefe1ab5b10
INSTALL_DE: install Java 7 prior to tomcat to avoid Java 6 installation.
Tom Gottfried <tom@intevation.de>
parents:
7783
diff
changeset
|
26 $ apt-get install tomcat6 postgresql-9.1-postgis \ |
7776
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
27 apache2 cgi-mapserver ttf-freefont |
7769 | 28 |
29 | |
30 Benutzer und Verzeichnis für die Serverkomponente anlegen | |
31 ========================================================= | |
32 $ useradd d4e | |
33 $ cd /opt/ | |
34 $ mkdir d4e-river | |
35 $ chown d4e d4e-river/ | |
36 | |
37 | |
38 Benutzer und Gruppe für das Logging anlegen | |
39 =========================================== | |
40 $ groupadd d4e_log | |
41 $ usermod -a -G d4e_log d4e | |
42 $ usermod -a -G d4e_log tomcat6 | |
43 $ usermod -a -G d4e_log www-data | |
44 | |
45 | |
46 Anlegen des Logging Verzeichnisses | |
47 ================================== | |
48 $ mkdir /var/log/d4e-river | |
49 $ chgrp d4e_log /var/log/d4e-river | |
50 $ chmod 775 /var/log/d4e-river | |
51 $ exit | |
52 | |
53 | |
7786
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
54 Installation von D4E-river aus Binärpaket |
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
55 ========================================= |
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
56 |
7769 | 57 Entpacken des Dive4Elements-river Installer-Pakets |
7786
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
58 -------------------------------------------------- |
7769 | 59 $ tar -xzf d4e-river.tar.gz |
60 @TODO: eventuell anpassen | |
61 | |
62 Erfolgt die Installation von D4E-river aus den Binärpaketen, können die | |
63 folgenden Schritte übersprungen werden. | |
64 Die weiteren Schritte sind ab dem Abschnitt 'Backenddatenbanken' | |
65 beschrieben. | |
66 | |
67 | |
7786
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
68 Installation von D4E-river aus den Quellen |
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
69 ========================================== |
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
70 |
7769 | 71 Pakete zum Bauen von D4E-river |
72 ------------------------------ | |
7786
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
73 $ su root |
7776
b972c7e1bfbe
INSTALL_DE: mention tested system and simplify dependency installation.
Tom Gottfried <tom@intevation.de>
parents:
7769
diff
changeset
|
74 $ apt-get install maven2 mercurial |
7769 | 75 |
76 | |
7785
b1dfc7934e9d
INSTALL_DE: we don't want links to internalt sites and to build WSPLGEN
Tom Gottfried <tom@intevation.de>
parents:
7784
diff
changeset
|
77 Installation der Intevationszertifikate für den Checkout von Wald |
b1dfc7934e9d
INSTALL_DE: we don't want links to internalt sites and to build WSPLGEN
Tom Gottfried <tom@intevation.de>
parents:
7784
diff
changeset
|
78 ----------------------------------------------------------------- |
b1dfc7934e9d
INSTALL_DE: we don't want links to internalt sites and to build WSPLGEN
Tom Gottfried <tom@intevation.de>
parents:
7784
diff
changeset
|
79 Installation der Serverzertifikate von Intevation |
b1dfc7934e9d
INSTALL_DE: we don't want links to internalt sites and to build WSPLGEN
Tom Gottfried <tom@intevation.de>
parents:
7784
diff
changeset
|
80 (siehe auch https://ssl.intevation.de) |
7769 | 81 |
82 $ apt-get install ca-certificates curl gnutls-bin | |
83 $ curl https://ssl.intevation.de/Intevation-Root-CA-2010.crt | \ | |
84 certtool -i | awk '/^-----BEGIN CERTIFICATE-----$/ , 0' > \ | |
85 /usr/local/share/ca-certificates/Intevation-Root-CA-2010.crt | |
86 $ update-ca-certificates | |
87 | |
7786
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
88 #. Mercurial beibringen die Zertifikate zu nutzen: |
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
89 # hierzu kann beispielsweise die Systemweite mercurial Konfiguration |
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
90 # editiert werden, z.B. mit dem Editor nano: |
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
91 $ nano /etc/mercurial/hgrc |
7769 | 92 |
93 # Folgendes einfügen (siehe https://intranet.intevation.de/Mercurial#https) | |
94 [web] | |
95 cacerts = /etc/ssl/certs/ca-certificates.crt | |
96 | |
7786
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
97 $ exit # d4euser werden |
7769 | 98 |
99 | |
100 Checkout der D4E-Quellen | |
101 ------------------------ | |
102 $ mkdir d4e-river | |
103 $ cd d4e-river | |
104 $ hg clone https://scm.wald.intevation.org/hg/dive4elements/framework/ | |
105 $ hg clone https://scm.wald.intevation.org/hg/dive4elements/http-client/ | |
106 $ hg clone https://scm.wald.intevation.org/hg/dive4elements/river/ | |
107 | |
108 | |
109 Anpassen der Clientkonfiguration | |
110 -------------------------------- | |
111 $ cd river/gwt-client/src/main/webapp/WEB-INF/ | |
112 | |
113 #. Mapfishprint config.yaml anpassen | |
114 | |
7786
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
115 $ nano config.yaml |
7769 | 116 |
117 Folgenden Eintrag im Abschnitt 'the list of allowed hosts' hinzufügen: | |
118 | |
119 - !dnsMatch | |
7786
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
120 host: yourhost # Hier den Hostnamen verwenden auf dem der MapServer läuft. |
7769 | 121 port: 8081 # Den entsprechenden Port eintragen. |
122 | |
123 | |
124 Anpassen der Serverkonfiguration | |
125 -------------------------------- | |
7786
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
126 $ cd ~/d4e-river/river/artifacts/doc/conf/ |
7769 | 127 |
128 #. Pfad zu den DGMs anpassen: | |
129 $ vi conf.xml | |
7786
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
130 <dgm-path>/opt/d4e-river/dgm/</dgm-path> |
7769 | 131 |
132 #. Einstellen der WMS Urls | |
7781
be4b37839015
INSTALL_DE: remove obsolete server configuration.
Tom Gottfried <tom@intevation.de>
parents:
7779
diff
changeset
|
133 # Anstatt yourhost:8081 in rivermap.xml und floodmap.xml den korrekten |
be4b37839015
INSTALL_DE: remove obsolete server configuration.
Tom Gottfried <tom@intevation.de>
parents:
7779
diff
changeset
|
134 # Host eintragen auf dem der MapServer läuft |
7769 | 135 |
136 | |
137 Konfigurieren des Logging | |
138 ------------------------- | |
7783
e55119cbdc19
Useful server-logging for demo installation.
Tom Gottfried <tom@intevation.de>
parents:
7782
diff
changeset
|
139 # Anpassungen des Loggings können für den Client in |
e55119cbdc19
Useful server-logging for demo installation.
Tom Gottfried <tom@intevation.de>
parents:
7782
diff
changeset
|
140 # river/gwt-client/src/main/webapp/WEB-INF/log4j.properties |
e55119cbdc19
Useful server-logging for demo installation.
Tom Gottfried <tom@intevation.de>
parents:
7782
diff
changeset
|
141 # und für den Server in river/artifacts/doc/conf/log4j.properties |
e55119cbdc19
Useful server-logging for demo installation.
Tom Gottfried <tom@intevation.de>
parents:
7782
diff
changeset
|
142 # vorgenommen werden |
7769 | 143 |
144 | |
145 Bauen der Server- und Clientkomponenten | |
146 --------------------------------------- | |
147 $ cd framework/ | |
148 $ mvn clean compile package install | |
149 $ cd ../http-client/ | |
150 $ mvn clean compile package install | |
151 $ cd ../river/backend/ | |
152 $ mvn clean compile package install | |
153 $ cd ../artifacts/ | |
154 $ mvn clean compile package dependency:copy-dependencies | |
155 $ cd ../gwt-client/ | |
156 $ curl -O http://openlayers.org/download/OpenLayers-2.11.tar.gz | |
157 $ tar xvfz OpenLayers-2.11.tar.gz | |
158 $ mv OpenLayers-2.11 src/main/webapp/ | |
159 $ mvn clean compile package | |
160 $ cd ../../ | |
161 | |
162 | |
163 Kopieren der Serverkomponenten | |
164 ------------------------------ | |
165 $ su root | |
166 $ su d4e | |
167 $ cd /opt/d4e-river/ | |
168 $ mkdir -p bin/lib | |
169 $ cp /home/d4euser/d4e-river/river/artifacts/target/river-artifacts-1.0-SNAPSHOT.jar bin/lib/ | |
170 $ cp /home/d4euser/d4e-river/river/artifacts/target/dependency/* bin/lib/ | |
171 $ mkdir conf | |
172 $ cp /home/d4euser/d4e-river/framework/artifact-database/doc/example-conf/log4j.properties conf/ | |
173 $ cp -R ../river/artifacts/doc/conf/* conf/ | |
174 | |
175 | |
176 Artefaktdatenbank erstellen | |
177 =========================== | |
178 $ su root | |
179 $ su d4e | |
180 $ cd /opt/d4e-river/ | |
181 $ /home/d4euser/d4e-river/river/contrib/make_flys_release/h2/createArtifacts.sh \ | |
182 /home/d4euser/d4e-river/framework/artifact-database/doc/schema-h2.sql | |
183 $ exit | |
184 $ exit | |
185 | |
186 | |
187 Datenkorbdatenbank erstellen | |
188 ============================ | |
189 $ su root | |
190 $ su d4e | |
191 $ cd /opt/d4e-river/ | |
192 $ /home/d4euser/d4e-river/river/contrib/make_flys_release/h2/createDatacage.sh \ | |
193 /home/d4euser/d4e-river/river/artifacts/doc/conf/datacage.sql | |
194 $ exit | |
195 $ exit | |
196 | |
197 | |
198 Backenddatenbanken (Fachdatenbank und Seddb) | |
199 ============================================ | |
200 | |
201 Anlegen und befüllen der Datenbanken | |
202 ------------------------------------ | |
203 #. Einspielen des Schemas für die Backenddatenbank | |
204 $ su root | |
205 $ su postgres | |
206 $ cd /home/d4euser/d4e-river/river/backend/doc/schema/ | |
207 $ ./postgresql-setup.sh d4e . localhost | |
208 | |
209 #. Einspielen der Daten in die erstellte DB | |
210 $ psql -d d4e -f /home/d4euser/d4e-river/d4e_demodata.dump.sql | |
211 | |
212 #. Erstellen der Seddb | |
213 $ createuser -S -D -R sedb | |
214 $ createdb seddb | |
215 $ psql -d seddb -c "ALTER USER sedb WITH PASSWORD 'sedb';" | |
216 $ psql -d seddb -U sedb -h localhost -f /home/d4euser/d4e-river/seddb.dump.sql | |
217 | |
218 #. wieder d4euser werden | |
219 $ exit | |
220 $ exit | |
221 | |
222 | |
223 Konfiguration der Datenbankverbindungen | |
224 --------------------------------------- | |
225 #. Anpassen des Benutzers und des Datenbanknames | |
226 $ su root | |
227 $ su d4e | |
228 $ cd /opt/d4e-river/conf/ | |
229 $ sed -i s@flys@d4e@ backend-db.xml | |
230 | |
231 | |
232 Kopieren der DGMs | |
233 ================= | |
234 $ su root | |
235 $ su d4e | |
236 $ mkdir /opt/d4e-river/dgm | |
237 $ cp /home/d4euser/d4e-river/dgm/* /opt/d4e-river/dgm | |
238 | |
239 | |
240 Einrichten von WSPLGEN | |
241 ====================== | |
242 WSPLGEN kann als ausführbare Datei heruntergeladen werden | |
243 (https://wald.intevation.org/projects/wsplgen/). Die Datei 'wsplgen.exe' muss | |
244 dann nur noch in das 'bin' Verzeichnis des D4E-river Servers kopiert werden. | |
245 | |
246 $ su root | |
247 $ su d4e | |
248 $ cp /path/to/wsplgen.exe /opt/d4e-river/bin | |
249 | |
250 | |
251 Einrichten des Mapserver und Apache | |
252 =================================== | |
253 #. Anlegen der cgi-Skripte für die WMS-Dienste | |
254 | |
255 $ su root | |
256 $ cd /usr/lib/cgi-bin/ | |
257 $ touch user-wms | |
258 $ vi user-wms | |
259 # folgendes einfügen: | |
260 #!/bin/sh | |
261 export MS_MAPFILE=/opt/d4e-river/flys.map | |
262 ./mapserv | |
263 $ touch river-wms | |
264 $ vi river-wms | |
265 # folgendes einfügen: | |
266 #!/bin/sh | |
267 export MS_MAPFILE=/home/d4e-river/rivers.map | |
268 ./mapserv | |
269 $ chmod 755 user-wms | |
270 $ chmod 755 river-wms | |
271 $ exit | |
272 | |
273 #. Der Apache ist vorkonfiguriert und braucht keine weitere Anpassung. | |
274 | |
275 | |
276 Einrichtung der D4E-Benutzer und -Rollen | |
277 ======================================== | |
278 #. Authentifizierung über lokale Datei | |
7786
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
279 # Die Datei enthält durch Leerzeichen getrennt je Zeile |
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
280 # Benutzer, Passwort und Gruppe |
7769 | 281 $ su root |
282 $ cd /usr/share/tomcat6/ | |
7786
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
283 $ echo "d4e_demo demo d4e_demo_all |
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
284 d4e_demo1 demo |
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
285 d4e_demo_extern demo d4e_demo_extern" > flys_user_file |
7769 | 286 $ exit |
287 | |
7786
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
288 # Die Konfiguration der je Gruppe freigeschalteten Module und Gewässer |
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
289 # befindet sich in river/gwt-client/src/main/webapp/WEB-INF/features.xml |
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
290 |
61a9e7df0728
INSTALL_DE: small corrections and (hopefully) improvements.
Tom Gottfried <tom@intevation.de>
parents:
7785
diff
changeset
|
291 |
7769 | 292 Anlegen des Start-Skripts |
293 ============================ | |
294 $ su root | |
295 $ su d4e | |
296 $ cp /home/d4euser/d4e-river/river/contrib/make_flys_release/bin/run.sh /opt/d4e-river/bin/ | |
297 $ exit | |
298 $ exit | |
299 | |
300 Client in Tomcat Servlet-Container ablegen | |
301 ========================================== | |
302 $ su root | |
303 $ cp /home/d4euser/d4e-river/river/gwt-client/target/gwt-client-1.0-SNAPSHOT.war /var/lib/tomcat6/webapps/d4e-river.war | |
304 $ chown tomcat6 /var/lib/tomcat6/webapps/d4e-river.war | |
305 $ exit | |
306 | |
307 Starten der Serverkomponente | |
308 ============================ | |
309 $ su root | |
310 $ su d4e | |
311 $ cd /opt/d4e-river | |
312 $ bin/run.sh | |
313 | |
314 Die Anwendung ist dann im Browser unter | |
315 | |
316 http://servername:8080/d4e-river | |
317 | |
318 erreichbar. |