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