Wiki-Quellcode von 05 Installation ONYX Player und Reporter
Zuletzt geändert von Carina Enke am 13.02.2024
Zeige letzte Bearbeiter
author | version | line-number | content |
---|---|---|---|
1 | {{layout}} | ||
2 | {{layout-section ac:type="two_right_sidebar"}} | ||
3 | {{layout-cell}} | ||
4 | == Requirements == | ||
5 | |||
6 | * Java 17 (Oracle or OpenJDK) and Apache Tomcat 9 | ||
7 | * Apache Webserver with proxy_ajp and mod_rewrite (optional) | ||
8 | * MAXIMA for the use of calculations (mandatory) | ||
9 | {{/layout-cell}} | ||
10 | |||
11 | {{layout-cell}} | ||
12 | {{panel borderColor="#ddd" bgColor="#f0f0f0" borderStyle="solid" title="Inhalt"}} | ||
13 | {{toc depth="3" start="2"/}} | ||
14 | |||
15 | |||
16 | {{/panel}} | ||
17 | {{/layout-cell}} | ||
18 | {{/layout-section}} | ||
19 | |||
20 | {{layout-section ac:type="single"}} | ||
21 | {{layout-cell}} | ||
22 | == Download == | ||
23 | |||
24 | * Download and install OpenJDK 17 ([[https:~~/~~/jdk.java.net/java-se-ri/17>>url:https://jdk.java.net/java-se-ri/17||shape="rect"]] ) or Oracle JDK17 ([[https:~~/~~/jdk.java.net/17>>url:https://jdk.java.net/17||shape="rect"]]) | ||
25 | |||
26 | {{code language="powershell"}} | ||
27 | tar xfz jdk-xyz-linux-x64.tar.gz -C /opt | ||
28 | {{/code}} | ||
29 | |||
30 | * Let the environment variable $JAVA_HOME point to the JDK directory: | ||
31 | |||
32 | {{code language="powershell"}} | ||
33 | export JAVA_HOME=/opt/jdkX.Y.Z | ||
34 | {{/code}} | ||
35 | |||
36 | * Download and install Tomcat 9: [[https:~~/~~/tomcat.apache.org/download-90.cgi>>url:https://tomcat.apache.org/download-90.cgi||rel="nofollow" shape="rect" title="Verknüpfung folgen"]] | ||
37 | |||
38 | {{code language="powershell"}} | ||
39 | tar xfz apache-tomcat-X.Y.Z.tar.gz -C /opt | ||
40 | {{/code}} | ||
41 | |||
42 | === Download and install libraries === | ||
43 | |||
44 | {{code language="powershell"}} | ||
45 | yum install atk nss at-spi2-atk libXcomposite alsa-lib libXrandr libxkbcommon libXdamage cups-libs | ||
46 | {{/code}} | ||
47 | |||
48 | == Deployment == | ||
49 | |||
50 | * Stop your Tomcat | ||
51 | * In case of an **update**, delete old ONYX war-files and dirs from ${TOMCAT_HOME}/webapps | ||
52 | * It might be useful to clear the work and temp directory of the Tomcat Server: | ||
53 | |||
54 | {{code language="powershell"}} | ||
55 | rm -rf ${TOMCAT_HOME}/temp/* ${TOMCAT_HOME}/work/* | ||
56 | {{/code}} | ||
57 | |||
58 | (% class="_mce_tagged_br" %) | ||
59 | * Copy the onyx-player-**X.X**.war to ${TOMCAT_HOME}/webapps | ||
60 | * Start your Tomcat | ||
61 | * Open the following URL in your browser: [[http:~~/~~/localhost:8080/onyx-player-X.X/demo>>url:http://localhost:8080/onyx-player-X.X/demo||shape="rect"]] | ||
62 | |||
63 | == Configuration of additional features == | ||
64 | |||
65 | === Show example tests on your ONYX Player start page === | ||
66 | |||
67 | * Save the zip-files in /src/main/resources/tests | ||
68 | * Set showinternaltests to true (onyxplugin.config.xml) | ||
69 | |||
70 | === Provide an upload functionality for tests on your ONYX Player start page === | ||
71 | |||
72 | * Define a folder in onyxplugin.config.xml where uploaded tests should be stored: <uploaddir>/tmp/</uploaddir> | ||
73 | * Note that this folder must exist and be writable or it must be allowed to create it. | ||
74 | * You can upload tests on your ONYX Player start page and access the tests directly via a static URL. | ||
75 | |||
76 | === Install MAXIMA, if you like to use calculations === | ||
77 | |||
78 | * Installation on RHEL/Fedora/CentOS: | ||
79 | |||
80 | {{code language="powershell"}} | ||
81 | sudo yum install maxima | ||
82 | {{/code}} | ||
83 | |||
84 | * Installation on Debian/Ubuntu/Mint: | ||
85 | |||
86 | {{code language="powershell"}} | ||
87 | sudo yum install maxima | ||
88 | {{/code}} | ||
89 | |||
90 | * Or visit [[http:~~/~~/maxima.sourceforge.net/>>url:http://maxima.sourceforge.net/||shape="rect"]] and download the MAXIMA files | ||
91 | |||
92 | === Save user results === | ||
93 | |||
94 | * ONYX allows **saving user results on the hard disk** **additionally to the transmission to the LMS**. This may be useful in case results cannot be transmitted due to errors in the LMS or during the transmission process. To activate this function enter the tag ((( | ||
95 | of the file onyxplugin.config.xml and adjust the indicated directory to your server. Tomcat needs a writing permission for this directory. The result files are sorted in a sub folder by date and will not be deleted. In case the result files are no longer required, deletion can be done only by administrators. | ||
96 | ))) | ||
97 | |||
98 | {{code language="powershell"}} | ||
99 | <resultsdir>/tmp/onyxresults/</resultsdir> in the section <playerconfig>...</playerconfig> | ||
100 | {{/code}} | ||
101 | |||
102 | * You may configure ONYX Player to **automatically remove these result file copies after a certain time span**. The following option can be added to the configuration to activate this. Please configure a valid days number, after which all results older than this age will be removed. This is checked and executed once after ONYX startup and will run in a background task. If not configured, this is done after 30 days. | ||
103 | |||
104 | {{code title="onyxplugin.config.xml"}} | ||
105 | <playerconfig> | ||
106 | ... | ||
107 | <!-- The timespan in days after which the result configured in resultsdir are automatically removed --> | ||
108 | <resultsdirCleanupAfterDays>30</resultsdirCleanupAfterDays> | ||
109 | ... | ||
110 | </playerconfig> | ||
111 | {code} | ||
112 | {{/code}} | ||
113 | {{/layout-cell}} | ||
114 | {{/layout-section}} | ||
115 | {{/layout}} |