annotate INSTALL.markdown @ 880:c63ecb95dffb

move INSTALL to a markdown File
author Dustin Demuth <dustin@intevation.de>
date Wed, 22 Jul 2015 16:01:54 +0200
parents
children 98d7a325f894
rev   line source
880
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
1 # Installation Lada-Client
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
2
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
3 Für allgemeine Informationen schauen Sie in die README Datei.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
4
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
5 ## Installation
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
6
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
7 Für den Betrieb des Lada-Clients muss dieser innerhalb einer Webserver-Umgebung
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
8 installiert werden. Die folgenden Hinweise geben eine Kurze Anleitung zur
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
9 Installation eines Apache-Webserver.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
10
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
11 Hinweis: Für den Betrieb einer vollständigen Installation ist neben dem
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
12 Klienten auch die Installation eines Servers und entsprechender Datenbank
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
13 notwendig. Für die Installation des Servers folgen Sie bitte den Hinweisen in
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
14 der README Datei des Server-Pakets. Siehe Projektwebseite. Optional: Die
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
15 Authentifizierung kann gegen einen LDAP-Server durchgeführt werden. Beispiele
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
16 finde sich in dem Installationbeispiel.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
17
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
18 Die folgenden Hinweise beziehen sich auf die Installation und Einrichtung auf
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
19 Basis eines Oracle-RedHat Linux Systems.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
20
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
21 ### Compilieren und Minifizieren der Anwendung
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
22
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
23 Zum Compilieren der Anwendung kommt das Tool Sencha Cmd 4.0.x zum Einsatz.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
24 Mit Hilfe dieses Tools kann der Quellcode in eine einzelne Datei zusammengefasst
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
25 und minifiziert werden. Dies beschleunigt das Laden der Anwendung im Browser erheblich
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
26
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
27 Sencha bietet Sencha Cmd zum [Download](https://www.sencha.com/products/extjs/cmd-download/)
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
28 an. Beachten Sie: Sencha Cmd ist keine freie Software.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
29
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
30 Die Fa. Sencha beschreibt die Installation von Sencha Cmd in der
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
31 [Dokumentation von ExtJs](http://docs.sencha.com/extjs/4.2.1/#!/guide/command)
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
32
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
33 Zur Installation werden Ruby und Java benötigt.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
34
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
35
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
36
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
37
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
38
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
39 Der Befehl hierzu lautet:
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
40
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
41 ```
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
42 sencha --sdk $PATHTOEXT compile \
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
43 --classpath=app,resources/datetime,resources/i18n page -str -cla lada.js \
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
44 -yui -i index.html -o build/index.html
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
45 ```
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
46
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
47 Das Verzeichnis `build` enthält dann eine Datei `index.html` und eine Datei
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
48 `lada.js`. Die Datei `lada.js` ist eine komprimierte Version der Anwendung und
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
49 enthält alle benötigten Klassen.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
50 Für die Produktivversion müssen die folgenden Dateien zusätzlich in das
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
51 Verzeichnis `build` kopiert werden:
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
52
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
53 | Quelldatei | Zieldatei |
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
54 |--------------------------------------------------------|-------------------------------------------------------------|
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
55 | extjs/resources/css/ext-all-gray.css | build/extjs/resources/css/ext-all-gray.css |
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
56 | extjs/resources/ext-theme-gray/ext-theme-gray-all.css | build/extjs/resources/ext-theme-gray/ext-theme-gray-all.css |
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
57 | resources/Lada.properties | build/resources/Lada.properties |
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
58 | resources/Lada_de-DE.properties | build/resources/Lada_de-DE.properties |
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
59 | gfx/* | build/gfx/ |
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
60
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
61
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
62 ### Installation Apache
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
63 Zunächst wird der Apache Webserver aus dem Repository installiert:
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
64
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
65 ```
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
66 yum install httpd mod_ssl
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
67 service httpd start
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
68 ```
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
69
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
70 ### Aktivierung der Apache Module
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
71
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
72 Die Konfiguration, welche Module beim Start des Apache geladen werden, erfolgt
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
73 in der Datei `/etc/httpd/conf`. Die zu ladende Module sind in dieser Datei mit
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
74 der Option `LoadModule` angegeben. Folgende Module werden benötigt:
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
75
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
76 * ldap_module: Authentifizierung gegen den LDAP
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
77 * headers_module: Setzten der Header nach der Authentifizierung
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
78 * proxy_module: Reverse Proxy des Apache zum Jboss-Server
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
79
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
80 ### Einrichtung der Anwendung
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
81
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
82 Zunächst hinterlegen wir die Anwendung in dem Server. Hierzu verwenden wir die
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
83 gebaute Version, welche sich im `build` Ordner befindet.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
84
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
85 ```
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
86 cd /var/www/html
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
87 mkdir lada
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
88 cp -r build/* lada
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
89 ```
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
90
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
91 *Wichtig um SELinux dazu zu überreden das neue Verzeichnis auch zu servieren:*
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
92
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
93 ```
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
94 restorecon -Rv /var/www/html/
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
95 ```
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
96
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
97 Die Anwendung sollte nun bereits unter der Adresse `http://localhost/lada`
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
98 erreichbar sein.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
99
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
100 ### Konfiguration Proxy Server
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
101
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
102 Damit der Client eine Verbindung zu dem Server aufbauen kann, um von dort
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
103 Daten laden zu können, ist es notwendig den Server weiter zu konfigurieren.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
104
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
105 ```
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
106 togglesebool httpd_can_network_connect
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
107 service httpd restart
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
108 ```
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
109
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
110 Dies erlaubt dem Apache grundsätzlich sich mit einem anderen Dienst zu verbinden.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
111 Nun muss noch ein Reverse-Proxy eingerichtet werden. Dieser ist nur für
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
112 bestimmte Adressen aktiv.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
113
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
114 Folgende Datei sollte unter `/etc/httpd/conf.d/lada.conf` angelegt werden:
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
115 ```
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
116 <VirtualHost *:80>
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
117 ServerAdmin webmaster@localhost
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
118 #ServerName dummy-host.example.com
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
119 ErrorLog logs/lada-error_log
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
120 CustomLog logs/lada-access_log common
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
121
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
122 # Set multiple Proxys
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
123 ProxyPass /lada/server http://localhost:8080/lada
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
124 ProxyPassReverse /lada/server http://localhost:8080/lada
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
125 </VirtualHost>
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
126 ```
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
127 Alle Anfragen an die Adresse `/lada/service`, werden nun an den Server weitergeleitet.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
128
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
129 ### Authentifizierung
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
130
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
131 Die Authentifizierung geschieht gegen einen OpenID-Server.
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
132
c63ecb95dffb move INSTALL to a markdown File
Dustin Demuth <dustin@intevation.de>
parents:
diff changeset
133 Der Lada-Client leitet in Zusammenarbeit mit dem Server automatisch an diesen weiter.

http://lada.wald.intevation.org