Wiki-Quellcode von Installation ONYX WebEditor
Version 419.1 von tleu am 15.12.2014
Zeige letzte Bearbeiter
author | version | line-number | content |
---|---|---|---|
1 | {{sv-translation language="de"}} | ||
2 | {{layout}} | ||
3 | {{layout-section ac:type="single"}} | ||
4 | {{layout-cell}} | ||
5 | ====== Inhalt: ====== | ||
6 | |||
7 | |||
8 | |||
9 | {{toc maxLevel="5" style="none" outline="true"/}} | ||
10 | {{/layout-cell}} | ||
11 | {{/layout-section}} | ||
12 | |||
13 | {{layout-section ac:type="single"}} | ||
14 | {{layout-cell}} | ||
15 | Documentation to install ONYX Editor as a productive instance on a Linux server. | ||
16 | |||
17 | == Requirements == | ||
18 | |||
19 | * Oracle Java 7 | ||
20 | * Apache Tomcat 7 | ||
21 | * PostgreSQL 9 | ||
22 | * MAXIMA for the use of calculations (optional) | ||
23 | |||
24 | == Download AND Install of Requirements == | ||
25 | |||
26 | === Download and install Oracle JDK 7 === | ||
27 | |||
28 | [[http:~~/~~/www.oracle.com/technetwork/java/javase/downloads/>>url:http://www.oracle.com/technetwork/java/javase/downloads/||rel="nofollow" shape="rect" class="external free"]] | ||
29 | |||
30 | {{code language="powershell"}} | ||
31 | tar xfz jdk-7uX-linux-x64.tar.gz -C /opt | ||
32 | {{/code}} | ||
33 | |||
34 | **Let the environment variable $JAVA_HOME point to the JDK directory:** | ||
35 | |||
36 | {{code language="powershell"}} | ||
37 | export JAVA_HOME=/opt/jdk1.7.X | ||
38 | {{/code}} | ||
39 | |||
40 | === Download and install Tomcat 7 === | ||
41 | |||
42 | [[http:~~/~~/tomcat.apache.org/download-70.cgi>>url:http://tomcat.apache.org/download-70.cgi||rel="nofollow" shape="rect" class="external free"]] | ||
43 | |||
44 | {{code language="powershell"}} | ||
45 | tar xfz apache-tomcat-7.X.X.tar.gz -C /opt | ||
46 | {{/code}} | ||
47 | |||
48 | === Download and install PostgreSQL 9 === | ||
49 | |||
50 | [[http:~~/~~/www.enterprisedb.com/products-services-training/pgdownload>>url:http://www.enterprisedb.com/products-services-training/pgdownload||rel="nofollow" shape="rect" class="external free"]] | ||
51 | |||
52 | {{code language="powershell"}} | ||
53 | chmod u+x postgresql-9.X-linux-x64.run | ||
54 | ./postgresql-9.X-linux-x64.run | ||
55 | {{/code}} | ||
56 | |||
57 | === Download and install MAXIMA (optional) === | ||
58 | |||
59 | Install MAXIMA, if you like to use calculations | ||
60 | |||
61 | * Installation on RHEL/Fedora/CentOS: | ||
62 | |||
63 | {{code language="powershell"}} | ||
64 | sudo yum install maxima | ||
65 | {{/code}} | ||
66 | |||
67 | * Installation on Debian/Ubuntu/Mint: | ||
68 | |||
69 | {{code language="powershell"}} | ||
70 | sudo aptitude install maxima | ||
71 | {{/code}} | ||
72 | |||
73 | * Or visit [[http:~~/~~/maxima.sourceforge.net/>>url:http://maxima.sourceforge.net/||shape="rect"]] and download the MAXIMA files | ||
74 | |||
75 | == Deployment == | ||
76 | |||
77 | === New installation === | ||
78 | |||
79 | Extract the webeditor-X.X.war to ${TOMCAT_HOME}/webapps/webeditor | ||
80 | |||
81 | {{code language="powershell"}} | ||
82 | unzip webeditor-X.X.war -d /opt/apache-tomcat-7.X.XX/webapps/webeditor | ||
83 | {{/code}} | ||
84 | |||
85 | Create database user and database | ||
86 | |||
87 | {{code language="powershell"}} | ||
88 | su postgres | ||
89 | /opt/PostgreSQL/9.X/bin/createuser -P onyxeditor | ||
90 | /opt/PostgreSQL/9.X/bin/createdb -O onyxeditor onyxeditor | ||
91 | {{/code}} | ||
92 | |||
93 | Initialize database | ||
94 | |||
95 | {{code language="sql"}} | ||
96 | /opt/PostgreSQL/9.X/bin/psql -h localhost -U onyxeditor onyxeditor < /opt/apache-tomcat-7.X.XX/webapps/webeditor/WEB-INF/classes/database/setupdatabase.sql | ||
97 | {{/code}} | ||
98 | |||
99 | === Configuration === | ||
100 | |||
101 | The configuration files can be found inside the webeditor folder in your tomcat installation ( see " /opt/apache-tomcat-7.X.XX/webapps/webeditor/ " ). | ||
102 | |||
103 | **WEB-INF/classes/de/bps/onyx/context/moduleConfigurationContext.xml** | ||
104 | |||
105 | This file is the config for ONYX Editor repository configurations. | ||
106 | |||
107 | {{code language="xml"}} | ||
108 | ... | ||
109 | <bean id="de.bps.onyx.manager.RepositoryConfigurationManager" class="de.bps.onyx.manager.RepositoryConfigurationManager"> | ||
110 | <property name="modules"> | ||
111 | <map> | ||
112 | <entry key="FileSystemModule" value-ref="de.bps.onyx.manager.modules.FileSystemModule" /> | ||
113 | <entry key="OLATRepoModule" value-ref="de.bps.onyx.manager.modules.OPALRepoModule" /> | ||
114 | <entry key="PREOLATCERepoConfiguration" value-ref="de.bps.onyx.manager.modules.PREOLATCERepoConfiguration" /> | ||
115 | </map> | ||
116 | </property> | ||
117 | <property name="defaultModule" ref="de.bps.onyx.manager.modules.OPALRepoModule" /> | ||
118 | </bean> | ||
119 | ... | ||
120 | {{/code}} | ||
121 | |||
122 | * defines the repositories available: | ||
123 | ** key defines the internal repository ID. It may be named as you want. | ||
124 | ** value-ref references the bean which defines the repository configuration: | ||
125 | |||
126 | {{code language="xml"}} | ||
127 | ... | ||
128 | <bean id="de.bps.onyx.manager.modules.FileSystemModule" class="de.bps.onyx.manager.modules.FileSystemModule"> | ||
129 | <constructor-arg index="0" ref="FileSystemConfiguration" /> | ||
130 | </bean> | ||
131 | ... | ||
132 | {{/code}} | ||
133 | |||
134 | * instantiates the repository configuration depending on repository type: | ||
135 | ** de.bps.onyx.manager.modules.FileSystemModule: value-ref from above | ||
136 | ** class="...": One of: | ||
137 | *** de.bps.onyx.manager.modules.FileSystemModule (local file system repository) | ||
138 | *** de.bps.onyx.manager.modules.OPALRepoModule (uses an OLAT LMS as repository) | ||
139 | ** constructor-arg: ref references the configuration bean as follows: | ||
140 | |||
141 | ===== File system repository: ===== | ||
142 | |||
143 | {{code language="xml"}} | ||
144 | ... | ||
145 | <bean id="FileSystemConfiguration" class="de.bps.onyx.model.repo.RepositoryModuleConfiguration"> | ||
146 | <property name="name" value="FileSystemModule" /> | ||
147 | <property name="typeKey" value="FileSystemModule" /> | ||
148 | <property name="description" value="File system module" /> | ||
149 | <property name="canHandleGuest" value="true" /> | ||
150 | <property name="serviceTarget" value="/opt/owe/fsr" /> | ||
151 | <property name="displayname" value="Repository PRE/OLATCE" /> | ||
152 | </bean> | ||
153 | ... | ||
154 | {{/code}} | ||
155 | |||
156 | * name: Name which is used internal in ONYX WebEditor as identifier (**must** match key in line <entry key="FileSystemModule" value-ref="de.bps.onyx.manager.modules.FileSystemModule" /> above) | ||
157 | * typeKey: Repository type definition | ||
158 | * description: Some description (not used at the moment) | ||
159 | * canHandleGuest: set to true if this repository can handle guest users (without logon) | ||
160 | * serviceTarget: File system path | ||
161 | * displayname: String to show as repository name in ONYX Editor (if not given, some internal translation will be done to show a generic and type dependent name) | ||
162 | |||
163 | ===== OLAT repository: ===== | ||
164 | |||
165 | {{code language="powershell"}} | ||
166 | ... | ||
167 | <bean id="OPALRepoConfiguration" class="de.bps.onyx.model.repo.RepositoryModuleConfiguration"> | ||
168 | ... | ||
169 | <property name="serviceTarget" value="https://next.bps-system.de/opal/services/" /> | ||
170 | ... | ||
171 | </bean> | ||
172 | ... | ||
173 | {{/code}} | ||
174 | |||
175 | * serviceTarget: OLAT URL | ||
176 | * Other properties as stated above for File system repository | ||
177 | |||
178 | **WEB-INF/classes/de/bps/onyx/context/applicationContext.xml** | ||
179 | |||
180 | This file contains the configuration for: the connection to ONYX Player. The ONYX Player is used for preview. | ||
181 | |||
182 | {{code language="xml"}} | ||
183 | ... | ||
184 | <property name="system" value="preonyxeditor" /> | ||
185 | <property name="previewAddress" value="http://pre.bps-system.de/onyx"/> | ||
186 | ... | ||
187 | {{/code}} | ||
188 | |||
189 | In this example is the ONYX Player used at URL [[http:~~/~~/pre.bps-system.de/onyx>>url:http://pre.bps-system.de/onyx||rel="nofollow" shape="rect" class="external free"]] . The serviceprovider name (used by ONYX Player) is: preonyxeditor | ||
190 | |||
191 | The connection to database example: | ||
192 | |||
193 | {{code language="xml"}} | ||
194 | <property name="dbDriverClass" value="org.postgresql.Driver" /> | ||
195 | <property name="dbConnectionUrl" value="jdbc:postgresql://localhost:5432/dbname" /> | ||
196 | <property name="dbUserName" value="username" /> | ||
197 | <property name="dbPassword" value="userpassword" /> | ||
198 | <property name="dbDialect" value="org.hibernate.dialect.PostgreSQLDialect" /> | ||
199 | {{/code}} | ||
200 | |||
201 | **WEB-INF/classes/de/bps/onyx/context/webServiceContext.xml** | ||
202 | |||
203 | This file contains the configuration for the connection of the ONYX Player. This ONYX Player is used for statistic issues. | ||
204 | |||
205 | Example: | ||
206 | |||
207 | {{code language="xml"}} | ||
208 | ... | ||
209 | <bean id="OnyxReporterTarget" class="de.bps.onyx.manager.reporter.service.OnyxReporterTarget"> | ||
210 | <constructor-arg name="target" value="https://onyx.bps-system.de/preview/reporterservices" /> | ||
211 | </bean> | ||
212 | |||
213 | <bean id="OnyxReporterProvider" class="de.bps.onyx.manager.reporter.service.OnyxReporterProvider"> | ||
214 | <constructor-arg name="id" value="previewid" /> | ||
215 | </bean> | ||
216 | ... | ||
217 | {{/code}} | ||
218 | |||
219 | In this example is the ONYX Player used at URL [[https:~~/~~/onyx.bps-system.de/preview/ .>>url:https://onyx.bps-system.de/preview/. ||rel="nofollow" shape="rect" class="external text"]] The serviceprovider name (used by ONYX Player) is: previewed | ||
220 | |||
221 | === Update installation === | ||
222 | |||
223 | **Start your Tomcat** | ||
224 | |||
225 | {{code language="powershell"}} | ||
226 | /opt/apache-tomcat-7.X.XX/bin/startup.sh | ||
227 | {{/code}} | ||
228 | |||
229 | |||
230 | |||
231 | **Open the following URL in your browser:** | ||
232 | |||
233 | [[http:~~/~~/localhost:8080/webeditor>>url:http://localhost:8080/webeditor||rel="nofollow" shape="rect" class="external free"]] | ||
234 | |||
235 | == create super user account == | ||
236 | |||
237 | 1. register a new user on homescreen. | ||
238 | 1. connect to database and select the new user: 'select * from users;' | ||
239 | 1. UPDATE users SET role=0 WHERE ID = XXX; | ||
240 | {{/layout-cell}} | ||
241 | {{/layout-section}} | ||
242 | {{/layout}} | ||
243 | {{/sv-translation}} | ||
244 | |||
245 | {{sv-translation language="en"}} | ||
246 | Documentation to install ONYX Editor as a productive instance on a Linux server. | ||
247 | |||
248 | == Requirements == | ||
249 | |||
250 | * Oracle Java 7 | ||
251 | * Apache Tomcat 7 | ||
252 | * PostgreSQL 9 | ||
253 | * MAXIMA for the use of calculations (optional) | ||
254 | |||
255 | == Download AND Install of Requirements == | ||
256 | |||
257 | === Download and install Oracle JDK 7 === | ||
258 | |||
259 | [[http:~~/~~/www.oracle.com/technetwork/java/javase/downloads/>>url:http://www.oracle.com/technetwork/java/javase/downloads/||rel="nofollow" shape="rect" class="external free"]] | ||
260 | |||
261 | {{code language="powershell"}} | ||
262 | tar xfz jdk-7uX-linux-x64.tar.gz -C /opt | ||
263 | {{/code}} | ||
264 | |||
265 | **Let the environment variable $JAVA_HOME point to the JDK directory:** | ||
266 | |||
267 | {{code language="powershell"}} | ||
268 | export JAVA_HOME=/opt/jdk1.7.X | ||
269 | {{/code}} | ||
270 | |||
271 | === Download and install Tomcat 7 === | ||
272 | |||
273 | [[http:~~/~~/tomcat.apache.org/download-70.cgi>>url:http://tomcat.apache.org/download-70.cgi||rel="nofollow" shape="rect" class="external free"]] | ||
274 | |||
275 | {{code language="powershell"}} | ||
276 | tar xfz apache-tomcat-7.X.X.tar.gz -C /opt | ||
277 | {{/code}} | ||
278 | |||
279 | === Download and install PostgreSQL 9 === | ||
280 | |||
281 | [[http:~~/~~/www.enterprisedb.com/products-services-training/pgdownload>>url:http://www.enterprisedb.com/products-services-training/pgdownload||rel="nofollow" shape="rect" class="external free"]] | ||
282 | |||
283 | {{code language="powershell"}} | ||
284 | chmod u+x postgresql-9.X-linux-x64.run | ||
285 | ./postgresql-9.X-linux-x64.run | ||
286 | {{/code}} | ||
287 | |||
288 | === Download and install MAXIMA (optional) === | ||
289 | |||
290 | Install MAXIMA, if you like to use calculations | ||
291 | |||
292 | * Installation on RHEL/Fedora/CentOS: | ||
293 | |||
294 | {{code language="powershell"}} | ||
295 | sudo yum install maxima | ||
296 | {{/code}} | ||
297 | |||
298 | * Installation on Debian/Ubuntu/Mint: | ||
299 | |||
300 | {{code language="powershell"}} | ||
301 | sudo aptitude install maxima | ||
302 | {{/code}} | ||
303 | |||
304 | * Or visit [[http:~~/~~/maxima.sourceforge.net/>>url:http://maxima.sourceforge.net/||shape="rect"]] and download the MAXIMA files | ||
305 | |||
306 | == Deployment == | ||
307 | |||
308 | === New installation === | ||
309 | |||
310 | Extract the webeditor-X.X.war to ${TOMCAT_HOME}/webapps/webeditor | ||
311 | |||
312 | {{code language="powershell"}} | ||
313 | unzip webeditor-X.X.war -d /opt/apache-tomcat-7.X.XX/webapps/webeditor | ||
314 | {{/code}} | ||
315 | |||
316 | Create database user and database | ||
317 | |||
318 | {{code language="powershell"}} | ||
319 | su postgres | ||
320 | /opt/PostgreSQL/9.X/bin/createuser -P onyxeditor | ||
321 | /opt/PostgreSQL/9.X/bin/createdb -O onyxeditor onyxeditor | ||
322 | {{/code}} | ||
323 | |||
324 | Initialize database | ||
325 | |||
326 | {{code language="sql"}} | ||
327 | /opt/PostgreSQL/9.X/bin/psql -h localhost -U onyxeditor onyxeditor < /opt/apache-tomcat-7.X.XX/webapps/webeditor/WEB-INF/classes/database/setupdatabase.sql | ||
328 | {{/code}} | ||
329 | |||
330 | === Configuration === | ||
331 | |||
332 | The configuration files can be found inside the webeditor folder in your tomcat installation ( see " /opt/apache-tomcat-7.X.XX/webapps/webeditor/ " ). | ||
333 | |||
334 | **WEB-INF/classes/de/bps/onyx/context/moduleConfigurationContext.xml** | ||
335 | |||
336 | This file is the config for ONYX Editor repository configurations. | ||
337 | |||
338 | {{code language="xml"}} | ||
339 | ... | ||
340 | <bean id="de.bps.onyx.manager.RepositoryConfigurationManager" class="de.bps.onyx.manager.RepositoryConfigurationManager"> | ||
341 | <property name="modules"> | ||
342 | <map> | ||
343 | <entry key="FileSystemModule" value-ref="de.bps.onyx.manager.modules.FileSystemModule" /> | ||
344 | <entry key="OLATRepoModule" value-ref="de.bps.onyx.manager.modules.OPALRepoModule" /> | ||
345 | <entry key="PREOLATCERepoConfiguration" value-ref="de.bps.onyx.manager.modules.PREOLATCERepoConfiguration" /> | ||
346 | </map> | ||
347 | </property> | ||
348 | <property name="defaultModule" ref="de.bps.onyx.manager.modules.OPALRepoModule" /> | ||
349 | </bean> | ||
350 | ... | ||
351 | {{/code}} | ||
352 | |||
353 | * defines the repositories available: | ||
354 | ** key defines the internal repository ID. It may be named as you want. | ||
355 | ** value-ref references the bean which defines the repository configuration: | ||
356 | |||
357 | {{code language="xml"}} | ||
358 | ... | ||
359 | <bean id="de.bps.onyx.manager.modules.FileSystemModule" class="de.bps.onyx.manager.modules.FileSystemModule"> | ||
360 | <constructor-arg index="0" ref="FileSystemConfiguration" /> | ||
361 | </bean> | ||
362 | ... | ||
363 | {{/code}} | ||
364 | |||
365 | * instantiates the repository configuration depending on repository type: | ||
366 | ** de.bps.onyx.manager.modules.FileSystemModule: value-ref from above | ||
367 | ** class="...": One of: | ||
368 | *** de.bps.onyx.manager.modules.FileSystemModule (local file system repository) | ||
369 | *** de.bps.onyx.manager.modules.OPALRepoModule (uses an OLAT LMS as repository) | ||
370 | ** constructor-arg: ref references the configuration bean as follows: | ||
371 | |||
372 | ===== File system repository: ===== | ||
373 | |||
374 | {{code language="xml"}} | ||
375 | ... | ||
376 | <bean id="FileSystemConfiguration" class="de.bps.onyx.model.repo.RepositoryModuleConfiguration"> | ||
377 | <property name="name" value="FileSystemModule" /> | ||
378 | <property name="typeKey" value="FileSystemModule" /> | ||
379 | <property name="description" value="File system module" /> | ||
380 | <property name="canHandleGuest" value="true" /> | ||
381 | <property name="serviceTarget" value="/opt/owe/fsr" /> | ||
382 | <property name="displayname" value="Repository PRE/OLATCE" /> | ||
383 | </bean> | ||
384 | ... | ||
385 | {{/code}} | ||
386 | |||
387 | * name: Name which is used internal in ONYX WebEditor as identifier (**must** match key in line <entry key="FileSystemModule" value-ref="de.bps.onyx.manager.modules.FileSystemModule" /> above) | ||
388 | * typeKey: Repository type definition | ||
389 | * description: Some description (not used at the moment) | ||
390 | * canHandleGuest: set to true if this repository can handle guest users (without logon) | ||
391 | * serviceTarget: File system path | ||
392 | * displayname: String to show as repository name in ONYX Editor (if not given, some internal translation will be done to show a generic and type dependent name) | ||
393 | |||
394 | ===== OLAT repository: ===== | ||
395 | |||
396 | {{code language="powershell"}} | ||
397 | ... | ||
398 | <bean id="OPALRepoConfiguration" class="de.bps.onyx.model.repo.RepositoryModuleConfiguration"> | ||
399 | ... | ||
400 | <property name="serviceTarget" value="https://next.bps-system.de/opal/services/" /> | ||
401 | ... | ||
402 | </bean> | ||
403 | ... | ||
404 | {{/code}} | ||
405 | |||
406 | * serviceTarget: OLAT URL | ||
407 | * Other properties as stated above for File system repository | ||
408 | |||
409 | **WEB-INF/classes/de/bps/onyx/context/applicationContext.xml** | ||
410 | |||
411 | This file contains the configuration for: the connection to ONYX Player. The ONYX Player is used for preview. | ||
412 | |||
413 | {{code language="xml"}} | ||
414 | ... | ||
415 | <property name="system" value="preonyxeditor" /> | ||
416 | <property name="previewAddress" value="http://pre.bps-system.de/onyx"/> | ||
417 | ... | ||
418 | {{/code}} | ||
419 | |||
420 | In this example is the ONYX Player used at URL [[http:~~/~~/pre.bps-system.de/onyx>>url:http://pre.bps-system.de/onyx||rel="nofollow" shape="rect" class="external free"]] . The serviceprovider name (used by ONYX Player) is: preonyxeditor | ||
421 | |||
422 | The connection to database example: | ||
423 | |||
424 | {{code language="xml"}} | ||
425 | <property name="dbDriverClass" value="org.postgresql.Driver" /> | ||
426 | <property name="dbConnectionUrl" value="jdbc:postgresql://localhost:5432/dbname" /> | ||
427 | <property name="dbUserName" value="username" /> | ||
428 | <property name="dbPassword" value="userpassword" /> | ||
429 | <property name="dbDialect" value="org.hibernate.dialect.PostgreSQLDialect" /> | ||
430 | {{/code}} | ||
431 | |||
432 | **WEB-INF/classes/de/bps/onyx/context/webServiceContext.xml** | ||
433 | |||
434 | This file contains the configuration for the connection of the ONYX Player. This ONYX Player is used for statistic issues. | ||
435 | |||
436 | Example: | ||
437 | |||
438 | {{code language="xml"}} | ||
439 | ... | ||
440 | <bean id="OnyxReporterTarget" class="de.bps.onyx.manager.reporter.service.OnyxReporterTarget"> | ||
441 | <constructor-arg name="target" value="https://onyx.bps-system.de/preview/reporterservices" /> | ||
442 | </bean> | ||
443 | |||
444 | <bean id="OnyxReporterProvider" class="de.bps.onyx.manager.reporter.service.OnyxReporterProvider"> | ||
445 | <constructor-arg name="id" value="previewid" /> | ||
446 | </bean> | ||
447 | ... | ||
448 | {{/code}} | ||
449 | |||
450 | In this example is the ONYX Player used at URL [[https:~~/~~/onyx.bps-system.de/preview/ .>>url:https://onyx.bps-system.de/preview/. ||rel="nofollow" shape="rect" class="external text"]] The serviceprovider name (used by ONYX Player) is: previewed | ||
451 | |||
452 | === Update installation === | ||
453 | |||
454 | **Start your Tomcat** | ||
455 | |||
456 | {{code language="powershell"}} | ||
457 | /opt/apache-tomcat-7.X.XX/bin/startup.sh | ||
458 | {{/code}} | ||
459 | |||
460 | |||
461 | |||
462 | **Open the following URL in your browser:** | ||
463 | |||
464 | [[http:~~/~~/localhost:8080/webeditor>>url:http://localhost:8080/webeditor||rel="nofollow" shape="rect" class="external free"]] | ||
465 | |||
466 | == create super user account == | ||
467 | |||
468 | 1. register a new user on homescreen. | ||
469 | 1. connect to database and select the new user: 'select * from users;' | ||
470 | 1. UPDATE users SET role=0 WHERE ID = XXX; | ||
471 | {{/sv-translation}} |