StormForce XR - Installation und Konfiguration unter CentOS 7.x

Bild: Boltec LD-250 Blitzdedector

Bild: Empfangsantenne des Boltec LD-250 Blitzdedectors Die Installation des Blitzdedectors LD-250 gestaltet sich relativ einfach. Es muss lediglich die Antenne (schwarzer 4-eckiger Block) an geeigneter Stelle montiert und die richtige Seite gen Norden ausgerichtet werden. Zum Verbinden der Antenne mit dem LD-250 nimmt man am besten ein abgeschirmtes Netzwerkkabel und nicht da der Lieferung beiligendem ungeschirmten Kabels.

Die RS232-Schnittstelle des LD-250 verbindet man dann mit zugehörigen Port unseres Servers. Zu guter Letzt wird dann das Netzteil mit den LD-250 verbunden.

Die Verbindung zwischen dem Boltec LD-250 und dem Server erfolgt mittels eines freien Anschlusses des 4-port USB/UART-Adapter DIGITUS USB 2.0 zu 4xRS232 Kabel.

Mit Hilfe der installierten usbutiuls können Details zum USB_Adapter abgefragt werden.

Bei Bedarf installieren wir uns also besagtes RPM-Paket.

 # yum install usbutils

Den Inhalt des Paketes können wir uns wie folgt anzeigen lassen.

 # rpm -qil usbutils
Name        : usbutils
Version     : 007
Release     : 5.el7
Architecture: x86_64
Install Date: Sun 08 Jan 2017 12:03:27 PM CET
Group       : Applications/System
Size        : 187281
License     : GPLv2+
Signature   : RSA/SHA256, Wed 25 Nov 2015 05:02:14 PM CET, Key ID 24c6a8a7f4a80eb5
Source RPM  : usbutils-007-5.el7.src.rpm
Build Date  : Fri 20 Nov 2015 09:48:55 AM CET
Build Host  : worker1.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <https://bugs.centos.org>
Vendor      : CentOS
URL         : https://www.linux-usb.org/
Summary     : Linux USB utilities
Description :
This package contains utilities for inspecting devices connected to a
USB bus.
/usr/bin/lsusb
/usr/bin/lsusb.py
/usr/bin/usb-devices
/usr/bin/usbhid-dump
/usr/share/doc/usbutils-007
/usr/share/doc/usbutils-007/AUTHORS
/usr/share/doc/usbutils-007/COPYING
/usr/share/doc/usbutils-007/ChangeLog
/usr/share/doc/usbutils-007/NEWS
/usr/share/doc/usbutils-007/README
/usr/share/man/man1/usb-devices.1.gz
/usr/share/man/man8/lsusb.8.gz
/usr/share/man/man8/usbhid-dump.8.gz
/usr/share/pkgconfig/usbutils.pc

Der Aufruf von lsusb zeigt uns neben den anderen USB-Devices auch unseren 4-Port Adapter.

 # lsusb
Bus 001 Device 003: ID 0403:6011 Future Technology Devices International, Ltd FT4232H Quad HS USB-UART/FIFO IC
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0627:0001 Adomax Technology Co., Ltd 
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Eine ähnliche aussagekräftige Detailanzeige können wir uns mit dem Befehl usb-devices anzeigen lassen.

 # usb-devices 
T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  3 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=0403 ProdID=6011 Rev=08.00
S:  Manufacturer=FTDI
S:  Product=FT4232H Device
S:  SerialNumber=FTZ9JWTW
C:  #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=200mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio
I:  If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=ftdi_sio

Damit der Adapter auch verwendet werden kann, benötigen wir noch die libftdi-Bibliotheken, welche wir nun noch installieren werden.

 # yum install libftdi

Auch hier können wir bei Interesse, den Inhalt des RPM-Paketes anzeigen lassen.

 # rpm -qil libftdi
Name        : libftdi
Version     : 1.1
Release     : 4.el7
Architecture: x86_64
Install Date: Sun 08 Jan 2017 11:55:10 AM CET
Group       : System Environment/Libraries
Size        : 96091
License     : LGPLv2
Signature   : RSA/SHA256, Tue 07 Oct 2014 10:19:03 PM CEST, Key ID 6a2faea2352c64e5
Source RPM  : libftdi-1.1-4.el7.src.rpm
Build Date  : Mon 06 Oct 2014 09:17:24 PM CEST
Build Host  : buildvm-24.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : https://www.intra2net.com/de/produkte/opensource/ftdi/
Summary     : Library to program and control the FTDI USB controller
Description :
A library (using libusb) to talk to FTDI's FT2232C,
FT232BM and FT245BM type chips including the popular bitbang mode.
/lib/udev/rules.d/69-libftdi.rules
/usr/lib64/libftdi1.so.2
/usr/lib64/libftdi1.so.2.1.0
/usr/share/doc/libftdi-1.1
/usr/share/doc/libftdi-1.1/AUTHORS
/usr/share/doc/libftdi-1.1/COPYING.LIB
/usr/share/doc/libftdi-1.1/ChangeLog
/usr/share/doc/libftdi-1.1/README

Damit später der Nutzer unter dem die Anwendung Stormforce-XR auch auf dieses Device zugreifen kann, passen wir noch gleich die Berechtigung auf diese Geräte-Datei an.

 # chown weather:dialout /dev/ttyUSB0

Zunächst erstellen wir uns unser Paketverzeichnis, sofern dies noch nicht existiert.

 # mkdir /usr/local/src/packages

Dann nächstes holen wir uns die aktuelle Stormforce von der Projektseite bei https://sourceforge.net.

 # cd /usr/local/src/packages
 wget https://stormforce.googlecode.com/files/stormforce-0.5.4.tar.bz2

Download

Aktuell1) wir die Softwrae Stormforce-XR nicht mehr unter code.google.com gepflegt und vorgehalten, sondern auf GitHub. Wir holen uns daher das Programmpaket von der GitHub-Projektseite https://github.com/knaggsy2000/stormforce-xr.

Bevor wir uns nun dieses Projekt auf unseren Rechner clonen, wechseln wir in das Verzeichnis /usr/local/src/ auf unserem Wetter-Server.

 # cd /usr/local/src

Nun clonen wir das Projekt direkt in das Verzeichnis stormforce-xr.

 # git clone https://github.com/knaggsy2000/stormforce-xr.git stormforce-xr
Cloning into 'stormforce-xr'...
remote: Counting objects: 22, done.
remote: Total 22 (delta 0), reused 0 (delta 0), pack-reused 22
Unpacking objects: 100% (22/22), done.

Update

Möchten wir unsere lokale Installation updaten, so gehen wir in folgenden Schritten vor. Als erstes wechseln wir in das Programmverzeichnis von stormvorce-xr auf unserem Server.

 # cd /usr/local/src/stormforce-xr

Anschliessend führen wir einen pull gegen das Projekt bei GitHub durch.

 # git pull

Hinweise zu den weiteren Voraussetzungen und zur Konfiguration finden sich in den beiden Dateien README.

 # less /usr/local/src/stormforce-xr/README
StormForce XR (XMLRPC) - Release v0.5.0 on 15/03/2014
=====================================================
Link: https://code.google.com/p/stormforce/

For license and copyright, please see the LICENSE file.


Preface
=======
StormForce XR is a complete rewrite of StormForce v0.6.0 designed to be more modern and provide a universal interface to allow easier integration with third-party software.  Datasets are generated in XML which is then compressed with GZIP then finally transported over XMLRPC.  This should allow easy integration with multiple development languages (eg. Python, dotNET, etc).  A seperate document XMLRPC provides information on the XMLRPC procedures and details.

The server component only requires THREE external Python modules to be installed: psycopg2, serial, and twisted - these are required.
The client component only requires ONE external Python module to be installed: pygame >= 1.8 - this is required.  matplotlib and numpy are optional which provide the graphing backend.

StormForce XR is aiming to use less external packages for easier installation.


However, StormForce XR will not support the StormTracker - this is due to the library only working on Linux.  I need this project as cross-platform as possible, so if you need to use the StormTracker stick with the original StormForce.

GPS support has been removed since StormForce didn't use any of the data provided by the unit.


*** Bug fixes will no longer be made to StormForce, only to StormForce XR. ***


Notes (S = server, C = client)
==============================
v0.5.0 - 15th March 2014
^^^^^^^^^^^^^^^^^^^^^^^^
 1. (S) Log messages now use my new logging class DanLog provided by danlog.py.
 2. (C) Log messages now use my new logging class DanLog provided by danlog.py.
 3. (S) Refactored the main code into a new class.
 4. (S) New database class to handle database operations.
 5. (C) Incorrectly used "-" as the marker in matplotlib which could cause it to fail to draw the graph.  Corrected it.
 6. (C) Refactored the main code into a new class.
 7. (S) The TRAC update period (ie. how often it's run) is now set in the settings XML file.  Defaults to two minutes.
 8. (S) TRAC now has multiple detection methods, take a look at the new section below which gives the values to set in the settings XML file.
 9. (S) Refactored the TRAC code into a new class.
10. (S) The default TRAC detection method (zero) has been made more efficient - it no longer scans grid which don't have any strikes in them and the offset is sent in a single SQL statement.
11. (S) TRAC didn't log the absolute distance into the database (tblTRACHeader) instead it logged the pre-absolute distance, corrected.
12. (S) The storm offset calculation in TRAC was wrong when calculating the BL sector, corrected.
13. (S) The database updating code has been improved not to throw exceptions if the table and/or columns already exist.
14. (S) PostgreSQL 9.3 is now the minimum version since 9.0 is getting a bit old now (it's EOL in September 2015).  We also need to use "pgcrypto" for strong checksums, you'll need to install the "contrib" package as well.  Don't forget to create the extension in the database (instructions updated below).
15. (S) TRAC now runs as a function in PostgreSQL (fnTRAC) written in PLPGSQL.
16. (S) Close storms in TRAC should no longer cause excessive overlapping.

v0.4.1 - 12th May 2012
^^^^^^^^^^^^^^^^^^^^^^
1. (C) The graphing class now disposes it's objects, should help with matplotlib's garbage collector.
2. (S) The vwStrikesPeak view wasn't quite right when used with TRAC, this has been corrected and renamed to vwTRACStrikesPeak.
3. (S) TRAC's peak strike count was based on the last minute, this has been changed to the last five minutes to match the TRAC run period.
4. (S) runTRAC() XMLRPC call removed.
5. (C) Removed more obsolete commands from the client.
6. (S) testTRAC() XMLRPC call removed.
7. (C) Two new strike shapes, both based on a plus sign.  New section below indicating the values to set in the settings XML file - should have done this earlier.
8. (C) TRAC's grid is now displayed when running in debug mode.
9. (S) TRAC's intensity detection wasn't right, should now be correct.

v0.4.0 - 6th May 2012
^^^^^^^^^^^^^^^^^^^^^
 1. (S) Introspection has been added to the XMLRPC server.
 2. (S) fakeStrikes() XMLRPC call removed.
 3. (S) insertIntoPersistence() XMLRPC call removed.
 4. (S) strikePersistence() XMLRPC call returned data altered, please review the XMLRPC document.
 5. (S) rotateLogs() XMLRPC call removed.
 6. (S) There is no longer the concept of strike persistence, everything is now based on the main strikes table (tblStrikes).  The SQL views have been amended to return the new data format.  The data returned will be the last hour worth of strikes (based on the request time) but never earlier than the server started date, you will also be given the strike age in seconds (rounded to an integer).  This allows for greater control of the strike display on the client side.  Please review the XMLRPC document.
 7. (C) Using the new strike age field, strikes are now colour coded in five minute slots rather than the old ten minute slots.  Colours have been changed also, hopefully will help with certain background maps.
 8. (C) Mini client now displays the strike age when requesting the persistence.
 9. (S) TRAC now runs every five minutes.
10. (S) SQL view vwTRACPersistence is now correctly dropped and recreated on server startup.
11. (C) Client no longer attempts to send demo strikes back to server, the XMLRPC calls have been removed anyway.
12. (S) The XMLRPC server will only serve on it's child URL "/xmlrpc", no client code changes will be required - more of a notice really.
13. (C) Improved the cron() routine should exceptions occur.
14. (S) Altered XMLRPC call lastHourOfStrikesByMinute() to provide the strike age in minutes.  Please review the XMLRPC document.
15. (C) Mini client altered to display the above.
16. (C) The screen capture file is now located in the new "capture" directory, the filename remains the same.
17. (C) Default capture time is now 15 seconds.
18. (C) A strike history graph is now shown for the last 60 minutes.  This requires "matplotlib" and "numpy" to be installed - if it isn't then you won't get the graphs, it's an optional dependency.  The graphing update period can be changed using it's "UpdatePeriodGraphs" XML setting.  The graphs will be stored in the "graphs" directory.
19. (C) The "capture" and "graphs" directories will be cleaned up on client startup (ie. all files will be deleted).

v0.3.1 - 23rd April 2012
^^^^^^^^^^^^^^^^^^^^^^^^
1. (S) TRAC now logs the most active storms distance as well as the closest, XMLRPC calls now return extra columns please read the XMLRPC document for more information.
2. (C) UI code changed to show the above.
3. (S) New XMLRPC call lastHourOfStrikesByMinute() provides a strike summary grouped per minute.
4. (C) Mini client can now show the strikes per minute.
5. (S) Some imports from the old XMLRPC server was left behind - now cleaned up.
6. (C) Mini client can now list storms TRAC is monitoring.

v0.3.0 - 19th April 2012
^^^^^^^^^^^^^^^^^^^^^^^^
1. (S) The XMLRPC server now runs using Twisted and will now handle multiple clients simultaneously.  This is now a required component.

v0.2.2 - 12th August 2011
^^^^^^^^^^^^^^^^^^^^^^^^^
1. (C) Now has a new mini version of the client which provides text based representation of the data.  Useful for when running SXR over DDP or you don't require a UI.  NOTE: Not all the features (e.g. screen capture, etc) are not present in the mini client.
2. (S) The strikePersistence() XMLRPC call could have returned data in an incorrect order, this has been corrected.
3. (S) The strikePersistence() XMLRPC call now includes the relative values of the strikes based on the map centre.

v0.2.1 - 10th August 2011
^^^^^^^^^^^^^^^^^^^^^^^^^
1. (S) Tweaked connection parameters to the database.
2. (S) Changed SQL parameters to named parameters.
3. (C) Strike copyright is now read from the server.
4. (S) serverDetails() XMLRPC call had it's index wrong when returning the data, corrected.
5. (C) The server details are now displayed on the top left of the screen.

v0.2.0 - 7th August 2011
^^^^^^^^^^^^^^^^^^^^^^^^
1. (S) Moved from MySQL to PostgreSQL v9.X.
2. (C) Tweaked connection hostname for the client as the server doesn't appear to listen on IPv6 addresses, now uses 127.0.0.1 as default.
3. (S) Improved the receiver status, now reports the receiver missing if it hasn't heard from it for five seconds or more.

v0.1.3 - 27th May 2011
^^^^^^^^^^^^^^^^^^^^^^
1. (S) Corrected serial code when running under Windows.  Windows doesn't like XONXOFF set to NULL so it's now set to FALSE.
2. (C) Forgot to add the range circles to the settings XML.

v0.1.2 - 22nd May 2011
^^^^^^^^^^^^^^^^^^^^^^
1. (S) Corrections to the EFM-100 handling code.

v0.1.1 - 21st May 2011
^^^^^^^^^^^^^^^^^^^^^^
1. (C) Client component.

v0.1.0 - 16th May 2011
^^^^^^^^^^^^^^^^^^^^^^
1. (S) Initial release, server component only.

v0.0.0 - 14th May 2011
^^^^^^^^^^^^^^^^^^^^^^
1. Development started.


Usage
=====
On the command line: -

% python sxr_client.py
% python sxr_mini_client.py
% python sxr_server.py


Current Features (S = server, C = client)
=========================================
 1. (S) XMLRPC server served on a single port which can be changed in the settings XML file.
 2. (S) Records strikes into PostgreSQL as soon as they are received from the Boltek LD-250.
 3. (S) Records the electric field strength into PostgreSQL as soon as it is received from the Boltek EFM-100.
 4. (S) Basic storm tracking using my implementation of TRAC, TRAC can also have it's storm searching parameters changed in the settings XML file.
 5. (C) Completely stateless client, the server provides all the data so parameters like the strikes, TRAC, uptime, etc are kept even if you restart the client or start another on another computer.
 6. (C) Periodic screen capture for uploading.
 7. (C) Screen update times (known as the "update period") can be changed if user requires in the settings XML file.
 8. (C) Mini client provides quick access to the data and doesn't require any external dependencies - just a base install of Python.
 9. (C) Strike history graph provided by matplotlib (if installed).
10. (C) Strike shapes can be changed in the settings XML file.


Future Features
===============
1. SSBT.
2. Boltek LD-350 support.


Client Strike Shapes
====================
0 = Square
1 = Triangle (pointing down)
2 = Circle
3 = Plus with black outline, coloured fill
4 = Plus with coloured outline, transparent fill


TRAC Detection Methods
======================
0 = Uses a fixed-grid to determine whether the number of strikes exceeds a threshold
1 = Uses a freestyle-grid to determine whether the number of strikes exceeds a threshold


Installation
============
FreeBSD
^^^^^^^
Here are the packages I've currently got installed for StormForce XR to work: -

================================================================================================================================
Name				|	Download From	|	Directory
====================+===================+=======================================================================================
py27-game			|	Ports			|	/usr/ports/devel/py-game/
py27-matplotlib		|	Ports			|	/usr/ports/math/py-matplotlib/
py27-scimath		|	Ports			|	/usr/ports/science/py-scimath/
py27-psycopg2		|	Ports			|	/usr/ports/databases/py-psycopg2/
py27-serial			|	Ports			|	/usr/ports/comms/py-serial/
py27-twisted		|	Ports			|	/usr/ports/devel/py-twisted/
python27			|	Ports			|	/usr/ports/lang/python/
====================+===================+=======================================================================================
postgres93-server	|	Ports			|	/usr/ports/databases/postgresql93-server/
postgres93-client	|	Ports			|	/usr/ports/databases/postgresql93-client/
postgres93-contrib	|	Ports			|	/usr/ports/databases/postgresql93-contrib/
================================================================================================================================

You can install them in any order, you might want to make sure the your ports collection is up-to-date.  Python 2.7 is normally installed by default so don't worry about that one.


Linux
^^^^^
*** This section needs updating. ***


MacOS
^^^^^
Untested - But no problems are expected.


Microsoft Windows
^^^^^^^^^^^^^^^^^
Install Python 2.7 (https://www.python.org/ftp/python/2.7.3/python-2.7.3.msi), pySerial (https://pypi.python.org/packages/any/p/pyserial/pyserial-2.5.win32.exe), pygame (https://pygame.org/ftp/pygame-1.9.1.win32-py2.7.msi), psycopg2 (https://www.stickpeople.com/projects/python/win-psycopg/psycopg2-2.4.5.win32-py2.7-pg9.1.3-release.exe), twisted (https://pypi.python.org/packages/2.7/T/Twisted/Twisted-12.0.0.win32-py2.7.msi), numpy (https://sourceforge.net/projects/numpy/files/NumPy/1.6.1/numpy-1.6.1-win32-superpack-python2.7.exe/download), and matplotlib (https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0/matplotlib-1.1.0.win32-py2.7.exe/download).


Please note that the psycopg2 package is not a official build, have a look on the website for more information: https://www.stickpeople.com/projects/python/win-psycopg/

*** Remember that you only need certain packages installed depending on which component of StormForce XR you want to use. ****


PostgreSQL
==========
All that StormForce XR needs is the actual database and username setup, the tables, views, indices, and functions will be handled by the program itself.

Run the following commands: -

 # su pgsql
 $ createdb stormforce_xr
 $ psql stormforce_xr
=# CREATE USER stormforce_user WITH password 'password';
=# GRANT ALL PRIVILEGES ON DATABASE stormforce_xr TO stormforce_user;
=# ALTER DATABASE stormforce_xr OWNER TO stormforce_user;
=# CREATE EXTENSION pgcrypto;


Then give StormForce XR the connection details in the settings XML.


FAQ
===
Q. What are the dependencies for this program?
A. Python v2.7 or greater.  Modules used are StringIO, datetime, gzip, hashlib, math, matplotlib*, numpy*, os, pygame*, psycopg2*, serial*, sys, threading, time, twisted*, xmlrpclib, xml, and zlib.  * - External package which requires installing since it's not normally installed by default.

Q. What operating systems does it support?
A. I develop and test StormForce XR with FreeBSD 9.1, it should work in other POSIX compliant operating systems as well other distros of Linux.

Q. Can I create (port) of StormForce XR?
A. By all means! Be sure to read the LICENSE first.

Q. I've found a bug! What do I do?
A. Let me know by raising it as an issue so I can fix it in the next version.

Q. I would like a feature that's not in StormForce XR...
A. I'm currently not accepting feature requests.

Q. Can StormForce XR send it's strike data to Blitzortung?
A. Unfortunately this is not possible due the strikes needing microsecond accuracy which the Boltek LD-250 doesn't provide, even when used with a GPS unit.  Egor from Blitzortung informed me of this.


Legal
=====
I am in no way affiliated or in partnership with either Boltek, Google, NASA, Microsoft, or anyone else.

<EOF>

Für den reibungslosen Betrieb von Stormforce-XR für unseren Blitzdedector LD-250 benötigen wir noch ein paar Python Programme. Python selbst wurde bereits bei der Installation unseres Servers mitinstalliert, da dies ja unter anderem für das Paketverwaltungsprogramm YUM benötigt wird.

 # yum info python
Loaded plugins: changelog, priorities
326 packages excluded due to repository priority protections
Installed Packages
Name        : python
Arch        : x86_64
Version     : 2.7.5
Release     : 48.el7
Size        : 79 k
Repo        : installed
From repo   : anaconda
Summary     : An interpreted, interactive, object-oriented programming language
URL         : https://www.python.org/
License     : Python
Description : Python is an interpreted, interactive, object-oriented programming
            : language often compared to Tcl, Perl, Scheme or Java. Python includes
            : modules, classes, exceptions, very high level dynamic data types and
            : dynamic typing. Python supports interfaces to many system calls and
            : libraries, as well as to various windowing systems (X11, Motif, Tk,
            : Mac and MFC).
            : 
            : Programmers can write new built-in modules for Python in C or C++.
            : Python can be used as an extension language for applications that need
            : a programmable interface.
            : 
            : Note that documentation for Python is provided in the python-docs
            : package.
            : 
            : This package provides the "python" executable; most of the actual
            : implementation is within the "python-libs" package.

Gemäß der README aus dem aktuellen stormforce-xr Paket installieren wir nun für die Server-Komponente von Stormforce-XR die benötigten Pakete nach.

 # yum install python-twisted-core python-twisted-web pyserial python-psycopg2

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, welches wir nun kurzer Hand in unser System einbinden werden.

Zunächst importieren wir den PGP-Key mit dem die Pakete des Nux Dextop Repositories signiert wurden.

 # rpm --import https://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro

Anschliessend binden wir das Nux Dextop Repo auf unserem Server ein.

 # yum -y install epel-release && rpm -Uvh https://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

Zu guter Letzt installieren wir das Python Paket pygame.

 # yum install pygame -y

Im Gegensatz zum Entwicklungszweig stormforce, der aktuell nicht mehr weiterentwickelt und gepflegt wird, wird beim neuen Release-Version stormforce-xr nur noch eine PostgreSQL-Datenbank zur Speicherung der Daten unterstützt.

Den benötigten Datenbank-Daemon installieren wir, wie soll es anders sein, einfach via yum.

  1. Installation des Postgresql-Datenbank-Daemon
     # yum -y install postgresql-server 
  2. Konfiguration des Datenbankdaemon
     # vim /var/lib/pgsql/data/postgresql.conf 
    /var/lib/pgsql/data/postgresql.conf
    # -----------------------------
    # PostgreSQL configuration file
    # -----------------------------
    #
    # This file consists of lines of the form:
    #
    #   name = value
    #
    # (The "=" is optional.)  Whitespace may be used.  Comments are introduced with
    # "#" anywhere on a line.  The complete list of parameter names and allowed
    # values can be found in the PostgreSQL documentation.
    #
    # The commented-out settings shown in this file represent the default values.
    # Re-commenting a setting is NOT sufficient to revert it to the default value;
    # you need to reload the server.
    #
    # This file is read on server startup and when the server receives a SIGHUP
    # signal.  If you edit the file on a running system, you have to SIGHUP the
    # server for the changes to take effect, or use "pg_ctl reload".  Some
    # parameters, which are marked below, require a server shutdown and restart to
    # take effect.
    #
    # Any parameter can also be given as a command-line option to the server, e.g.,
    # "postgres -c log_connections=on".  Some parameters can be changed at run time
    # with the "SET" SQL command.
    #
    # Memory units:  kB = kilobytes        Time units:  ms  = milliseconds
    #                MB = megabytes                     s   = seconds
    #                GB = gigabytes                     min = minutes
    #                                                   h   = hours
    #                                                   d   = days
     
     
    #------------------------------------------------------------------------------
    # FILE LOCATIONS
    #------------------------------------------------------------------------------
     
    # The default values of these variables are driven from the -D command-line
    # option or PGDATA environment variable, represented here as ConfigDir.
     
    #data_directory = 'ConfigDir'		# use data in another directory
    					# (change requires restart)
    #hba_file = 'ConfigDir/pg_hba.conf'	# host-based authentication file
    					# (change requires restart)
    #ident_file = 'ConfigDir/pg_ident.conf'	# ident configuration file
    					# (change requires restart)
     
    # If external_pid_file is not explicitly set, no extra PID file is written.
    #external_pid_file = ''			# write an extra PID file
    					# (change requires restart)
     
     
    #------------------------------------------------------------------------------
    # CONNECTIONS AND AUTHENTICATION
    #------------------------------------------------------------------------------
     
    # - Connection Settings -
     
    #listen_addresses = 'localhost'		# what IP address(es) to listen on;
    					# comma-separated list of addresses;
    					# defaults to 'localhost'; use '*' for all
    					# (change requires restart)
    #port = 5432				# (change requires restart)
    # Django : 2017-01-09
    # default: unset
    listen_addresses = 'localhost'
    # Note: In RHEL/Fedora installations, you can't set the port number here;
    # adjust it in the service file instead.
    max_connections = 100			# (change requires restart)
    # Note:  Increasing max_connections costs ~400 bytes of shared memory per
    # connection slot, plus lock space (see max_locks_per_transaction).
    #superuser_reserved_connections = 3	# (change requires restart)
    #unix_socket_directories = '/var/run/postgresql, /tmp'	# comma-separated list of directories
    					# (change requires restart)
    #unix_socket_group = ''			# (change requires restart)
    #unix_socket_permissions = 0777		# begin with 0 to use octal notation
    					# (change requires restart)
    #bonjour = off				# advertise server via Bonjour
    					# (change requires restart)
    #bonjour_name = ''			# defaults to the computer name
    					# (change requires restart)
     
    # - Security and Authentication -
     
    #authentication_timeout = 1min		# 1s-600s
    #ssl = off				# (change requires restart)
    #ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH'	# allowed SSL ciphers
    					# (change requires restart)
    #ssl_renegotiation_limit = 0		# amount of data between renegotiations
    #ssl_cert_file = 'server.crt'		# (change requires restart)
    #ssl_key_file = 'server.key'		# (change requires restart)
    #ssl_ca_file = ''			# (change requires restart)
    #ssl_crl_file = ''			# (change requires restart)
    #password_encryption = on
    #db_user_namespace = off
     
    # Kerberos and GSSAPI
    #krb_server_keyfile = ''
    #krb_srvname = 'postgres'		# (Kerberos only)
    #krb_caseins_users = off
     
    # - TCP Keepalives -
    # see "man 7 tcp" for details
     
    #tcp_keepalives_idle = 0		# TCP_KEEPIDLE, in seconds;
    					# 0 selects the system default
    #tcp_keepalives_interval = 0		# TCP_KEEPINTVL, in seconds;
    					# 0 selects the system default
    #tcp_keepalives_count = 0		# TCP_KEEPCNT;
    					# 0 selects the system default
     
     
    #------------------------------------------------------------------------------
    # RESOURCE USAGE (except WAL)
    #------------------------------------------------------------------------------
     
    # - Memory -
     
    shared_buffers = 32MB			# min 128kB
    					# (change requires restart)
    #temp_buffers = 8MB			# min 800kB
    #max_prepared_transactions = 0		# zero disables the feature
    					# (change requires restart)
    # Note:  Increasing max_prepared_transactions costs ~600 bytes of shared memory
    # per transaction slot, plus lock space (see max_locks_per_transaction).
    # It is not advisable to set max_prepared_transactions nonzero unless you
    # actively intend to use prepared transactions.
    #work_mem = 1MB				# min 64kB
    #maintenance_work_mem = 16MB		# min 1MB
    #max_stack_depth = 2MB			# min 100kB
     
    # - Disk -
     
    #temp_file_limit = -1			# limits per-session temp file space
    					# in kB, or -1 for no limit
     
    # - Kernel Resource Usage -
     
    #max_files_per_process = 1000		# min 25
    					# (change requires restart)
    #shared_preload_libraries = ''		# (change requires restart)
     
    # - Cost-Based Vacuum Delay -
     
    #vacuum_cost_delay = 0ms		# 0-100 milliseconds
    #vacuum_cost_page_hit = 1		# 0-10000 credits
    #vacuum_cost_page_miss = 10		# 0-10000 credits
    #vacuum_cost_page_dirty = 20		# 0-10000 credits
    #vacuum_cost_limit = 200		# 1-10000 credits
     
    # - Background Writer -
     
    #bgwriter_delay = 200ms			# 10-10000ms between rounds
    #bgwriter_lru_maxpages = 100		# 0-1000 max buffers written/round
    #bgwriter_lru_multiplier = 2.0		# 0-10.0 multipler on buffers scanned/round
     
    # - Asynchronous Behavior -
     
    #effective_io_concurrency = 1		# 1-1000; 0 disables prefetching
     
     
    #------------------------------------------------------------------------------
    # WRITE AHEAD LOG
    #------------------------------------------------------------------------------
     
    # - Settings -
     
    #wal_level = minimal			# minimal, archive, or hot_standby
    					# (change requires restart)
    #fsync = on				# turns forced synchronization on or off
    #synchronous_commit = on		# synchronization level;
    					# off, local, remote_write, or on
    #wal_sync_method = fsync		# the default is the first option
    					# supported by the operating system:
    					#   open_datasync
    					#   fdatasync (default on Linux)
    					#   fsync
    					#   fsync_writethrough
    					#   open_sync
    #full_page_writes = on			# recover from partial page writes
    #wal_buffers = -1			# min 32kB, -1 sets based on shared_buffers
    					# (change requires restart)
    #wal_writer_delay = 200ms		# 1-10000 milliseconds
     
    #commit_delay = 0			# range 0-100000, in microseconds
    #commit_siblings = 5			# range 1-1000
     
    # - Checkpoints -
     
    #checkpoint_segments = 3		# in logfile segments, min 1, 16MB each
    #checkpoint_timeout = 5min		# range 30s-1h
    #checkpoint_completion_target = 0.5	# checkpoint target duration, 0.0 - 1.0
    #checkpoint_warning = 30s		# 0 disables
     
    # - Archiving -
     
    #archive_mode = off		# allows archiving to be done
    				# (change requires restart)
    #archive_command = ''		# command to use to archive a logfile segment
    				# placeholders: %p = path of file to archive
    				#               %f = file name only
    				# e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'
    #archive_timeout = 0		# force a logfile segment switch after this
    				# number of seconds; 0 disables
     
     
    #------------------------------------------------------------------------------
    # REPLICATION
    #------------------------------------------------------------------------------
     
    # - Sending Server(s) -
     
    # Set these on the master and on any standby that will send replication data.
     
    #max_wal_senders = 0		# max number of walsender processes
    				# (change requires restart)
    #wal_keep_segments = 0		# in logfile segments, 16MB each; 0 disables
    #replication_timeout = 60s	# in milliseconds; 0 disables
     
    # - Master Server -
     
    # These settings are ignored on a standby server.
     
    #synchronous_standby_names = ''	# standby servers that provide sync rep
    				# comma-separated list of application_name
    				# from standby(s); '*' = all
    #vacuum_defer_cleanup_age = 0	# number of xacts by which cleanup is delayed
     
    # - Standby Servers -
     
    # These settings are ignored on a master server.
     
    #hot_standby = off			# "on" allows queries during recovery
    					# (change requires restart)
    #max_standby_archive_delay = 30s	# max delay before canceling queries
    					# when reading WAL from archive;
    					# -1 allows indefinite delay
    #max_standby_streaming_delay = 30s	# max delay before canceling queries
    					# when reading streaming WAL;
    					# -1 allows indefinite delay
    #wal_receiver_status_interval = 10s	# send replies at least this often
    					# 0 disables
    #hot_standby_feedback = off		# send info from standby to prevent
    					# query conflicts
     
     
    #------------------------------------------------------------------------------
    # QUERY TUNING
    #------------------------------------------------------------------------------
     
    # - Planner Method Configuration -
     
    #enable_bitmapscan = on
    #enable_hashagg = on
    #enable_hashjoin = on
    #enable_indexscan = on
    #enable_indexonlyscan = on
    #enable_material = on
    #enable_mergejoin = on
    #enable_nestloop = on
    #enable_seqscan = on
    #enable_sort = on
    #enable_tidscan = on
     
    # - Planner Cost Constants -
     
    #seq_page_cost = 1.0			# measured on an arbitrary scale
    #random_page_cost = 4.0			# same scale as above
    #cpu_tuple_cost = 0.01			# same scale as above
    #cpu_index_tuple_cost = 0.005		# same scale as above
    #cpu_operator_cost = 0.0025		# same scale as above
    #effective_cache_size = 128MB
     
    # - Genetic Query Optimizer -
     
    #geqo = on
    #geqo_threshold = 12
    #geqo_effort = 5			# range 1-10
    #geqo_pool_size = 0			# selects default based on effort
    #geqo_generations = 0			# selects default based on effort
    #geqo_selection_bias = 2.0		# range 1.5-2.0
    #geqo_seed = 0.0			# range 0.0-1.0
     
    # - Other Planner Options -
     
    #default_statistics_target = 100	# range 1-10000
    #constraint_exclusion = partition	# on, off, or partition
    #cursor_tuple_fraction = 0.1		# range 0.0-1.0
    #from_collapse_limit = 8
    #join_collapse_limit = 8		# 1 disables collapsing of explicit
    					# JOIN clauses
     
     
    #------------------------------------------------------------------------------
    # ERROR REPORTING AND LOGGING
    #------------------------------------------------------------------------------
     
    # - Where to Log -
     
    #log_destination = 'stderr'		# Valid values are combinations of
    					# stderr, csvlog, syslog, and eventlog,
    					# depending on platform.  csvlog
    					# requires logging_collector to be on.
     
    # This is used when logging to stderr:
    logging_collector = on			# Enable capturing of stderr and csvlog
    					# into log files. Required to be on for
    					# csvlogs.
    					# (change requires restart)
     
    # These are only used if logging_collector is on:
    #log_directory = 'pg_log'		# directory where log files are written,
    					# can be absolute or relative to PGDATA
    log_filename = 'postgresql-%a.log'	# log file name pattern,
    					# can include strftime() escapes
    #log_file_mode = 0600			# creation mode for log files,
    					# begin with 0 to use octal notation
    log_truncate_on_rotation = on		# If on, an existing log file with the
    					# same name as the new log file will be
    					# truncated rather than appended to.
    					# But such truncation only occurs on
    					# time-driven rotation, not on restarts
    					# or size-driven rotation.  Default is
    					# off, meaning append to existing files
    					# in all cases.
    log_rotation_age = 1d			# Automatic rotation of logfiles will
    					# happen after that time.  0 disables.
    log_rotation_size = 0			# Automatic rotation of logfiles will
    					# happen after that much log output.
    					# 0 disables.
     
    # These are relevant when logging to syslog:
    #syslog_facility = 'LOCAL0'
    #syslog_ident = 'postgres'
     
    # This is only relevant when logging to eventlog (win32):
    #event_source = 'PostgreSQL'
     
    # - When to Log -
     
    #client_min_messages = notice		# values in order of decreasing detail:
    					#   debug5
    					#   debug4
    					#   debug3
    					#   debug2
    					#   debug1
    					#   log
    					#   notice
    					#   warning
    					#   error
     
    #log_min_messages = warning		# values in order of decreasing detail:
    					#   debug5
    					#   debug4
    					#   debug3
    					#   debug2
    					#   debug1
    					#   info
    					#   notice
    					#   warning
    					#   error
    					#   log
    					#   fatal
    					#   panic
     
    #log_min_error_statement = error	# values in order of decreasing detail:
    				 	#   debug5
    					#   debug4
    					#   debug3
    					#   debug2
    					#   debug1
    				 	#   info
    					#   notice
    					#   warning
    					#   error
    					#   log
    					#   fatal
    					#   panic (effectively off)
     
    #log_min_duration_statement = -1	# -1 is disabled, 0 logs all statements
    					# and their durations, > 0 logs only
    					# statements running at least this number
    					# of milliseconds
     
     
    # - What to Log -
     
    #debug_print_parse = off
    #debug_print_rewritten = off
    #debug_print_plan = off
    #debug_pretty_print = on
    #log_checkpoints = off
    #log_connections = off
    #log_disconnections = off
    #log_duration = off
    #log_error_verbosity = default		# terse, default, or verbose messages
    #log_hostname = off
    #log_line_prefix = ''			# special values:
    					#   %a = application name
    					#   %u = user name
    					#   %d = database name
    					#   %r = remote host and port
    					#   %h = remote host
    					#   %p = process ID
    					#   %t = timestamp without milliseconds
    					#   %m = timestamp with milliseconds
    					#   %i = command tag
    					#   %e = SQL state
    					#   %c = session ID
    					#   %l = session line number
    					#   %s = session start timestamp
    					#   %v = virtual transaction ID
    					#   %x = transaction ID (0 if none)
    					#   %q = stop here in non-session
    					#        processes
    					#   %% = '%'
    					# e.g. '<%u%%%d> '
    # Django : 2017-01-09
    # default: unset
    log_line_prefix = '%t %u %d'
    #log_lock_waits = off			# log lock waits >= deadlock_timeout
    #log_statement = 'none'			# none, ddl, mod, all
    #log_temp_files = -1			# log temporary files equal or larger
    					# than the specified size in kilobytes;
    					# -1 disables, 0 logs all temp files
    log_timezone = 'Europe/Berlin'
     
     
    #------------------------------------------------------------------------------
    # RUNTIME STATISTICS
    #------------------------------------------------------------------------------
     
    # - Query/Index Statistics Collector -
     
    #track_activities = on
    #track_counts = on
    #track_io_timing = off
    #track_functions = none			# none, pl, all
    #track_activity_query_size = 1024 	# (change requires restart)
    #update_process_title = on
    #stats_temp_directory = 'pg_stat_tmp'
     
     
    # - Statistics Monitoring -
     
    #log_parser_stats = off
    #log_planner_stats = off
    #log_executor_stats = off
    #log_statement_stats = off
     
     
    #------------------------------------------------------------------------------
    # AUTOVACUUM PARAMETERS
    #------------------------------------------------------------------------------
     
    #autovacuum = on			# Enable autovacuum subprocess?  'on'
    					# requires track_counts to also be on.
    #log_autovacuum_min_duration = -1	# -1 disables, 0 logs all actions and
    					# their durations, > 0 logs only
    					# actions running at least this number
    					# of milliseconds.
    #autovacuum_max_workers = 3		# max number of autovacuum subprocesses
    					# (change requires restart)
    #autovacuum_naptime = 1min		# time between autovacuum runs
    #autovacuum_vacuum_threshold = 50	# min number of row updates before
    					# vacuum
    #autovacuum_analyze_threshold = 50	# min number of row updates before
    					# analyze
    #autovacuum_vacuum_scale_factor = 0.2	# fraction of table size before vacuum
    #autovacuum_analyze_scale_factor = 0.1	# fraction of table size before analyze
    #autovacuum_freeze_max_age = 200000000	# maximum XID age before forced vacuum
    					# (change requires restart)
    #autovacuum_vacuum_cost_delay = 20ms	# default vacuum cost delay for
    					# autovacuum, in milliseconds;
    					# -1 means use vacuum_cost_delay
    #autovacuum_vacuum_cost_limit = -1	# default vacuum cost limit for
    					# autovacuum, -1 means use
    					# vacuum_cost_limit
     
     
    #------------------------------------------------------------------------------
    # CLIENT CONNECTION DEFAULTS
    #------------------------------------------------------------------------------
     
    # - Statement Behavior -
     
    #search_path = '"$user",public'		# schema names
    #default_tablespace = ''		# a tablespace name, '' uses the default
    #temp_tablespaces = ''			# a list of tablespace names, '' uses
    					# only default tablespace
    #check_function_bodies = on
    #default_transaction_isolation = 'read committed'
    #default_transaction_read_only = off
    #default_transaction_deferrable = off
    #session_replication_role = 'origin'
    #statement_timeout = 0			# in milliseconds, 0 is disabled
    #vacuum_freeze_min_age = 50000000
    #vacuum_freeze_table_age = 150000000
    #bytea_output = 'hex'			# hex, escape
    #xmlbinary = 'base64'
    #xmloption = 'content'
    #gin_fuzzy_search_limit = 0
     
    # - Locale and Formatting -
     
    datestyle = 'iso, mdy'
    #intervalstyle = 'postgres'
    timezone = 'Europe/Berlin'
    #timezone_abbreviations = 'Default'     # Select the set of available time zone
    					# abbreviations.  Currently, there are
    					#   Default
    					#   Australia (historical usage)
    					#   India
    					# You can create your own file in
    					# share/timezonesets/.
    #extra_float_digits = 0			# min -15, max 3
    #client_encoding = sql_ascii		# actually, defaults to database
    					# encoding
     
    # These settings are initialized by initdb, but they can be changed.
    lc_messages = 'en_US.UTF-8'			# locale for system error message
    					# strings
    lc_monetary = 'en_US.UTF-8'			# locale for monetary formatting
    lc_numeric = 'en_US.UTF-8'			# locale for number formatting
    lc_time = 'en_US.UTF-8'				# locale for time formatting
     
    # default configuration for text search
    default_text_search_config = 'pg_catalog.english'
     
    # - Other Defaults -
     
    #dynamic_library_path = '$libdir'
    #local_preload_libraries = ''
     
     
    #------------------------------------------------------------------------------
    # LOCK MANAGEMENT
    #------------------------------------------------------------------------------
     
    #deadlock_timeout = 1s
    #max_locks_per_transaction = 64		# min 10
    					# (change requires restart)
    # Note:  Each lock table slot uses ~270 bytes of shared memory, and there are
    # max_locks_per_transaction * (max_connections + max_prepared_transactions)
    # lock table slots.
    #max_pred_locks_per_transaction = 64	# min 10
    					# (change requires restart)
     
     
    #------------------------------------------------------------------------------
    # VERSION/PLATFORM COMPATIBILITY
    #------------------------------------------------------------------------------
     
    # - Previous PostgreSQL Versions -
     
    #array_nulls = on
    #backslash_quote = safe_encoding	# on, off, or safe_encoding
    #default_with_oids = off
    #escape_string_warning = on
    #lo_compat_privileges = off
    #quote_all_identifiers = off
    #sql_inheritance = on
    #standard_conforming_strings = on
    #synchronize_seqscans = on
     
    # - Other Platforms and Clients -
     
    #transform_null_equals = off
     
     
    #------------------------------------------------------------------------------
    # ERROR HANDLING
    #------------------------------------------------------------------------------
     
    #exit_on_error = off			# terminate session on any error?
    #restart_after_crash = on		# reinitialize after backend crash?
     
     
    #------------------------------------------------------------------------------
    # CUSTOMIZED OPTIONS
    #------------------------------------------------------------------------------
     
    # Add settings for extensions here
  3. PostgreSQL Client Authentication Konfiguration
     # vim /var/lib/pgsql/data/pg_hba.conf
    /var/lib/pgsql/data/pg_hba.conf
    # PostgreSQL Client Authentication Configuration File
    # ===================================================
    #
    # Refer to the "Client Authentication" section in the PostgreSQL
    # documentation for a complete description of this file.  A short
    # synopsis follows.
    #
    # This file controls: which hosts are allowed to connect, how clients
    # are authenticated, which PostgreSQL user names they can use, which
    # databases they can access.  Records take one of these forms:
    #
    # local      DATABASE  USER  METHOD  [OPTIONS]
    # host       DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
    # hostssl    DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
    # hostnossl  DATABASE  USER  ADDRESS  METHOD  [OPTIONS]
    #
    # (The uppercase items must be replaced by actual values.)
    #
    # The first field is the connection type: "local" is a Unix-domain
    # socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
    # "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
    # plain TCP/IP socket.
    #
    # DATABASE can be "all", "sameuser", "samerole", "replication", a
    # database name, or a comma-separated list thereof. The "all"
    # keyword does not match "replication". Access to replication
    # must be enabled in a separate record (see example below).
    #
    # USER can be "all", a user name, a group name prefixed with "+", or a
    # comma-separated list thereof.  In both the DATABASE and USER fields
    # you can also write a file name prefixed with "@" to include names
    # from a separate file.
    #
    # ADDRESS specifies the set of hosts the record matches.  It can be a
    # host name, or it is made up of an IP address and a CIDR mask that is
    # an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
    # specifies the number of significant bits in the mask.  A host name
    # that starts with a dot (.) matches a suffix of the actual host name.
    # Alternatively, you can write an IP address and netmask in separate
    # columns to specify the set of hosts.  Instead of a CIDR-address, you
    # can write "samehost" to match any of the server's own IP addresses,
    # or "samenet" to match any address in any subnet that the server is
    # directly connected to.
    #
    # METHOD can be "trust", "reject", "md5", "password", "gss", "sspi",
    # "krb5", "ident", "peer", "pam", "ldap", "radius" or "cert".  Note that
    # "password" sends passwords in clear text; "md5" is preferred since
    # it sends encrypted passwords.
    #
    # OPTIONS are a set of options for the authentication in the format
    # NAME=VALUE.  The available options depend on the different
    # authentication methods -- refer to the "Client Authentication"
    # section in the documentation for a list of which options are
    # available for which authentication methods.
    #
    # Database and user names containing spaces, commas, quotes and other
    # special characters must be quoted.  Quoting one of the keywords
    # "all", "sameuser", "samerole" or "replication" makes the name lose
    # its special character, and just match a database or username with
    # that name.
    #
    # This file is read on server startup and when the postmaster receives
    # a SIGHUP signal.  If you edit the file on a running system, you have
    # to SIGHUP the postmaster for the changes to take effect.  You can
    # use "pg_ctl reload" to do that.
     
    # Put your actual configuration here
    # ----------------------------------
    #
    # If you want to allow non-local connections, you need to add more
    # "host" records.  In that case you will also need to make PostgreSQL
    # listen on a non-local interface via the listen_addresses
    # configuration parameter, or via the -i or -h command line switches.
     
     
     
    # TYPE  DATABASE        USER            ADDRESS                 METHOD
     
    # Django : 2017-01-09
    # default: # "local" is for Unix domain socket connections only
    #          local   all             all                                     peer
    #          # IPv4 local connections:
    #          host    all             all             127.0.0.1/32            ident
    #          # IPv6 local connections:
    #          host    all             all             ::1/128                 ident
    #
    # "local" is for Unix domain socket connections only
    local   all             all                                     peer
    # IPv4 local connections:
    host    all             all             127.0.0.1/32            md5
    # IPv6 local connections:
    host    all             all             ::1/128                 md5
    # Allow replication connections from localhost, by a user with the
    # replication privilege.
    #local   replication     postgres                                peer
    #host    replication     postgres        127.0.0.1/32            ident
    #host    replication     postgres        ::1/128                 ident
  4. Datenbank Initialisieren
     # service postgresql initdb 
  5. Datenbank-Daemon starten
     # systemctl start postgresql.service
  6. Status des Datenbank-Daemon abfragen
     # systemctl status postgresql.service

    postgresql.service - PostgreSQL database server
       Loaded: loaded (/usr/lib/systemd/system/postgresql.service; disabled; vendor preset: disabled)
       Active: active (running)  since Mon 2017-01-09 14:33:02 CET; 5s ago
      Process: 15243 ExecStart=/usr/bin/pg_ctl start -D ${PGDATA} -s -o -p ${PGPORT} -w -t 300 (code=exited, status=0/SUCCESS)
      Process: 15237 ExecStartPre=/usr/bin/postgresql-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
       CGroup: /system.slice/postgresql.service
               ├─15247 /usr/bin/postgres -D /var/lib/pgsql/data -p 5432
               ├─15248 postgres: logger process   
               ├─15250 postgres: checkpointer process   
               ├─15251 postgres: writer process   
               ├─15252 postgres: wal writer process   
               ├─15253 postgres: autovacuum launcher process   
               └─15254 postgres: stats collector process   
    
    Jan 09 14:33:01 vml000127.dmz.nausch.org systemd[1]: Starting PostgreSQL database server...
    Jan 09 14:33:02 vml000127.dmz.nausch.org systemd[1]: Started PostgreSQL database server.
    

  7. Datenbank-Daemon Systemstart aktivieren
     # systemctl enable postgresql.service
    Created symlink from /etc/systemd/system/multi-user.target.wants/postgresql.service to /usr/lib/systemd/system/postgresql.service.
  8. Datenbank-Systemuser erstellen:
     # su - postgres 
     $ psql -c "alter user postgres with password 'P|r@t3np@rt31'"
    ALTER ROLE
  9. StormForce XR _ Datenbanknutzer anlegen:
      % createdb stormforce_xr
      % psql stormforce_xr
     $ psql
    psql (8.4.9)
    Type "help" for help.
    
    postgres=#
     =# CREATE USER stormforce_user WITH password 'Danny_Knaggs_is_a_geek';
    CREATE ROLE
     =# GRANT ALL PRIVILEGES ON DATABASE stormforce_xr TO stormforce_user;
    GRANT
     =# \q
  10. Datenbanktabelle(n) anzeigen:
    $ psql -l
                                        List of databases
         Name      |  Owner   | Encoding |  Collation  |    Ctype    |   Access privileges   
    ---------------+----------+----------+-------------+-------------+-----------------------
     postgres      | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | 
     stormforce_xr | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =Tc/postgres
                                                                     : postgres=CTc/postgres
                                                                     : stormforce_user
                                                                     : =CTc/postgres
     template0     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
                                                                     : postgres=CTc/postgres
     template1     | postgres | UTF8     | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
                                                                     : postgres=CTc/postgres
    (4 rows)

Als nächstes überprüfen wir, ob der zuvor angelegt User/Zugang auch funktioniert.

 $ psql -h localhost -d stormforce_xr -U stormforce_user -W
 Password for user weather:
psql (8.4.9)
Type "help" for help.

stormforce_xr=>
stormforce_xr=> \q

erster manueller Start

Nun ist es an der Zeit, stormforce-xr das erste mal zu starten. Als erstes starten wir mal den Server-Part der Anwendung an:

 $ cd /usr/local/src/stormforce-xr
 $ python sxr_server.py

09/01/2017 15:22:48.324777/Main/__init__()/Info  - Displaying license for DanLog...
09/01/2017 15:22:48.347137/Main/__init__()/Info  - 
#########################################################################
# Copyright/License Notice (BSD License)                                #
#########################################################################
#########################################################################
# Copyright (c) 2012-2014, Daniel Knaggs                                #
# All rights reserved.                                                  #
#                                                                       #
# Redistribution and use in source and binary forms, with or without    #
# modification, are permitted provided that the following conditions    #
# are met: -                                                            #
#                                                                       #
#   * Redistributions of source code must retain the above copyright    #
#     notice, this list of conditions and the following disclaimer.     #
#                                                                       #
#   * Redistributions in binary form must reproduce the above copyright #
#     notice, this list of conditions and the following disclaimer in   #
#     the documentation and/or other materials provided with the        #
#     distribution.                                                     #
#                                                                       #
#   * Neither the name of the author nor the names of its contributors  #
#     may be used to endorse or promote products derived from this      #
#     software without specific prior written permission.               #
#                                                                       #
# 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.  #
#########################################################################

09/01/2017 15:22:48.347895/Main/__init__()/Info  - DanLog has been initialised.
09/01/2017 15:22:48.348570/Main/info()/Info  - Prepearing...
09/01/2017 15:22:48.352613/SXR/__init__()/Info  - Displaying license for DanLog...
09/01/2017 15:22:48.353421/SXR/__init__()/Info  - 
#########################################################################
# Copyright/License Notice (BSD License)                                #
#########################################################################
#########################################################################
# Copyright (c) 2012-2014, Daniel Knaggs                                #
# All rights reserved.                                                  #
#                                                                       #
# Redistribution and use in source and binary forms, with or without    #
# modification, are permitted provided that the following conditions    #
# are met: -                                                            #
#                                                                       #
#   * Redistributions of source code must retain the above copyright    #
#     notice, this list of conditions and the following disclaimer.     #
#                                                                       #
#   * Redistributions in binary form must reproduce the above copyright #
#     notice, this list of conditions and the following disclaimer in   #
#     the documentation and/or other materials provided with the        #
#     distribution.                                                     #
#                                                                       #
#   * Neither the name of the author nor the names of its contributors  #
#     may be used to endorse or promote products derived from this      #
#     software without specific prior written permission.               #
#                                                                       #
# 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.  #
#########################################################################

09/01/2017 15:22:48.354181/SXR/__init__()/Info  - DanLog has been initialised.

#########################################################################
# Copyright/License Notice (Modified BSD License)                       #
#########################################################################
#########################################################################
# Copyright (c) 2008-2012, 2014, Daniel Knaggs - 2E0DPK/M6DPK           #
# All rights reserved.                                                  #
#                                                                       #
# Redistribution and use in source and binary forms, with or without    #
# modification, are permitted provided that the following conditions    #
# are met: -                                                            #
#                                                                       #
#   * Redistributions of source code must retain the above copyright    #
#     notice, this list of conditions and the following disclaimer.     #
#                                                                       #
#   * Redistributions in binary form must reproduce the above copyright #
#     notice, this list of conditions and the following disclaimer in   #
#     the documentation and/or other materials provided with the        #
#     distribution.                                                     #
#                                                                       #
#   * Neither the name of the author nor the names of its contributors  #
#     may be used to endorse or promote products derived from this      #
#     software without specific prior written permission.               #
#                                                                       #
#   * 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.  #
#########################################################################

09/01/2017 15:22:48.355190/SXR/__init__()/Info  - 
09/01/2017 15:22:48.355930/SXR/__init__()/Info  - StormForce XR - Server
09/01/2017 15:22:48.356533/SXR/__init__()/Info  - ======================
09/01/2017 15:22:48.357138/SXR/__init__()/Info  - Checking settings...
09/01/2017 15:22:48.357820/SXR/__init__()/Warn  - The XML settings file doesn't exist, create one...
09/01/2017 15:22:48.360512/SXR/__init__()/Info  - The XML settings file has been created using the default settings.  Please edit it and restart the SXR server once you're happy with the settings.
09/01/2017 15:22:48.361206/Main/__init__()/Fatal  - global name 'exitProgram' is not defined

Server Konfigurationsdatei bearbeiten

Wie uns das Programm freundlich mitteilte, müssen wir nun noch die Server-XML-Konfigurationsdatei /usr/local/src/stormforce-xr/sxrserver-settings.xml bearbeiten.

 # vim /usr/local/src/stormforce-xr/sxrserver-settings.xml
/usr/local/src/stormforce-xr/sxrserver-settings.xml
<?xml version="1.0" ?>
<SXRServer>
        <Setting ServerPort="7397"/>
        <Setting LD250Port="/dev/ttyUSB2"/>
        <Setting LD250Speed="9600"/>
        <Setting LD250Bits="8"/>
        <Setting LD250Parity="N"/>
        <Setting LD250StopBits="1"/>
        <Setting LD250Squelch="14"/>
        <Setting LD250UseUncorrectedStrikes="False"/>
        <Setting EFM100Port=""/>
        <Setting EFM100Speed="9600"/>
        <Setting EFM100Bits="8"/>
        <Setting EFM100Parity="N"/>
        <Setting EFM100StopBits="1"/>
        <Setting PostgreSQLServer="localhost"/>
        <Setting PostgreSQLDatabase="stormforce_xr"/>
        <Setting PostgreSQLUsername="stormforce_user"/>
        <Setting PostgreSQLPassword="Danny_Knaggs_is_a_geek"/>
        <Setting CloseDistance="15"/>
        <Setting TRACDetectionMethod="0"/>
        <Setting TRACSensitivity="10"/>
        <Setting TRACStormWidth="30"/>
        <Setting TRACUpdateTime="2"/>
        <Setting StrikeCopyright="Lightning Data (CC BY-NC-SA 3.0) https://wetterstation-pliening.info - Django"/>
        <Setting DebugMode="False"/>
</SXRServer>

Server erneut manuell starten

Nachdem wir nun die Stormforce-XR konfigurationsdatei erstellt haben, werden wir nun erneut den Daemon manuell starten um zu sehen, ob alles glatt gelaufen ist oder ob noch Fehler in der Konfiguration und/oder Installation vorhanden sind.

 $ cd /usr/local/src/stormforce-xr
 $ python sxr_server.py

09/01/2017 16:25:19.913909/Main/__init__()/Info  - Displaying license for DanLog...
09/01/2017 16:25:19.936960/Main/__init__()/Info  - 
#########################################################################
# Copyright/License Notice (BSD License)                                #
#########################################################################
#########################################################################
# Copyright (c) 2012-2014, Daniel Knaggs                                #
# All rights reserved.                                                  #
#                                                                       #
# Redistribution and use in source and binary forms, with or without    #
# modification, are permitted provided that the following conditions    #
# are met: -                                                            #
#                                                                       #
#   * Redistributions of source code must retain the above copyright    #
#     notice, this list of conditions and the following disclaimer.     #
#                                                                       #
#   * Redistributions in binary form must reproduce the above copyright #
#     notice, this list of conditions and the following disclaimer in   #
#     the documentation and/or other materials provided with the        #
#     distribution.                                                     #
#                                                                       #
#   * Neither the name of the author nor the names of its contributors  #
#     may be used to endorse or promote products derived from this      #
#     software without specific prior written permission.               #
#                                                                       #
# 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.  #
#########################################################################

09/01/2017 16:25:19.937706/Main/__init__()/Info  - DanLog has been initialised.
09/01/2017 16:25:19.938639/Main/Info()/Info  - DanLog has been initialised.
09/01/2017 16:25:19.943155/SXR/__init__()/Info  - Displaying license for DanLog...
09/01/2017 16:25:19.944122/SXR/__init__()/Info  - 
#########################################################################
# Copyright/License Notice (BSD License)                                #
#########################################################################
#########################################################################
# Copyright (c) 2012-2014, Daniel Knaggs                                #
# All rights reserved.                                                  #
#                                                                       #
# Redistribution and use in source and binary forms, with or without    #
# modification, are permitted provided that the following conditions    #
# are met: -                                                            #
#                                                                       #
#   * Redistributions of source code must retain the above copyright    #
#     notice, this list of conditions and the following disclaimer.     #
#                                                                       #
#   * Redistributions in binary form must reproduce the above copyright #
#     notice, this list of conditions and the following disclaimer in   #
#     the documentation and/or other materials provided with the        #
#     distribution.                                                     #
#                                                                       #
#   * Neither the name of the author nor the names of its contributors  #
#     may be used to endorse or promote products derived from this      #
#     software without specific prior written permission.               #
#                                                                       #
# 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.  #
#########################################################################

09/01/2017 16:25:19.945046/SXR/__init__()/Info  - DanLog has been initialised.

#########################################################################
# Copyright/License Notice (Modified BSD License)                       #
#########################################################################
#########################################################################
# Copyright (c) 2008-2012, 2014, Daniel Knaggs - 2E0DPK/M6DPK           #
# All rights reserved.                                                  #
#                                                                       #
# Redistribution and use in source and binary forms, with or without    #
# modification, are permitted provided that the following conditions    #
# are met: -                                                            #
#                                                                       #
#   * Redistributions of source code must retain the above copyright    #
#     notice, this list of conditions and the following disclaimer.     #
#                                                                       #
#   * Redistributions in binary form must reproduce the above copyright #
#     notice, this list of conditions and the following disclaimer in   #
#     the documentation and/or other materials provided with the        #
#     distribution.                                                     #
#                                                                       #
#   * Neither the name of the author nor the names of its contributors  #
#     may be used to endorse or promote products derived from this      #
#     software without specific prior written permission.               #
#                                                                       #
#   * 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.  #
#########################################################################

09/01/2017 16:25:19.945867/SXR/main()/Info  - 
09/01/2017 16:25:19.946473/SXR/main()/Info  - StormForce XR - Server
09/01/2017 16:25:19.947078/SXR/main()/Info  - ======================
09/01/2017 16:25:19.947668/SXR/main()/Info  - Checking settings...
09/01/2017 16:25:19.948295/SXR/main()/Info  - Read XML settings...
09/01/2017 16:25:19.953875/SXR/main()/Info  - Setting up database...
09/01/2017 16:25:19.144698/Database/__init__()/Info  - Displaying license for DanLog...
09/01/2017 16:25:19.145704/Database/__init__()/Info  - Displaying license for DanLog...
#########################################################################
# Copyright/License Notice (BSD License)                                #
#########################################################################
#########################################################################
# Copyright (c) 2012-2014, Daniel Knaggs                                #
# All rights reserved.                                                  #
#                                                                       #
# Redistribution and use in source and binary forms, with or without    #
# modification, are permitted provided that the following conditions    #
# are met: -                                                            #
#                                                                       #
#   * Redistributions of source code must retain the above copyright    #
#     notice, this list of conditions and the following disclaimer.     #
#                                                                       #
#   * Redistributions in binary form must reproduce the above copyright #
#     notice, this list of conditions and the following disclaimer in   #
#     the documentation and/or other materials provided with the        #
#     distribution.                                                     #
#                                                                       #
#   * Neither the name of the author nor the names of its contributors  #
#     may be used to endorse or promote products derived from this      #
#     software without specific prior written permission.               #
#                                                                       #
# 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.  #
#########################################################################
09/01/2017 16:25:19.973263/Database/__init__()/Info  - DanLog has been initialised.
09/01/2017 16:25:19.980658/SXR/updateDatabase()/Info  - TABLE: tblElectricFieldStrength
09/01/2017 16:25:19.998964/SXR/updateDatabase()/Info  - TABLE: tblServerDetails
09/01/2017 16:25:20.090966/SXR/updateDatabase()/Info  - TABLE: tblStrikeCounter
09/01/2017 16:25:20.199443/SXR/updateDatabase()/Info  - TABLE: tblStrikes
09/01/2017 16:25:20.210034/SXR/updateDatabase()/Info  - TABLE: tblSystem
09/01/2017 16:25:20.217261/SXR/updateDatabase()/Info  - TABLE: tblTRACDetails
09/01/2017 16:25:20.226340/SXR/updateDatabase()/Info  - TABLE: tblTRACGrid
09/01/2017 16:25:20.369600/SXR/updateDatabase()/Info  - TABLE: tblTRACHeader
09/01/2017 16:25:20.383665/SXR/updateDatabase()/Info  - TABLE: tblTRACStatus
09/01/2017 16:25:20.508222/SXR/updateDatabase()/Info  - TABLE: tblTRACStorms
09/01/2017 16:25:20.608400/SXR/updateDatabase()/Info  - TABLE: tblUnitStatus
09/01/2017 16:25:20.709360/SXR/updateDatabase()/Info  - VIEW: vwStrikesPersistence
09/01/2017 16:25:20.717083/SXR/updateDatabase()/Info  - VIEW: vwStrikesSummaryByMinute
09/01/2017 16:25:20.725341/SXR/updateDatabase()/Info  - VIEW: vwTRACPersistence
09/01/2017 16:25:20.733775/SXR/updateDatabase()/Info  - VIEW: vwTRACStrikesPeak
09/01/2017 16:25:20.742286/SXR/updateDatabase()/Info  - VIEW: vwUnitStatus
09/01/2017 16:25:20.767233/SXR/updateDatabase()/Info  - INDEX: tblElectricFieldStrength_DateTimeOfMeasurement
09/01/2017 16:25:20.770518/SXR/updateDatabase()/Info  - INDEX: tblStrikes_X_Y
09/01/2017 16:25:20.772368/SXR/updateDatabase()/Info  - INDEX: tblStrikes_DateTimeOfStrike
09/01/2017 16:25:20.774208/SXR/updateDatabase()/Info  - INDEX: tblTRACDetails_HeaderID
09/01/2017 16:25:20.775993/SXR/updateDatabase()/Info  - INDEX: tblTRACGrid_X_Y
09/01/2017 16:25:20.777699/SXR/updateDatabase()/Info  - FUNCTION: fnTRAC
09/01/2017 16:25:20.792696/SXR/main()/Info  - Connecting to LD-250...
09/01/2017 16:25:20.792696/LD250/__init__()/Info  - Displaying license for DanLog...
09/01/2017 16:25:20.794416/LD250/__init__()/Info  - 
#########################################################################
# Copyright/License Notice (BSD License)                                #
#########################################################################
#########################################################################
# Copyright (c) 2012-2014, Daniel Knaggs                                #
# All rights reserved.                                                  #
#                                                                       #
# Redistribution and use in source and binary forms, with or without    #
# modification, are permitted provided that the following conditions    #
# are met: -                                                            #
#                                                                       #
#   * Redistributions of source code must retain the above copyright    #
#     notice, this list of conditions and the following disclaimer.     #
#                                                                       #
#   * Redistributions in binary form must reproduce the above copyright #
#     notice, this list of conditions and the following disclaimer in   #
#     the documentation and/or other materials provided with the        #
#     distribution.                                                     #
#                                                                       #
#   * Neither the name of the author nor the names of its contributors  #
#     may be used to endorse or promote products derived from this      #
#     software without specific prior written permission.               #
#                                                                       #
# 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.  #
#########################################################################

09/01/2017 16:25:20.795337/LD250/__init__()/Info  - DanLog has been initialised.
09/01/2017 16:25:20.796149/LD250/__init__()/Info  - Initialising LD-250...
09/01/2017 16:25:20.814863/LD250/setupUnit()/Info  - Setting squelch...
09/01/2017 16:25:20.844966/SXR/main()/Info  - Starting cron...
09/01/2017 16:25:20.846114/SXR/main()/Info  - Configuring server...
09/01/2017 16:25:20.846951/Database/__init__()/Info  - Displaying license for DanLog...
09/01/2017 16:25:20.847869/Database/__init__()/Info  - 
#########################################################################
# Copyright/License Notice (BSD License)                                #
#########################################################################
#########################################################################
# Copyright (c) 2012-2014, Daniel Knaggs                                #
# All rights reserved.                                                  #
#                                                                       #
# Redistribution and use in source and binary forms, with or without    #
# modification, are permitted provided that the following conditions    #
# are met: -                                                            #
#                                                                       #
#   * Redistributions of source code must retain the above copyright    #
#     notice, this list of conditions and the following disclaimer.     #
#                                                                       #
#   * Redistributions in binary form must reproduce the above copyright #
#     notice, this list of conditions and the following disclaimer in   #
#     the documentation and/or other materials provided with the        #
#     distribution.                                                     #
#                                                                       #
#   * Neither the name of the author nor the names of its contributors  #
#     may be used to endorse or promote products derived from this      #
#     software without specific prior written permission.               #
#                                                                       #
# 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.  #
#########################################################################

09/01/2017 16:25:20.916951/TRAC/__init__()/Info  - DanLog has been initialised.
09/01/2017 16:25:20.926951/TRAC/run()/Info  - TRAC has detected 0 storms.

Auf einer zweiten Konsole fragen wir die offenen Ports ab, de nun von den einzelnen Daemon gehalten werden.

 # netstat -tulpen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          21398      1423/sshd           
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      26         86650      15472/postgres      
tcp        0      0 0.0.0.0:7397            0.0.0.0:*               LISTEN      1000       124203     21457/python        

Der Port 7397 wird von dem Python Programmstormforce-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 /etc/systemd/system/ an.

 # vim /etc/systemd/system/stormforce-xr.service
/etc/systemd/system/stormforce-xr.service
[Unit]
Description=Stormforce XR Server Daemo
After=postgresql.service
 
[Service]
ExecStart=/usr/bin/python /usr/local/src/stormforce-xr/sxr_server.py
#Restart=on-abort
 
[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 /usr/local/src/stormforce-xr/. Diesen Pfad hinterlegen wir nun im Startscript des Servers. In Zeile 665 finden wir den Eintrag self.XML_SETTINGS_FILE = „sxrserver-settings.xml“; Diesen erweitern wir nun um das vollständige Verzeichnis /usr/local/src/stormforce-xr/. Die Zeile lautet also nunmehr. self.XML_SETTINGS_FILE = „/usr/local/src/stormforce-xr/sxrserver-settings.xml“

 # vim /usr/local/src/stormforce-xr/sxr_server.py
...

                 self.XML_SETTINGS_FILE = "/usr/local/src/stormforce-xr/sxrserver-settings.xml"

...

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 /etc/systemd/system/multi-user.target.wants/stormforce-xr.service to /etc/systemd/system/stormforce-xr.service.

Den Serverstatus können wir wie gewohnt abfragen.

 # systemctl status stormforce-xr.service

stormforce-xr.service - Stormforce XR Server Daemo
   Loaded: loaded (/etc/systemd/system/stormforce-xr.service; disabled; vendor preset: disabled)
   Active: active (running)  since Mon 2017-01-09 18:52:46 CET; 5s ago
 Main PID: 22791 (python)
   CGroup: /system.slice/stormforce-xr.service
           └─22791 /usr/bin/python /usr/local/src/stormforce-xr/sxr_server.py

Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      #
Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, #
Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY #
Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   #
Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE #
Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  #
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]: 09/01/2017 18:52:48.157567/XRXMLRPCFunctions/__init__()/Info  - DanLog has been initialised.
Jan 09 18:52:48 vml000127.dmz.nausch.org python[22791]: 09/01/2017 18:52:48.158415/SXR/main()/Info  - Starting server...

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, wechseln in das Installationsverzeichnis und starten den Client mit python sxr_server.py.

 $ cd /usr/local/src/stormforce-xr
 $ python sxr_server.py

09/01/2017 19:12:45.766556/Main/__init__()/Info  - Displaying license for DanLog...
09/01/2017 19:12:45.772555/Main/__init__()/Info  - 
#########################################################################
# Copyright/License Notice (BSD License)                                #
#########################################################################
#########################################################################
# Copyright (c) 2012-2014, Daniel Knaggs                                #
# All rights reserved.                                                  #
#                                                                       #
# Redistribution and use in source and binary forms, with or without    #
# modification, are permitted provided that the following conditions    #
# are met: -                                                            #
#                                                                       #
#   * Redistributions of source code must retain the above copyright    #
#     notice, this list of conditions and the following disclaimer.     #
#                                                                       #
#   * Redistributions in binary form must reproduce the above copyright #
#     notice, this list of conditions and the following disclaimer in   #
#     the documentation and/or other materials provided with the        #
#     distribution.                                                     #
#                                                                       #
#   * Neither the name of the author nor the names of its contributors  #
#     may be used to endorse or promote products derived from this      #
#     software without specific prior written permission.               #
#                                                                       #
# 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.  #
#########################################################################

09/01/2017 19:12:45.773321/Main/__init__()/Info  - DanLog has been initialised.
09/01/2017 19:12:45.774004/Main/info()/Info  - Prepearing...
09/01/2017 19:12:45.813491/SXRClient/__init__()/Info  - Displaying license for DanLog...
09/01/2017 19:12:45.814349/SXRClient/__init__()/Info  - 
#########################################################################
# Copyright/License Notice (BSD License)                                #
#########################################################################
#########################################################################
# Copyright (c) 2012-2014, Daniel Knaggs                                #
# All rights reserved.                                                  #
#                                                                       #
# Redistribution and use in source and binary forms, with or without    #
# modification, are permitted provided that the following conditions    #
# are met: -                                                            #
#                                                                       #
#   * Redistributions of source code must retain the above copyright    #
#     notice, this list of conditions and the following disclaimer.     #
#                                                                       #
#   * Redistributions in binary form must reproduce the above copyright #
#     notice, this list of conditions and the following disclaimer in   #
#     the documentation and/or other materials provided with the        #
#     distribution.                                                     #
#                                                                       #
#   * Neither the name of the author nor the names of its contributors  #
#     may be used to endorse or promote products derived from this      #
#     software without specific prior written permission.               #
#                                                                       #
# 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.  #
#########################################################################

09/01/2017 19:12:45.815258/SXRClient/__init__()/Info  - DanLog has been initialised.

#########################################################################
# Copyright/License Notice (Modified BSD License)                       #
#########################################################################
#########################################################################
# Copyright (c) 2008-2012, 2014, Daniel Knaggs - 2E0DPK/M6DPK           #
# All rights reserved.                                                  #
#                                                                       #
# Redistribution and use in source and binary forms, with or without    #
# modification, are permitted provided that the following conditions    #
# are met: -                                                            #
#                                                                       #
#   * Redistributions of source code must retain the above copyright    #
#     notice, this list of conditions and the following disclaimer.     #
#                                                                       #
#   * Redistributions in binary form must reproduce the above copyright #
#     notice, this list of conditions and the following disclaimer in   #
#     the documentation and/or other materials provided with the        #
#     distribution.                                                     #
#                                                                       #
#   * Neither the name of the author nor the names of its contributors  #
#     may be used to endorse or promote products derived from this      #
#     software without specific prior written permission.               #
#                                                                       #
#   * 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.  #
#########################################################################

09/01/2017 19:12:45.816056/SXRClient/__init__()/Info  - 
09/01/2017 19:12:45.816672/SXRClient/__init__()/Info  - StormForce XR - Client
09/01/2017 19:12:45.817369/SXRClient/__init__()/Info  - ======================
09/01/2017 19:12:45.818004/SXRClient/__init__()/Info  - Checking settings...
09/01/2017 19:12:45.818641/SXRClient/__init__()/Warn  - The XML settings file doesn't exist, create one...
09/01/2017 19:12:45.820399/SXRClient/__init__()/Info  - The XML settings file has been created using the default settings.  Please edit it and restart the SXR client once you're happy with the settings.

Client Konfigurationsdatei bearbeiten

Das Programm hat uns freundlich daraufhin gewiesen, dass wir nun noch die Client-XML-Konfigurationsdatei /usr/local/src/stormforce-xr/sxrclient-settings.xml bearbeiten müssen.

 # vim /usr/local/src/stormforce-xr/sxrclient-settings.xml
/usr/local/src/stormforce-xr/sxrclient-settings.xml
<?xml version="1.0" ?>
<SXRClient>
        <Setting StormForceXRServer="http://127.0.0.1:7397/xmlrpc/"/>
        <Setting DemoMode="False"/>
        <Setting StrikeShape="1"/>
        <Setting ShowCrosshair="True"/>
        <Setting ShowRangeCircles="False"/>
        <Setting UpdatePeriodCapture="15.0"/>
        <Setting UpdatePeriodCurrentTime="1.0"/>
        <Setting UpdatePeriodEFM100="5.0"/>
        <Setting UpdatePeriodGraphs="60.0"/>
        <Setting UpdatePeriodLD250="2.0"/>
        <Setting UpdatePeriodStrikes="15.0"/>
        <Setting DebugMode="False"/>
</SXRClient>

Starten wir nun erneut unseren Client wird uns der erste Startbildschirm des StormForce XR Clients präsentiert.

Bild: Stormforce-XR Client

Mit der Taste „Q“ können wir das Programm wieder beenden.

Startscript für Programmstart

Für den Programmstart des Client erstellen wir uns erst einmal ein rudimentäres Shellscript, mit Hilfe dessen wir den Client später starten können.

 # vim /usr/local/bin/stormforce.sh
/usr/local/bin/stormforce.sh
#!/bin/sh
# Django : 2012-05-03 
# Schellscript zum vereinfachten Starten des StormForce Clients
 
cd /usr/local/src/stormforce-xr
python sxr_client.py

Zum Starten statten wir das Script nun noch mit den x-Dateirechten aus.

 # chmod +x /usr/local/bin/stormforce.sh

Starter anlegen

Zum Starten von Stormforce legen wir uns am Desktop einen entsprechenden Starter an. Das Icon ⇒ Legen wir am besten unter /usr/share/pixmaps/ ab.

  • Typ : Anwendung
  • Name : StormForce XR
  • Befehl : /usr/local/bin/stormforce.sh
  • Kommentar : Visualisierung des Boltek LD-250 mit StormForce XR

Kartenhintergrund

Einen passenden Kartenhintergrund können wir uns entweder über das freie Kartenprojekt von Openstreetmap, bei den Blue Marble Satellitenbilder der NASA, oder mit Hilfe des MapCreator 2.0 von primap erstellen. Genau in der Reihenfolge bin ich vorgegangen, bei letzterem bin ich dann auf Grund er schnellen, einfachen und guten Ergebnisse hängen geblieben.

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 map-300.png im Verzeichnis png ab.

 #  ll /usr/local/src/stormforce/png/
 -rw-r--r-- 1 root root 362544 28. Sep 11:36 map-300.png

Bild: Stromforce-XR mit individuellem Kartenhintergrund

storm2web.sh

Zum Kopieren unserer, von Stormforce alle 10 Sekunden akutalisierten, Bildschirmhardcopy auf unseren Webserver, legen wir ein kleines Shellscript an:

 # vim /usr/local/bin/storm2web.sh
/usr/local/bin/storm2web.sh
#!/bin/sh 
# Script zum "Hochladen" der Strormforce-Bilder auf den Webserver der NSS
# zur Weiterleitung an den virtuellen Host "Webcam"
# (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="/usr/local/src/stormforce-xr/capture/stormforce-xr.png"
ZIEL="10.0.0.20:/usr/local/var/wview/img/"
QUELLE2="/tmp/stormforce_small.png"
 
convert -geometry 280x183 $QUELLE $QUELLE2
rsync -av $QUELLE $ZIEL"stormforce_2.png"
rsync -av $QUELLE2 $ZIEL"stormforce_small.png"

Anschliessend versehen wir unser kleines shell-script noch mit dem „X“-Rechten.

 # chmod +x /usr/local/bin/storm2web.sh

In der crontab unseres Wetterusers hinterlegen wir nun eine Konfigurationszeile, damit das Script einmal pro Minute ausgeführt werden kann.

 $ crontab -e
# Django : 2017-01-09 - Alle 60 Sekunden das Stormforce-Bild auf den Webserver kopieren
*/1 * * * * /usr/local/bin/storm2web.sh

Links


1)
Stand Januar 2017
Diese Website verwendet Cookies. Durch die Nutzung der Website stimmen Sie dem Speichern von Cookies auf Ihrem Computer zu. Außerdem bestätigen Sie, dass Sie unsere Datenschutzbestimmungen gelesen und verstanden haben. Wenn Sie nicht einverstanden sind, verlassen Sie die Website.Weitere Information
  • wetter/boltek/stormforce_xr_c7.txt
  • Zuletzt geändert: 31.10.2023 18:40.
  • von 127.0.0.1