Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| wetter:boltek:software_stormforce [19.02.2009 15:19. ] – angelegt michi | wetter:boltek:software_stormforce [31.10.2023 18:41. ] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| + | ====== Stormforce Installation und Konfiguration unter CentOS 5.x ====== | ||
| + | ===== Pakete (nach)installieren ===== | ||
| + | Für den reibungslosen Betrieb von [[https:// | ||
| + | # yum list python mysql-server | ||
| + | python.i386 | ||
| + | mysql-server.i386 | ||
| + | Gemäß der **// | ||
| + | # yum install MySQL-python python-game python-numeric ImageMagick | ||
| + | Für die beiden Pakete **python-psyco** und **pyserial** müssen wir etwas Hand anlegen. Zuerst laden wir uns diese auf unseren Rechner: | ||
| + | # cd / | ||
| + | # wget https:// | ||
| + | # wget ftp:// | ||
| + | Dann installieren wir diese beiden Pakete: | ||
| + | # yum --nogpgcheck localinstall / | ||
| + | # yum --nogpgcheck localinstall / | ||
| + | |||
| + | ===== MySQL-Datenbank ===== | ||
| + | ==== Definition ==== | ||
| + | Für den Betrieb von Stormforce legen wir uns nun einen User und eine Tabelle an. Dazu nutzen wir entweder direkt den Konsolenzugang, | ||
| + | < | ||
| + | CREATE USER ' | ||
| + | GRANT all on stormforce.* to ' | ||
| + | FLUSH PRIVILEGES;</ | ||
| + | Erfolgt der Zugriff auf den MySQL-Server über das Netzwerk legen wir unseren User entsprechend an: | ||
| + | < | ||
| + | GRANT all on stormforce.* to ' | ||
| + | FLUSH PRIVILEGES;</ | ||
| + | |||
| + | ==== Zugangstest ==== | ||
| + | Als nächstes überprüfen wir, ob der zuvor angelegt User/Zugang auch funktioniert. | ||
| + | < | ||
| + | Enter password: ***Danny_Knaggs_is_a_geek*** | ||
| + | Welcome to the MySQL monitor. | ||
| + | Your MySQL connection id is 1886 | ||
| + | Server version: 5.0.45 Source distribution | ||
| + | |||
| + | Type ' | ||
| + | |||
| + | mysql> status; | ||
| + | -------------- | ||
| + | mysql Ver 08.15 Distrib 0.0.1, for redhat-linux-gnu (i686) using readline 5.0 | ||
| + | |||
| + | Connection id: 1886 | ||
| + | Current database: | ||
| + | Current user: | ||
| + | SSL: Not in use | ||
| + | Current pager: | ||
| + | Using outfile: | ||
| + | Using delimiter: | ||
| + | Server version: | ||
| + | Protocol version: | ||
| + | Connection: | ||
| + | Server characterset: | ||
| + | Db | ||
| + | Client characterset: | ||
| + | Conn. characterset: | ||
| + | UNIX socket: | ||
| + | Uptime: | ||
| + | |||
| + | Threads: 4 Questions: 566224 | ||
| + | -------------- | ||
| + | |||
| + | mysql> use stormforce; | ||
| + | Database changed | ||
| + | mysql> show tables; | ||
| + | Empty set (0.00 sec) | ||
| + | |||
| + | mysql> quit | ||
| + | Bye </ | ||
| + | ===== Stormforce ===== | ||
| + | ==== Download ==== | ||
| + | Als nächstes holen wir uns die aktuelle Stormforce von der Projektseite bei Google. | ||
| + | cd / | ||
| + | wget https:// | ||
| + | ==== Installation ==== | ||
| + | Zu erst entpacken wir unser Paket. | ||
| + | < | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | stormforce/ | ||
| + | Für die spätere einfache Versionierung ändern wir den **stormforce**-Pfad auf // | ||
| + | mv / | ||
| + | Wir haben es dann zukünftig leichter, wenn wir mehrere Versionen zum testen parallel vorhalten wollen. | ||
| + | Anschließend setzen wir wieder einen symbolischen Link mit dem gewünschten Zielpfadnamen auf unser neues Verzeichnis. | ||
| + | ln -s / | ||
| + | ==== Berechtigungen ==== | ||
| + | Damit unser **user** auch Zugriff auf alle Dateien bekommt, ändern wir noch die Dateirechte ab | ||
| + | chown -R django: | ||
| + | ==== erster Programmstart ==== | ||
| + | Nun ist es an der Zeit, **stormforce** das erste mal zu starten. | ||
| + | < | ||
| + | |||
| + | ######################################################################### | ||
| + | # Copyright/ | ||
| + | ######################################################################### | ||
| + | ######################################################################### | ||
| + | # Copyright (c) 2008, 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 not to be used for safety purposes. | ||
| + | # # | ||
| + | # * You agree and abide the Disclaimer for your Boltek LD-250. | ||
| + | # # | ||
| + | # 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. | ||
| + | ######################################################################### | ||
| + | |||
| + | WARNING: If you do not agree to the above copyright/ | ||
| + | |||
| + | |||
| + | |||
| + | Information: | ||
| + | Information: | ||
| + | |||
| + | Warning: The XML settings file doesn' | ||
| + | Information: | ||
| + | |||
| + | Information: | ||
| + | Wie uns das Programm freundlich mittteilte, müssen wir noch die **XML**-Konfigurationsdatei bearbeiten. | ||
| + | ==== Konfiguration ==== | ||
| + | Mit dem Editor unserer Wahl bearbeiten wir nun die **stormforce-settings.xml** | ||
| + | # vim stormforce-settings.xml | ||
| + | <code xml stormforce-settings.xml> | ||
| + | |||
| + | <?xml version=" | ||
| + | < | ||
| + | <Setting DemoMode=" | ||
| + | <Setting DebugMode=" | ||
| + | <Setting DatabaseEngine=" | ||
| + | <Setting ConnectionString=" | ||
| + | <Setting Fullscreen=" | ||
| + | <Setting LD250Port="/ | ||
| + | <Setting LD250PortCompression=""/> | ||
| + | <Setting LD250PortType=" | ||
| + | <Setting LD250SkewAmount=" | ||
| + | <Setting LD250SquelchLevel=" | ||
| + | <Setting LD250UseUncorrectedStrikes=" | ||
| + | <Setting StormTrackerPort=""/> | ||
| + | <Setting StormTrackerPortCompression=""/> | ||
| + | <Setting StormTrackerPortType=" | ||
| + | <Setting StormTrackerSkewAmount=" | ||
| + | <Setting StormTrackerSquelchLevel=" | ||
| + | <Setting StormTrackerUseUncorrectedStrikes=" | ||
| + | <Setting EFM100Port=""/> | ||
| + | <Setting EFM100PortCompression=""/> | ||
| + | <Setting EFM100PortType=" | ||
| + | <Setting GPSPort=""/> | ||
| + | <Setting GPSPortCompression=""/> | ||
| + | <Setting GPSPortType=" | ||
| + | <Setting TRACEnabled=" | ||
| + | <Setting TRACSensitivity=" | ||
| + | <Setting TRACStormWidth=" | ||
| + | <Setting CloseAlarmArguments=""/> | ||
| + | <Setting SevereAlarmArguments=""/> | ||
| + | <Setting TCPListenerPort=" | ||
| + | <Setting TCPListenerPortCompression=""/> | ||
| + | <Setting UDPListenerPort=" | ||
| + | <Setting UDPListenerPortCompression=""/> | ||
| + | <Setting MulticastListenerAddress=""/> | ||
| + | <Setting MulticastListenerPort=" | ||
| + | <Setting MulticastListenerPortCompression=""/> | ||
| + | <Setting MulticastListenerTTL=" | ||
| + | <Setting StrikeShape=" | ||
| + | <Setting SmallCrosshair=" | ||
| + | <Setting ShowRedDotOnStrike=" | ||
| + | <Setting ReconstructionFile=""/> | ||
| + | <Setting ShowRangeCircles=" | ||
| + | <Setting ServerModeImage=""/> | ||
| + | <Setting SoundEnabled=" | ||
| + | <Setting CurlArguments=""/> | ||
| + | <Setting UserCopyright=" | ||
| + | <Setting ZoomDistance=" | ||
| + | </ | ||
| + | </ | ||
| + | ==== Stormforce-Aufruf ==== | ||
| + | Nachdem wir unsere Konfiguration erfolgreich abgeschlossen haben, rufen wir nunmehr **stormforce** zum ersten male richtig auf. //( Vorausgesetzt wir haben die Berechtigungen auf die Device-Datei entsprechend geändert, siehe hierzu [[wetter: | ||
| + | $ python stormforce.py | ||
| + | < | ||
| + | ######################################################################### | ||
| + | # Copyright/ | ||
| + | ######################################################################### | ||
| + | ######################################################################### | ||
| + | # Copyright (c) 2008, 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 not to be used for safety purposes. | ||
| + | # # | ||
| + | # * You agree and abide the Disclaimer for your Boltek LD-250. | ||
| + | # # | ||
| + | # 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. | ||
| + | ######################################################################### | ||
| + | |||
| + | WARNING: If you do not agree to the above copyright/ | ||
| + | |||
| + | |||
| + | |||
| + | Information: | ||
| + | Information: | ||
| + | |||
| + | Information: | ||
| + | |||
| + | |||
| + | Information: | ||
| + | Information: | ||
| + | Information: | ||
| + | Information: | ||
| + | Information: | ||
| + | Information: | ||
| + | Information: | ||
| + | Information: | ||
| + | Information: | ||
| + | Information: | ||
| + | Information: | ||
| + | Information: | ||
| + | </ | ||
| + | Folgender Bildschirm wird uns bei erfolgreichem Programmstart gezeigt. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | Mit der Taste " | ||
| + | ===== Individuelle Anpassungen ===== | ||
| + | ==== Startscript für Programmstart ==== | ||
| + | Für den Porgrammstart verlinken wir das beim Programmpaket enthaltene Startscript. | ||
| + | # ln -s / | ||
| + | |||
| + | ==== Starter anlegen ==== | ||
| + | Zum Starten von Stormforce legen wir uns am Desktop einen entsprechenden Starter an. Das Icon => {{: | ||
| + | |||
| + | {{ : | ||
| + | ==== Automatischer Programmstart nach erfolgter Anmeldung ==== | ||
| + | Damit unser **Boltek LD-250** nun sofort nach einer erfolgreichen Useranmeldung von // | ||
| + | |||
| + | Hierzu legen wir zu erst folgendes Verzeichnis an: | ||
| + | # mkdir / | ||
| + | Dort legen wir die Datei **__stormforce.desktop__** mit folgendem Inhalt an: | ||
| + | < | ||
| + | Name=Stormforce | ||
| + | Encoding=UTF-8 | ||
| + | Version=1.0 | ||
| + | Exec=stormforce-start.sh | ||
| + | X-GNOME-Autostart-enabled=true</ | ||
| + | Somit wird beim nächsten Anmelden am X-Gnome-Desktop das Programm **stormforce** automatisch gestartet. | ||
| + | |||
| + | {{ : | ||
| + | ==== Update des Bildes auf unserem Webserver/ | ||
| + | === storm2web.sh === | ||
| + | Zum Kopieren unserer, von Stormforce alle 10 Sekunden akutalisierten, | ||
| + | # vim / | ||
| + | <code bash storm2web.sh ># | ||
| + | # Script zum " | ||
| + | # virtuellen Host " | ||
| + | # (c) Michael Nausch - 29.12.2008 | ||
| + | |||
| + | WORKDIR="/ | ||
| + | QUELLE="/ | ||
| + | ZIEL="/ | ||
| + | SLEEP=10 | ||
| + | |||
| + | cd $WORKDIR | ||
| + | while true | ||
| + | do | ||
| + | # cd $WORKDIR_1 | ||
| + | rsync -av $QUELLE $ZIEL" | ||
| + | sleep $SLEEP | ||
| + | done | ||
| + | </ | ||
| + | Anschließend versehen wir unser kleines shell-script noch mit dem **" | ||
| + | # chmod +x / | ||
| + | |||
| + | === Stormforce-Konfiguration === | ||
| + | Die Dateibezeichnung **stormforce_picture.png** tragen wir auch in der Konfigurationsdatei von Stormforce **// | ||
| + | //** ein: | ||
| + | # vim stormforce-settings.xml | ||
| + | <code xml stormforce-settings.xml> | ||
| + | |||
| + | <?xml version=" | ||
| + | < | ||
| + | <Setting DemoMode=" | ||
| + | <Setting DebugMode=" | ||
| + | |||
| + | ... | ||
| + | <Setting ServerModeImage=" | ||
| + | <Setting SoundEnabled=" | ||
| + | <Setting CurlArguments=""/> | ||
| + | <Setting UserCopyright=" | ||
| + | <Setting ZoomDistance=" | ||
| + | </ | ||
| + | </ | ||
| + | === service stormforce === | ||
| + | Damit nun beim Systemstart automatisch der automatische // | ||
| + | # vim / | ||
| + | <code bash stormforce> | ||
| + | |||
| + | #!/bin/sh | ||
| + | # | ||
| + | # chkconfig: 2345 79 31 | ||
| + | # description: | ||
| + | # | ||
| + | # processname: | ||
| + | # | ||
| + | |||
| + | # Source function library. | ||
| + | . / | ||
| + | |||
| + | # Source networking configuration. | ||
| + | . / | ||
| + | |||
| + | # Check that networking is up. | ||
| + | [ ${NETWORKING} = " | ||
| + | |||
| + | prog=storm2web.sh | ||
| + | stormforce_prg=/ | ||
| + | |||
| + | # Source an auxiliary options file if we have one, and pick up OPTIONS, | ||
| + | if [ -r / | ||
| + | . / | ||
| + | fi | ||
| + | |||
| + | start() { | ||
| + | echo -n $" | ||
| + | # $stormforce_prg start | ||
| + | $stormforce_prg & | ||
| + | RETVAL=$? | ||
| + | echo | ||
| + | [ $RETVAL -eq 0 ] && touch / | ||
| + | } | ||
| + | stop() { | ||
| + | echo -n $" | ||
| + | / | ||
| + | # $stormforce_prg stop | ||
| + | RETVAL=$? | ||
| + | echo | ||
| + | [ $RETVAL -eq 0 ] && rm -f / | ||
| + | } | ||
| + | |||
| + | restart() { | ||
| + | stop | ||
| + | start | ||
| + | } | ||
| + | |||
| + | |||
| + | # See how we were called. | ||
| + | case " | ||
| + | start) | ||
| + | start | ||
| + | ;; | ||
| + | stop) | ||
| + | stop | ||
| + | ;; | ||
| + | restart) | ||
| + | restart | ||
| + | ;; | ||
| + | *) | ||
| + | echo $" | ||
| + | exit 1 | ||
| + | esac | ||
| + | |||
| + | exit $RETVAL</ | ||
| + | Damit der " | ||
| + | # chkconfig stormforce on | ||
| + | Die Überprüfungung ob der Dienst (Daemon) stormforce wirklich bei jedem Systemstart automatisch mit gestartet werden, kann durch folgenden Befehle erreicht werden: | ||
| + | # chkconfig --list | grep stormforce | ||
| + | stormforce | ||
| + | |||
| + | Den Daemon starten wir nun initial mit: | ||
| + | # service stormforce start | ||
| + | ==== Kartenhintergrund ==== | ||
| + | Einen passenden Kartenhintergrund können wir uns entweder über das [[https:// | ||
| + | mit Hilfe des [[https:// | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | 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 **// | ||
| + | # | ||
| + | | ||
| + | |||
| + | |||