Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende ÜberarbeitungLetzte ÜberarbeitungBeide Seiten der Revision | ||
wetter:boltek:stormforce_xr_c7 [09.01.2017 16:58. ] – [Server Konfigurationsdatei bearbeiten] django | wetter:boltek:stormforce_xr_c7 [22.07.2019 14:46. ] – django | ||
---|---|---|---|
Zeile 459: | Zeile 459: | ||
</ | </ | ||
+ | ==== Server ==== | ||
Gemäß der **// | Gemäß der **// | ||
# yum install python-twisted-core python-twisted-web pyserial python-psycopg2 | # yum install python-twisted-core python-twisted-web pyserial python-psycopg2 | ||
+ | |||
+ | ==== Client ==== | ||
+ | Für den Stormforce-XR Client wir das Python Paket **pygame** benötigt. Leider gibt es weder im originalen CentOS Repository, noch im Repository **EPEL** ein passendes RPM. Abhilfe schafft hier das **Nux Dextop Repository**, | ||
+ | |||
+ | Zunächst importieren wir den PGP-Key mit dem die Pakete des **Nux Dextop Repositories** signiert wurden. | ||
+ | # rpm --import http:// | ||
+ | |||
+ | Anschliessend binden wir das **Nux Dextop Repo** auf unserem Server ein. | ||
+ | # yum -y install epel-release && rpm -Uvh http:// | ||
+ | |||
+ | Zu guter Letzt installieren wir das Python Paket **pygame**. | ||
+ | # yum install pygame -y | ||
+ | |||
===== PostgreSQL-Datenbank ===== | ===== PostgreSQL-Datenbank ===== | ||
Zeile 1664: | Zeile 1678: | ||
Der Port **7397** wird von dem Python Programm**stormforce-xr** gehalten. Der postgresql-Datenbanl-server selbst lauscht auf Port **5432** auf **localhost**. | Der Port **7397** wird von dem Python Programm**stormforce-xr** gehalten. Der postgresql-Datenbanl-server selbst lauscht auf Port **5432** auf **localhost**. | ||
+ | === systemd service files === | ||
+ | Da wir den Stormforce-XR Server später nicht manuell starten wollen, sondern über den Systemd-Daemon **systemd** benötgen wir noch eine passende Service-Datei. Diese legen wir uns nun im Verzeichnis // | ||
+ | # vim / | ||
+ | <file bash / | ||
+ | Description=Stormforce XR Server Daemo | ||
+ | After=postgresql.service | ||
- | http://li.nux.ro/download/nux/dextop/el7/x86_64//pygame-1.9.1-15.el7.nux.x86_64.rpm | + | [Service] |
+ | ExecStart=/ | ||
+ | # | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target</ | ||
+ | |||
+ | Damit der Stormforce-XR Daemon die Konfigurationsdatei lesen und die Backup-Datei anlegen kann, müssen wir das Ser ver-script unserer umgebung anpassen. Unser Stormforce-XR Installationsverzeichnis lautet // | ||
+ | # vim / | ||
+ | |||
+ | < | ||
+ | |||
+ | | ||
+ | |||
+ | ...</ | ||
+ | |||
+ | Nun können wir unseren Stormforce-Xr Daemon mit Hilfe von systemd starten. | ||
+ | # systemctl start stormforce-xr.service | ||
+ | |||
+ | Damit der Deamon beim Neustart des Servers gleich mitgestartet wird, enablen wir noch den Autostart von stormforce-xr. | ||
+ | # systemctl enable stormforce-xr.service | ||
+ | |||
+ | Created symlink from / | ||
+ | |||
+ | Den Serverstatus können wir wie gewohnt abfragen. | ||
+ | # systemctl status stormforce-xr.service | ||
+ | |||
+ | < | ||
+ | <font style=" | ||
+ | | ||
+ | | ||
+ | Main PID: 22791 (python) | ||
+ | | ||
+ | | ||
+ | |||
+ | Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: | ||
+ | Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: | ||
+ | Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: | ||
+ | Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: | ||
+ | Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: | ||
+ | Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: | ||
+ | Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: | ||
+ | Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: | ||
+ | Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: | ||
+ | Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: | ||
+ | </ | ||
+ | |||
+ | ==== Client ==== | ||
+ | === erster manueller Start === | ||
+ | Nachdem unser **stormforce-xr Server** installiert und konfiguriert ist und erfolgreich läuft, können wir nun das erste mal den Stormforce-XR-Client starten. Hierzu öffnen wir, nachdem wir uns an der laufenden X-Session angemeldet haben, ein Shell-Fenster, | ||
+ | $ cd / | ||
+ | $ python sxr_server.py | ||
+ | |||
+ | < | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | ######################################################################### | ||
+ | # Copyright/ | ||
+ | ######################################################################### | ||
+ | ######################################################################### | ||
+ | # Copyright (c) 2012-2014, Daniel Knaggs | ||
+ | # All rights reserved. | ||
+ | # # | ||
+ | # Redistribution and use in source and binary forms, with or without | ||
+ | # modification, | ||
+ | # are met: - # | ||
+ | # # | ||
+ | # * Redistributions of source code must retain the above copyright | ||
+ | # | ||
+ | # # | ||
+ | # * Redistributions in binary form must reproduce the above copyright # | ||
+ | # | ||
+ | # the documentation and/or other materials provided with the # | ||
+ | # | ||
+ | # # | ||
+ | # * Neither the name of the author nor the names of its contributors | ||
+ | # may be used to endorse or promote products derived from this # | ||
+ | # | ||
+ | # # | ||
+ | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
+ | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # | ||
+ | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # | ||
+ | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
+ | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # | ||
+ | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # | ||
+ | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # | ||
+ | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # | ||
+ | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # | ||
+ | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # | ||
+ | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
+ | ######################################################################### | ||
+ | </ | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | ######################################################################### | ||
+ | # Copyright/ | ||
+ | ######################################################################### | ||
+ | ######################################################################### | ||
+ | # Copyright (c) 2012-2014, Daniel Knaggs | ||
+ | # All rights reserved. | ||
+ | # # | ||
+ | # Redistribution and use in source and binary forms, with or without | ||
+ | # modification, | ||
+ | # are met: - # | ||
+ | # # | ||
+ | # * Redistributions of source code must retain the above copyright | ||
+ | # | ||
+ | # # | ||
+ | # * Redistributions in binary form must reproduce the above copyright # | ||
+ | # | ||
+ | # the documentation and/or other materials provided with the # | ||
+ | # | ||
+ | # # | ||
+ | # * Neither the name of the author nor the names of its contributors | ||
+ | # may be used to endorse or promote products derived from this # | ||
+ | # | ||
+ | # # | ||
+ | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
+ | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # | ||
+ | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # | ||
+ | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
+ | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # | ||
+ | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # | ||
+ | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # | ||
+ | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # | ||
+ | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # | ||
+ | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # | ||
+ | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
+ | ######################################################################### | ||
+ | |||
+ | <font style=" | ||
+ | |||
+ | ######################################################################### | ||
+ | # Copyright/ | ||
+ | ######################################################################### | ||
+ | ######################################################################### | ||
+ | # Copyright (c) 2008-2012, 2014, Daniel Knaggs - 2E0DPK/ | ||
+ | # All rights reserved. | ||
+ | # # | ||
+ | # Redistribution and use in source and binary forms, with or without | ||
+ | # modification, | ||
+ | # are met: - # | ||
+ | # # | ||
+ | # * Redistributions of source code must retain the above copyright | ||
+ | # | ||
+ | # # | ||
+ | # * Redistributions in binary form must reproduce the above copyright # | ||
+ | # | ||
+ | # the documentation and/or other materials provided with the # | ||
+ | # | ||
+ | # # | ||
+ | # * Neither the name of the author nor the names of its contributors | ||
+ | # may be used to endorse or promote products derived from this # | ||
+ | # | ||
+ | # # | ||
+ | # * This Software is not to be used for safety purposes. | ||
+ | # # | ||
+ | # * You agree and abide the Disclaimer for your Boltek products. | ||
+ | # # | ||
+ | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
+ | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # | ||
+ | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # | ||
+ | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
+ | # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # | ||
+ | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # | ||
+ | # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # | ||
+ | # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # | ||
+ | # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # | ||
+ | # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # | ||
+ | # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
+ | ######################################################################### | ||
+ | |||
+ | <font style=" | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | </ | ||
+ | |||
+ | === Client Konfigurationsdatei bearbeiten === | ||
+ | Das Programm hat uns freundlich daraufhin gewiesen, dass wir nun noch die **Client-XML**-Konfigurationsdatei // | ||
+ | |||
+ | # vim / | ||
+ | <file xml / | ||
+ | < | ||
+ | <Setting StormForceXRServer=" | ||
+ | <Setting DemoMode=" | ||
+ | <Setting StrikeShape=" | ||
+ | <Setting ShowCrosshair=" | ||
+ | <Setting ShowRangeCircles=" | ||
+ | <Setting UpdatePeriodCapture=" | ||
+ | <Setting UpdatePeriodCurrentTime=" | ||
+ | <Setting UpdatePeriodEFM100=" | ||
+ | <Setting UpdatePeriodGraphs=" | ||
+ | <Setting UpdatePeriodLD250=" | ||
+ | <Setting UpdatePeriodStrikes=" | ||
+ | <Setting DebugMode=" | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Starten wir nun erneut unseren Client wird uns der erste Startbildschirm des StormForce XR Clients präsentiert. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | |||
+ | Mit der Taste " | ||
+ | |||
+ | |||
+ | === Startscript für Programmstart === | ||
+ | Für den Programmstart des Client erstellen wir uns erst einmal ein rudimentäres Shellscript, | ||
+ | |||
+ | # vim / | ||
+ | <file bash / | ||
+ | # Django : 2012-05-03 | ||
+ | # Schellscript zum vereinfachten Starten des StormForce Clients | ||
+ | |||
+ | cd / | ||
+ | python sxr_client.py | ||
+ | </ | ||
+ | |||
+ | Zum Starten statten wir das Script nun noch mit den **x**-Dateirechten aus. | ||
+ | # chmod +x / | ||
+ | |||
+ | === Starter anlegen === | ||
+ | Zum Starten von Stormforce legen wir uns am Desktop einen entsprechenden Starter an. Das Icon => {{: | ||
+ | |||
+ | * **Typ** : Anwendung | ||
+ | * **Name** : StormForce XR | ||
+ | * **Befehl** : / | ||
+ | * **Kommentar** : Visualisierung des Boltek LD-250 mit StormForce XR | ||
+ | |||
+ | === Kartenhintergrund === | ||
+ | Einen passenden Kartenhintergrund können wir uns entweder über das [[http:// | ||
+ | mit Hilfe des [[http:// | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Die Karte hat eine Größe von 600 x 600 Pixel, mit dem Standort in der Bildmitte. Die Karte selbst hat dabei eine Ausdehnung (Radius um den Standort) von 300 Meilen bzw. ca. 480 Kilometer. | ||
+ | |||
+ | Unsere eigene neue Karte speichern wir dann als **// | ||
+ | # | ||
+ | | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | === storm2web.sh === | ||
+ | Zum Kopieren unserer, von Stormforce alle 10 Sekunden akutalisierten, | ||
+ | # vim / | ||
+ | |||
+ | <file bash / | ||
+ | # Script zum " | ||
+ | # zur Weiterleitung an den virtuellen Host " | ||
+ | # (c) Michael Nausch | ||
+ | # Version 0.01: 2008-12-29 | ||
+ | # 0.02: 2009-11-07 | ||
+ | # 0.03: 2012-05-04 | ||
+ | # 0.04: 2013-02-16 | ||
+ | # 0.05: 2014-01-06 | ||
+ | # 0.06: 2017-01-09 | ||
+ | |||
+ | QUELLE="/ | ||
+ | ZIEL=" | ||
+ | QUELLE2="/ | ||
+ | |||
+ | convert -geometry 280x183 $QUELLE $QUELLE2 | ||
+ | rsync -av $QUELLE $ZIEL" | ||
+ | rsync -av $QUELLE2 $ZIEL" | ||
+ | </ | ||
- | # yum install python-pyglet | + | Anschliessend versehen wir unser kleines shell-script noch mit dem **" |
+ | # chmod +x / | ||
+ | In der **crontab** unseres Wetterusers hinterlegen wir nun eine Konfigurationszeile, | ||
+ | $ crontab -e | ||
+ | < | ||
+ | */1 * * * * / | ||
+ | ====== Links ====== | ||
+ | * **[[wetter: | ||
+ | * **[[wiki: | ||
+ | * **[[http:// | ||