Wiki-Quellcode von 05 Installation ONYX Player und Reporter
Zuletzt geändert von Carina Enke am 13.02.2024
Verstecke letzte Bearbeiter
author | version | line-number | content |
---|---|---|---|
![]() |
120.1 | 1 | {{layout}} |
![]() |
310.1 | 2 | {{layout-section ac:type="two_right_sidebar"}} |
![]() |
120.1 | 3 | {{layout-cell}} |
![]() |
359.2 | 4 | == Requirements == |
![]() |
120.1 | 5 | |
![]() |
359.2 | 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}} | ||
![]() |
120.1 | 10 | |
![]() |
359.2 | 11 | {{layout-cell}} |
12 | {{panel borderColor="#ddd" bgColor="#f0f0f0" borderStyle="solid" title="Inhalt"}} | ||
![]() |
365.1 | 13 | {{toc depth="3" start="2"/}} |
![]() |
120.1 | 14 | |
![]() |
365.1 | 15 | |
![]() |
359.2 | 16 | {{/panel}} |
![]() |
310.1 | 17 | {{/layout-cell}} |
![]() |
120.1 | 18 | {{/layout-section}} |
19 | |||
20 | {{layout-section ac:type="single"}} | ||
21 | {{layout-cell}} | ||
22 | == Download == | ||
23 | |||
![]() |
359.2 | 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"]]) |
![]() |
120.1 | 25 | |
![]() |
359.2 | 26 | {{code language="powershell"}} |
27 | tar xfz jdk-xyz-linux-x64.tar.gz -C /opt | ||
![]() |
120.1 | 28 | {{/code}} |
29 | |||
30 | * Let the environment variable $JAVA_HOME point to the JDK directory: | ||
31 | |||
![]() |
359.2 | 32 | {{code language="powershell"}} |
33 | export JAVA_HOME=/opt/jdkX.Y.Z | ||
![]() |
120.1 | 34 | {{/code}} |
35 | |||
![]() |
365.1 | 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"]] |
![]() |
120.1 | 37 | |
![]() |
359.2 | 38 | {{code language="powershell"}} |
39 | tar xfz apache-tomcat-X.Y.Z.tar.gz -C /opt | ||
![]() |
120.1 | 40 | {{/code}} |
41 | |||
![]() |
359.2 | 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 | |||
![]() |
120.1 | 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 | |||
![]() |
359.2 | 54 | {{code language="powershell"}} |
![]() |
120.1 | 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 | |||
![]() |
359.2 | 65 | === Show example tests on your ONYX Player start page === |
![]() |
120.1 | 66 | |
67 | * Save the zip-files in /src/main/resources/tests | ||
68 | * Set showinternaltests to true (onyxplugin.config.xml) | ||
69 | |||
![]() |
359.2 | 70 | === Provide an upload functionality for tests on your ONYX Player start page === |
![]() |
120.1 | 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 | |||
![]() |
346.1 | 76 | === Install MAXIMA, if you like to use calculations === |
![]() |
120.1 | 77 | |
![]() |
346.1 | 78 | * Installation on RHEL/Fedora/CentOS: |
![]() |
120.1 | 79 | |
![]() |
359.2 | 80 | {{code language="powershell"}} |
![]() |
346.1 | 81 | sudo yum install maxima |
82 | {{/code}} | ||
![]() |
120.1 | 83 | |
![]() |
346.1 | 84 | * Installation on Debian/Ubuntu/Mint: |
![]() |
120.1 | 85 | |
![]() |
359.2 | 86 | {{code language="powershell"}} |
![]() |
346.1 | 87 | sudo yum install maxima |
88 | {{/code}} | ||
![]() |
120.1 | 89 | |
![]() |
346.1 | 90 | * Or visit [[http:~~/~~/maxima.sourceforge.net/>>url:http://maxima.sourceforge.net/||shape="rect"]] and download the MAXIMA files |
![]() |
120.1 | 91 | |
![]() |
346.1 | 92 | === Save user results === |
![]() |
120.1 | 93 | |
![]() |
359.2 | 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 | ))) | ||
![]() |
120.1 | 97 | |
![]() |
352.1 | 98 | {{code language="powershell"}} |
![]() |
346.1 | 99 | <resultsdir>/tmp/onyxresults/</resultsdir> in the section <playerconfig>...</playerconfig> |
100 | {{/code}} | ||
![]() |
120.1 | 101 | |
![]() |
359.2 | 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. |
![]() |
346.1 | 103 | |
![]() |
359.2 | 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}} | ||
![]() |
120.1 | 113 | {{/layout-cell}} |
114 | {{/layout-section}} | ||
115 | {{/layout}} |