<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux | DXSdata</title>
	<atom:link href="https://www.dxsdata.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dxsdata.com</link>
	<description>Software &#124; Network &#124; Administration</description>
	<lastBuildDate>Fri, 13 Jul 2018 05:51:22 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>

<image>
	<url>https://www.dxsdata.com/wp-content/uploads/2023/08/cropped-logo-32x32.jpg</url>
	<title>Linux | DXSdata</title>
	<link>https://www.dxsdata.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>[:de]Ubuntu-Upgrade 14.04 -&gt; 16.04 -&gt; 18.04: Apache2 zeigt leere, weiße Seiten[:en]Ubuntu upgrade from 14.04 to 16.04 to 18.04 Apache2 showing blank pages[:]</title>
		<link>https://www.dxsdata.com/2018/07/ubuntu-upgrade-from-14-04-to-16-04-to-18-04-apache2-showing-blank-pages/</link>
					<comments>https://www.dxsdata.com/2018/07/ubuntu-upgrade-from-14-04-to-16-04-to-18-04-apache2-showing-blank-pages/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 13 Jul 2018 05:51:22 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://www.dxsdata.com/?p=2019</guid>

					<description><![CDATA[[:en] Scenario You are doing a Ubuntu LTS upgrade from 14.04. Having new 16.04 installed, everything seems fine, but after the upgrade to 18.04, Apache shows only blank pages for PHP sites. Even simple commands like phpinfo() do not work. The common log files do not show any information about it. Cause The general PHP [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]</p>
<h3>Scenario</h3>
<p>You are doing a Ubuntu LTS upgrade from 14.04. Having new 16.04 installed, everything seems fine, but after the upgrade to 18.04, Apache shows only blank pages for PHP sites. Even simple commands like phpinfo() do not work. The common log files do not show any information about it.</p>
<h3>Cause</h3>
<p>The general PHP upgrading process from 5 to 7 (and to 7.2) seems to not always work well.</p>
<p>For whatever reason, the Ubuntu upgrade process declares some Apache PHP library modules as obsolete and deletes them, or at least disables them. So you might finish the upgrade with Apache having not enabled any PHP library module at all.</p>
<h3>Quick Fix</h3>
<p>Re-enable the module:</p>
<blockquote><p>a2enmod php7.2</p></blockquote>
<h3>Details</h3>
<p>See /etc/apache2/mods-available directory to find the most recent available PHP module version.</p>
<p>If no PHP module is installed, run</p>
<blockquote><p>apt install libapache2-mod-php7.2</p></blockquote>
<p>See /etc/apache2/mods-enabled for potential dead links, then re-enable the module via above a2enmod command.</p>
<h4>Additional Note</h4>
<p>Ubuntu 18 upgrade also removes Let&#8217;s Encrypt&#8217;s certbot tool, you might have to <a href="https://certbot.eff.org/lets-encrypt/ubuntuartful-apache">reinstall it</a>.</p>
<p>&nbsp;[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2018/07/ubuntu-upgrade-from-14-04-to-16-04-to-18-04-apache2-showing-blank-pages/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Wechsel von HTTP auf HTTPS bei Websites, Apache als Reverse Proxy für Exchange Server verwenden[:en]Changing websites from HTTP to HTTPS, using Apache as Reverse Proxy for Exchange Server[:]</title>
		<link>https://www.dxsdata.com/2018/06/changing-websites-from-http-to-https-using-apache-as-reverse-proxy-for-exchange-server/</link>
					<comments>https://www.dxsdata.com/2018/06/changing-websites-from-http-to-https-using-apache-as-reverse-proxy-for-exchange-server/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 08 Jun 2018 21:27:28 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1999</guid>

					<description><![CDATA[[:en]Because of the EU GDPR / DSGVO regulations it is recommended to run websites secured with SSL certificates, therefore using port 443 instead of 80. But especially in small organizations the port 443 has already been used, in most cases for the various tools of MS Exchange Server. Changing to alternative ports for certain services globally often [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]Because of the EU GDPR / DSGVO regulations it is recommended to run websites secured with SSL certificates, therefore using port 443 instead of 80.</p>
<p>But especially in small organizations the port 443 has already been used, in most cases for the various tools of MS Exchange Server.</p>
<p>Changing to alternative ports for certain services globally often is de facto not realizable, so one solution can be a webserver&#8217;s reverse proxy feature which I will explain here.</p>
<p>This tutorial is tested with and should work with Ubuntu/Apache2 as public webserver, Windows 2016 Server for Exchange Server 2016 and Outlook 2016, using SSL certificates from <a href="https://letsencrypt.org/">Let&#8217;s Encrypt</a>.</p>
<p>&nbsp;</p>
<h2>Preparation</h2>
<p>Basically, our webserver will be our new public port 443 access point. It will handle all HTTPS web requests and will also forward data to Exchange if necessary.</p>
<p>So in the end, we need to have valid SSL certificates on the webserver and on the Exchange server. For Exchange, we copy the certificate from the webserver and import it (creating it &#8220;live&#8221; on Exchange is hardly possible in this case due to the webserver&#8217;s needed proxy settings).</p>
<h3>Router / Firewall</h3>
<p>In your router config, create a new NAT rule which allows you to quickly switch incoming port 443 forwarding from mailserver to webserver. Do not enable it at this point, we will need that later.</p>
<h3>DNS</h3>
<p>If you use external DNS providers with automatic HTTP(S) proxies to speed up your website like Cloudflare, you might want to disable it (at least the proxy features) for the time of the configuration process, as it can produces some unpredictable behaviour in combination with the browser cache, tests etc.</p>
<h3>Webserver / WordPress</h3>
<p>You might also want to temporarily disable plugins for first tests like WP Super Cache, Minify etc. to get immediate results of the changes.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h2>New configurations</h2>
<h3>Webserver</h3>
<p>First we install <a href="https://certbot.eff.org/">Let&#8217;s Encrypt&#8217;s Certbot </a>. Make a snapshot or backup before, then run it without any parameters. It shows a user friendly wizard which assists you in converting your existing Apache Virtual Hosts to SSL enabled websites. If everything runs fine, you have your websites easily prepared for HTTPS and Apache is configured automatically.</p>
<p><strong>Note for Cloudflare</strong></p>
<p>If you are using web cache/proxy services, certbot/letsencrypt might end with TLS handshake errors.</p>
<p>Workaround:</p>
<blockquote><p>certbot &#8211;preferred-challenges http</p></blockquote>
<p>&nbsp;</p>
<h4>Reverse Proxy for Exchange</h4>
<p>Create a new Apache configuration file for Exchange&#8217;s new reverse proxy:</p>
<pre title="/etc/apache2/sites-available/exchange-le-ssl.conf" class="lang:sh decode:true ">&lt;VirtualHost *:443&gt;

ServerName mail.example.com
ServerAlias autodiscover.example.com
ServerAdmin webmaster@example.com

ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined

Header always set X-Frame-Options SAMEORIGIN
Header set Server Apache
Header unset X-AspNet-Version
Header unset X-OWA-Version
Header unset X-Powered-By
RequestHeader unset Expect early

SetEnvIf User-Agent ".*MSIE.*" value BrowserMSIE
Header unset WWW-Authenticate
Header add WWW-Authenticate "Basic realm=mail.example.com"

ProxyRequests Off
ProxyPreserveHost On

SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off

#longer connection timeout to prevent activesync errors
ProxyPass / https://exchange2016.example.local/ connectiontimeout=600
ProxyPassReverse / https://exchange2016.example.local/

&lt;Directory /Microsoft-Server-ActiveSync&gt;
#attachment/activesync bugfix
SSLRenegBufferSize 31457280
&lt;/Directory&gt;

#charset e.g. for german special chars
AddDefaultCharset ISO-8859-1

DocumentRoot /var/www/html

&lt;Directory /&gt;
    Order deny,allow
    Deny from all
&lt;/Directory&gt;

&lt;Directory /var/www/html&gt;
    DirectoryIndex index.php index.html
    Options -Indexes +FollowSymLinks
    Order allow,deny
    Allow from all
&lt;/Directory&gt;

&lt;Proxy *&gt;
        SetEnv proxy-nokeepalive 1
        SetEnv force-proxy-request-1.0 1
        Order deny,allow
        Allow from all
&lt;/Proxy&gt;

  SSLEngine on

    BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
  # MSIE 7 and newer should be able to use keepalive
    BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
&lt;/VirtualHost&gt;</pre>
<p>We only need this reverse proxy on port 443, not 80.</p>
<p>Make sure you really use local server names (e.g. for ProxyPass) which are always resolved to the server&#8217;s local IP (not the firewall ot public IP)! If not sure, you can also use IP addresses, SSL certs are not checked at this point. Otherwise you might experience senseless loopbacks.</p>
<p>Enable the necessary Apache modules:</p>
<pre class="lang:sh decode:true ">a2enmod headers
a2enmod rewrite
a2enmod proxy_http
a2enmod ssl</pre>
<p>&nbsp;</p>
<p>Enable the new virtual host (<em>a2ensite exchange</em>).</p>
<p>Re-run <em>certbot</em>, it should append lines to the file, e.g. &#8220;SSLCertificateFile&#8221;, keyfile, chainfile etc.</p>
<p>Run &#8220;service apache2 reload&#8221; and check for errors.</p>
<h4>WordPress</h4>
<p>Change your site&#8217;s URLs to http<strong>s</strong>://www.example.com within the admin area.</p>
<h3>Mailserver</h3>
<p>In Exchange&#8217;s virtual directories, make sure you have basic authentification enabled (for OWA, EWS, &#8230;). Apache is <strong>not able to use NTLM mechanism</strong>, so we need this workaround. You can enable it either via Exchange Administrative Center -&gt; Server -&gt; Virtual Directories, or IIS, or Exchange Management Shell.</p>
<h3>Firewall</h3>
<p>Activate the new rule you created before, so port 443 is forwarded to your webserver instead of Exchange directly.</p>
<p>&nbsp;</p>
<h2>Tests</h2>
<p>Use Microsoft&#8217;s Analyzer to test Exchange connectivity features you need, e.g. Autodiscover, ActiveSync (e.g. mobile phones), Exchange Web Services (EWS) etc.</p>
<p>Check your Apache logfiles for connection errors (500, timeouts, &#8230;).</p>
<p>Check if your websites are loading fine via HTTPS URL in every browser. Parts of your sites might still contain HTTP links to scripts or graphics; in this case change the link to the more generic &#8220;//&#8221; to avoid browser warnings.</p>
<p>&nbsp;</p>
<h2>Refreshing certificates</h2>
<h3>Webserver</h3>
<p>Create a cronjob similar to this one:</p>
<pre class="lang:sh decode:true ">0 0 1 * * /usr/bin/certbot renew --preferred-challenges http &gt;&gt; /var/log/letsencrypt-renew.log
#(HTTP option only for e.g. Cloudflare)</pre>
<p>Because your Exchange Server also needs the certificate, but cannot request it itself any more, publish it on your webserver. Exchange will it download later for further processing.</p>
<pre title="/scripts/createExchangeCert.sh" class="lang:sh decode:true ">#!/bin/bash

PW=mypw
SHARE=/var/www/html/other
CERTPATH=/etc/letsencrypt/live
MAINDOMAIN=example.com #the first domain name letsencrypt uses (main CN)

#conversion for exchange
openssl pkcs12 -export -in $CERTPATH/$MAINDOMAIN/cert.pem -inkey $CERTPATH/$MAINDOMAIN/privkey.pem -out  $SHARE/exch.p12 -password pass:$PW</pre>
<p>Also create a cronjob for it, which runs a few minutes after <em>certbot</em>.</p>
<h3>Mailserver</h3>
<p>Create a PowerShell script which downloads the certificate from your webserver and imports it into Exchange Server:</p>
<pre title="c:\letsencrypt\import.ps1" class="lang:ps decode:true ">$CertPath="c:\letsencrypt\exch.p12"
$ImportPassword="mypw"

Add-PSSnapin *exchange* -ea 0

wget http://www/other/exch.p12 -OutFile $CertPath

$ImportPassword = ConvertTo-SecureString $ImportPassword -AsPlainText -Force

Import-ExchangeCertificate -FileName $CertPath -FriendlyName "example.com" -Password $ImportPassword -PrivateKeyExportable:$true | Enable-ExchangeCertificate -Services "SMTP, IMAP, POP, IIS" –force</pre>
<p>Also create a scheduled task for it to make it run e.g. twice a week.</p>
<p>Finally, you should have all your websites accessible via HTTP and HTTPS, and Exchange Server including OWA, ActiveSync etc. should work besides.</p>
<h2></h2>
<h2>References</h2>
<p>https://serverfault.com/questions/113026/apache-2-2-disable-reverse-proxy-on-location</p>
<p>https://znil.net/index.php?title=Apache2_als_Reverse_Proxy_f%C3%BCr_Exchange_2010_2013_inklusive_Outlook_Anywhere_RPC_over_http</p>
<p>https://testconnectivity.microsoft.com</p>
<p>https://www.msxfaq.de/internet/apache.htm</p>
<p>https://stackoverflow.com/questions/14814419/how-do-i-make-urls-case-insensitive-in-linux-server</p>
<p>https://github.com/phr0gz/Apache-reverse-proxy-for-Exchange-2010-2013-2016/blob/master/webmail.conf[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2018/06/changing-websites-from-http-to-https-using-apache-as-reverse-proxy-for-exchange-server/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Kodinerds IPTV mit Kodi PVR Simple Client / Tvheadend und EPG[:en]Kodinerds IPTV with Kodi PVR Simple Client / Tvheadend and EPG[:]</title>
		<link>https://www.dxsdata.com/2018/05/kodinerds-iptv-with-kodi-pvr-simple-client-tvheadend-and-epg/</link>
					<comments>https://www.dxsdata.com/2018/05/kodinerds-iptv-with-kodi-pvr-simple-client-tvheadend-and-epg/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 05 May 2018 14:32:32 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1994</guid>

					<description><![CDATA[[:de]Da generell nur noch sehr wenige brauchbare TV-Sender vorhanden sind, und die aus meiner Sicht &#8220;guten&#8221; Sender meist auch online gesehen werden können, ist es naheliegend IPTV zu verwenden und damit einiges an Aufwand, Hardware und Gebühren zu sparen. Kodinerds IPTV Die IPTV-Senderliste von Kodinerds ist kostenlos, völlig legal, wird regelmäßig aktualisiert und beinhaltet viele der [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:de]Da generell nur noch sehr wenige brauchbare TV-Sender vorhanden sind, und die aus meiner Sicht &#8220;guten&#8221; Sender meist auch online gesehen werden können, ist es naheliegend IPTV zu verwenden und damit einiges an Aufwand, Hardware und Gebühren zu sparen.</p>
<h2>Kodinerds IPTV</h2>
<p><a href="https://github.com/jnk22/kodinerds-iptv">Die IPTV-Senderliste von Kodinerds </a>ist kostenlos, völlig legal, wird regelmäßig aktualisiert und beinhaltet viele der bekannten TV-Sender, unter anderem aus Deutschland, Österreich und der Schweiz (z.B. ORF, ARD, ZDF, SF1 usw.).</p>
<p>&nbsp;</p>
<h2>Variante 1: Kodi mit PVR-Addon IPTV Simple Client</h2>
<p>Der einfachste Weg z.B. für erste Tests mit dem <a href="http://www.kodi.tv">Kodi</a> Mediacenter bietet sich über das Addon IPTV Simple Client, zu finden im offiziellen Kodi Addons-Repository unter &#8220;PVR-Clients&#8221;.</p>
<p>In der Addon-Konfiguration einfach die <a href="https://github.com/jnk22/kodinerds-iptv">entsprechende URL </a>angeben, danach füllt sich die Kodi TV-Ansicht mit Sendern.</p>
<h3>EPG</h3>
<p>Für das TV-Programm bietet sich das Addon <a href="https://www.kodinerds.net/index.php/Thread/45285-DEFEKT-RELEASE-Rytec-EPG-Downloader-f%C3%BCr-IPTV-Simple-PVR-Addon/">Rytec EPG Downloader</a> an, welches jedoch des öfteren als defekt gemeldet wird. Alternativ lassen sich die EPG-Daten auch manuell von <a href="http://rytecepg.ipservers.eu/epg_data/">http://rytecepg.ipservers.eu/epg_data/</a> oder <del>http://koditvepg.com/epgs/</del> http://xmltv.xmltv.se/ beziehen. Die XML-Datei nach dem Download entpacken und in dem IPTV Simple Client-Einstellungen angeben. Der Vorgang lässt sich natürlich auch über ein Shell-Skript automatisieren. Teilweise sind nach dem XML-Download noch einige Anpassungen in der Datei zu machen, um die automatische Senderzuordnung zu ermöglichen.</p>
<p>Beispiel: Bei österreichischen Senden ist teilweise in EPGs das Präfix &#8220;AT: &#8221; angegeben, welches entfernt werden muss, z.B. mit diesem Befehl im Skript:</p>
<pre class="lang:sh decode:true ">sed -i 's/AT: //g' /[mydownloadsfolder]/guide.xml</pre>
<p>&nbsp;</p>
<h2>Variante 2: Kodi-Client mit Tvheadend-Server</h2>
<p>Die weitaus flexiblere, jedoch etwas aufwändigere Variante bietet sich in Kombination mit Tvheadend (anstatt des Simple Client) an.</p>
<p>Vorteile:</p>
<ul>
<li>Saubere Trennung von Client und Server -&gt; sinnvoll, wenn es mehrere Kodi-Stationen im Haus gibt</li>
<li>Eigenständige, detailliertere Verwaltung von Senderlisten, Senderlogos, EPG-Daten, zentralisierte TV-Aufnahmen uvm.</li>
</ul>
<h3>Tvheadend-Server einrichten</h3>
<p><a href="http://tvheadend.org/projects/tvheadend/wiki/AptRepository">Tvheadend.org</a> und <a href="https://wiki.ubuntuusers.de/Tvheadend/">Ubuntuusers.de</a> bieten sehr gute Tutorials für die Installation an, daher werde ich nur eine Kurzanleitung für Ubuntu beschreiben.</p>
<ol>
<li><a href="https://www.ubuntu.com/download/server">Ubuntu Server</a> installieren; auf Hardware, in virtueller Maschine, oder alternativ auch Raspbian auf einem Raspberry Pi.</li>
<li>Tvheadend-Repositories lt. obiger Tutorial-Links hinzufügen und tvheadend-Paket installieren (&#8220;stable&#8221;-Zweig empfohlen).</li>
<li>Das Webinterface ist danach unter dem Port 9981 erreichbar.</li>
</ol>
<p>Zum Hinzufügen der Kodinerds IPTV-Listen einfach dem Wizard folgen und den entsprechenden Link angeben (Achtung: &#8220;<em>pipe</em>&#8220;-Listen verwenden!).</p>
<p>Weitere Listen können auch später hinzugefügt werden, über &#8220;Configuration -&gt; DVB Inputs -&gt; Networks&#8221;. Dies ist z.B. hilfreich, wenn die Kodinerds-<em>main</em>-Liste mit über 400 Kanälen zu unübersichtlich erscheint; in diesem Fall verwendet man z.B. die abgespeckte Senderliste für die deutschen Hauptsender, und zusätzlich die Liste der Österreich- und Schweiz-Kanäle.</p>
<p>Nach Ergänzung einer Liste den vollständigen Scan abwarten und prüfen, ob die Sender im Bereich &#8220;Muxes&#8221; und &#8220;Services&#8221; aufscheinen; ggf. Services -&gt; &#8220;Map all services&#8221; ausführen.</p>
<h4>Debugging</h4>
<p>Tvheadend läuft &#8211; vor allem während der Konfiguration &#8211; nicht immer perfekt, meist sind jedoch Probleme nach Neustart des Dienstes behoben:</p>
<blockquote><p>sudo service tvheadend restart</p></blockquote>
<p>Unter /var/log/syslog befinden sich unter anderem auch die Tvheadend-Logs.</p>
<h4>EPG</h4>
<p>Es gibt zahlreiche Wege für die EPG-Aktualisierung. Eine mögliche Variante:</p>
<ol>
<li><del>Tvheadend -&gt; Configuration -&gt; Channel / EPG -&gt; EPG Grabber Modules -&gt; &#8220;External: XMLTV&#8221; aktivieren; alle anderen Module deaktivieren.</del></li>
<li><del>Skript erstellen (Variablen und evtl. den sed-Befehl für andere Länder anpassen):</del>
<ol>
<li>
<pre title="epgupdate.sh" class="lang:sh decode:true"><del>#!/bin/bash

HOME=/home/hts
XML=$HOME/guide.xml
URL=http://epg.koditvepg.com/AT/guide.xml
SOCKET=/home/hts/.hts/tvheadend/epggrab/xmltv.sock

rm $XML*
echo "$(date) Download starting..."
wget $URL -P $HOME -nv
sed -i 's/AT: //g' $XML
cat $XML | sudo socat - UNIX-CONNECT:$SOCKET
echo "$(date) EPG update finished."
</del></pre>
<p>&nbsp;</li>
<li><del>Berechtigungen anpassen (<em>chmod +x epgupdate.sh</em>) und ausführen; nach kurzer Zeit sollten die EPG-Infos unter Tvheadend -&gt; &#8220;Electronic Program Guide&#8221; sichtbar sein.</del></li>
<li><del>Evtl. zur täglichen Ausführung als Cronjob anlegen (<em>crontab -e</em>).</del></li>
</ol>
</li>
</ol>
<h5>Update 11.2019</h5>
<p>koditvepg.com ist mittlerweile kostenpflichtig.</p>
<p>Aktuell funktionierende &#8211; und kostenlose &#8211; Variante für den deutschsprachigen Raum:</p>
<ul>
<li>EPG-Grabbermodul &#8220;XMLTV: German speaking area (Egon zappt)&#8221; in der Weboberfläche aktivieren, Standardeinstellungen belassen. Alle anderen Module deaktivieren.</li>
<li>Konfigurieren des Moduls per SSH:
<ul>
<li>
<pre class="lang:sh decode:true ">su hts
tv_grab_eu_egon --configure
#Standard-Url
#Einzelne Sender aktivieren, oder alle</pre>
<p>&nbsp;</li>
</ul>
</li>
<li>Ausführen z.B. per Reboot, Service-Restart oder &#8220;Re-Run&#8221;-Button; dabei /var/log/syslog beobachten.</li>
<li>Sollte sich EPG nicht aktualisieren, Service stoppen, Cache löschen (/home/hts/.hts/tvheadend/epgdb.v2) und wieder starten.</li>
</ul>
<h3>Kodi-Client einrichten</h3>
<p>Abschließend das Kodi-Addon &#8220;PVR Tvheadend&#8221; am Client installieren, aktivieren und konfigurieren.</p>
<p>IP oder DNS-Name des Tvheadend-Servers angeben und optional die gewählten Zugangsdaten, mit denen sich Kodi zum TV-Server verbinden darf.</p>
<p>Danach erscheint, wie auch in Variante 1, die gewohnte TV-Senderliste mit EPG in Kodi.</p>
<p>&nbsp;[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2018/05/kodinerds-iptv-with-kodi-pvr-simple-client-tvheadend-and-epg/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Raspberry Pi: SSH vor dem ersten Booten aktivieren[:en]Raspberry Pi: Enable SSH before first boot[:]</title>
		<link>https://www.dxsdata.com/2017/11/raspberry-pi-enable-ssh-before-first-boot/</link>
					<comments>https://www.dxsdata.com/2017/11/raspberry-pi-enable-ssh-before-first-boot/#comments</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 06 Nov 2017 13:58:22 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1901</guid>

					<description><![CDATA[[:en]When you copy a fresh Rasbian &#8220;Lite&#8221; image (headless, i.e. only terminal) to your Pi&#8217;s SD card (e.g. with Win32DiskImager), you might would like to enable SSH by default. Otherwise, you would have to connect at least a separate HDMI monitor and a keyboard to enable it. Solution Within the boot partition of the SD card (which can [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]When you copy a fresh Rasbian &#8220;Lite&#8221; image (headless, i.e. only terminal) to your Pi&#8217;s SD card (e.g. with Win32DiskImager), you might would like to enable SSH by default. Otherwise, you would have to connect at least a separate HDMI monitor and a keyboard to enable it.</p>
<p><strong>Solution</strong></p>
<p>Within the boot partition of the SD card (which can also be accessed via Windows Explorer), create a simple file called &#8220;<strong>ssh</strong>&#8221; (no extension!).</p>
<p>When you boot Raspian afterwards, you can easily log in with default user &#8220;pi&#8221; and password &#8220;raspberry&#8221;.</p>
<p><a href="https://hackernoon.com/raspberry-pi-headless-install-462ccabd75d0">Reference</a>[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2017/11/raspberry-pi-enable-ssh-before-first-boot/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Mikrotik RouterOS über SSH und OpenHAB steuern[:en]Remote controlling Mikrotik RouterOS with SSH and OpenHAB 2[:]</title>
		<link>https://www.dxsdata.com/2017/08/remote-controlling-mikrotik-routeros-with-ssh-and-openhab-2/</link>
					<comments>https://www.dxsdata.com/2017/08/remote-controlling-mikrotik-routeros-with-ssh-and-openhab-2/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Mon, 07 Aug 2017 12:45:18 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1860</guid>

					<description><![CDATA[[:en]&#160; In a previous post, I explained how to set up Mikrotik Routerboards as a VPN gateway. This post is about how to remotely switch the VPN on and off via Smart Home visualization OpenHAB 2, so it affects your whole LAN. You can even switch to other VPN servers, conveniently via phone or browser [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]&nbsp;</p>
<p>In a <a href="https://www.dxsdata.com/2017/04/ipvanish-vpn-with-mikrotik-routeros/">previous post</a>, I explained how to set up Mikrotik Routerboards as a VPN gateway.</p>
<p>This post is about how to remotely switch the VPN on and off via Smart Home visualization OpenHAB 2, so it affects your whole LAN. You can even switch to other VPN servers, conveniently via phone or browser interface.</p>
<p>Basic procedure: User starts a command via OpenHAB interface -&gt; SSH commands are executed via shell -&gt; RouterOS accepts the commands.</p>
<h3>SSH preparation</h3>
<p>First we need to establish a simple and secure connection between your server (e.g. Ubuntu, running OpenHAB) and your routerboard, which can be used in scripts without passwords.</p>
<p>On your OH server, execute:</p>
<pre class="lang:sh decode:true ">su - openhab -s /bin/bash #the Linux user which is running the OpenHAB process
mkdir /ssh-mikrotik
cd /ssh-mikrotik
ssh-keygen -t rsa #as location, choose /ssh-mikrotik/id_rsa
</pre>
<p>Copy the file /ssh-mikrotik/id_rsa<strong>.pub </strong>to your Mikrotik device, e.g. via WinSCP and RouterOS WinBox (or FTP / terminal).</p>
<p>Then open WinBox -&gt; System -&gt; Users and create a user &#8220;openhab&#8221; with full permissions. If you want, restrict it to a certain IP address.</p>
<p>In &#8220;SSH keys&#8221; tab, import the file id_rsa.pub you copied before, and assign it to Mikrotik user &#8220;openhab&#8221;.</p>
<p>Test the SSH connection on your OH server:</p>
<pre class="lang:sh decode:true">ssh -l openhab -i /ssh-mikrotik/id_rsa 10.1.0.11 "echo asdf" # assuming 10.1.0.11 is your RouterOS device</pre>
<p>&nbsp;</p>
<h3>Scripts</h3>
<p>You need some scripts on your OH server to get the VPN state and be able to control it.</p>
<pre title="/ssh-mikrotik/vpn-control.sh" class="lang:sh decode:true ">#!/bin/bash

if [ "$1" = "ON" ]
then
        echo "enabling vpn"
        ssh -l openhab -i /ssh-mikrotik/id_rsa 10.1.0.11 "/interface pptp-client enable myvpn" #assuming your VPN runs via PPTP and is called "myvpn"
fi

if [ "$1" = "OFF" ]
then
        echo "disabling vpn"
        ssh -l openhab -i /ssh-mikrotik/id_rsa 10.1.0.11 "/interface pptp-client disable myvpn"
fi</pre>
<p>&nbsp;</p>
<pre title="/ssh-mikrotik/vpn-status.php" class="lang:php decode:true">&lt;?php

$result = `ssh -l openhab -i /ssh-mikrotik/id_rsa  10.1.0.11 "/interface pptp-client print where name=myvpn"`;

#echo $result;

$lines = explode("\n", $result);

//offline?
if (count($lines) &lt; 5)
{
        echo "error";
        exit;
}

$line = $lines[1];

$expl = explode(" ",$line);

#var_dump($expl);

if ($expl[3] == "R")
{
        echo "ON";
}
else
{
        echo "OFF";
}

?&gt;
</pre>
<p>Make both scripts executable by the openhab user:</p>
<pre class="lang:sh decode:true">chmod a+x openhab /ssh-mikrotik/vpn-*</pre>
<p>You can later extend these scripts e.g. to be able to switch to another VPN host. Use the commands like in WinBox terminal, e.g. &#8220;/interface pptp-client set myvpn connect-to=example.com&#8221;.</p>
<p>Execute the scripts in your OH server&#8217;s shell manually to see if they work (they must be able to run under user openhab).</p>
<h3>OpenHAB2 configuration</h3>
<p>The last step is to configure OH visualization.</p>
<p>We use the Exec binding for OH2, so make sure it is enabled in runtime.cfg (or in your preferred OH admin interface).</p>
<pre title="demo.things" class="lang:sh decode:true">Thing exec:command:Vpn-Control [command="/ssh-mikrotik/vpn-control.sh %2$s", interval=0, autorun=true] 
Thing exec:command:Vpn-Status [command="/usr/bin/php /ssh-mikrotik/vpn-status.php", interval=3600, timeout=15]</pre>
<pre title="demo.items" class="lang:sh decode:true">String VPN "VPN" &lt;network&gt; (All) { channel="exec:command:Vpn-Control:input", channel="exec:command:Vpn-Status:output", autoupdate="true"}</pre>
<pre title="demo.sitemap" class="lang:sh decode:true ">Switch item=VPN</pre>
<p>You should now be able to control your VPN interface via OpenHAB:</p>
<p><img decoding="async" class="alignnone size-full wp-image-1863 " src="https://www.dxsdata.com/wp-content/uploads/2017/08/img_59885fff9ef2b.png" alt="" />[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2017/08/remote-controlling-mikrotik-routeros-with-ssh-and-openhab-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Magento Commerce: Kunden-Emailadressen beim Checkout einschränken / Adminzugang limitieren[:en]Magento Commerce: Restrict customer email addresses at checkout / Limit admin access[:]</title>
		<link>https://www.dxsdata.com/2017/06/magento-commerce-restrict-customer-email-addresses-at-checkout-limit-admin-access/</link>
					<comments>https://www.dxsdata.com/2017/06/magento-commerce-restrict-customer-email-addresses-at-checkout-limit-admin-access/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 08 Jun 2017 18:07:10 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1797</guid>

					<description><![CDATA[[:en]Fake orders by guest customers (or robots) in Magento shops can become quite annoying, some bots are even able to solve or skip the shop&#8217;s captcha codes. Decline disposable email domains To add another obstacle for bots and to make the checkout process not more complex than needed, I added some additional code in Magento&#8217;s root directory. It [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]Fake orders by guest customers (or robots) in Magento shops can become quite annoying, some bots are even able to solve or skip the shop&#8217;s captcha codes.</p>
<h3>Decline disposable email domains</h3>
<p>To add another obstacle for bots and to make the checkout process not more complex than needed, I added some additional code in Magento&#8217;s root directory.</p>
<p>It declines the customer&#8217;s email address if it comes from a disposable email (trash mail) provider. So for the checkout to complete, the customer is forced to enter a valid (non-trash) email address.</p>
<p>This list on <a href="https://github.com/ivolo/disposable-email-domains">Github</a> seems to be pretty much complete and can be queried directly e.g. <a href="https://open.kickbox.io/v1/disposable/">here</a>.</p>
<pre title="checks.inc.php" class="lang:php decode:true">&lt;?php

//2017-06 DXSdata.com

if (isset($_POST['billing']))
{
       //https://github.com/ivolo/disposable-email-domains
        //look if listed as disposable email domain
        if (@$tmp['email'])
        {
                $result = @file_get_contents("https://open.kickbox.io/v1/disposable/".$tmp['email']);

                if ($result)
                {
                        $result = json_decode($result);
                        if ($result)
                        {
                                if ($result -&gt; disposable)
                                {
                                        $_POST['billing']['email'] = '';
                                        mail("office@dxsdata.com", "disposable email detected: ".$tmp['email'], "", "From: office@mywebser.ver");
                                        exit;
                                }
                        }
                        else mail("office@dxsdata.com", "could not check disposable email domain","","From: office@mywebser.ver");
                }
                else mail("office@dxsdata.com", "could not check disposable email domain","","From: office@mywebser.ver");
        }


}</pre>
<p>Then include it in your Magento&#8217;s index.php:</p>
<pre title="index.php" class="lang:php decode:true ">&lt;?php
#only add the following line:

include('checks.inc.php');

#original:
/**
 * Magento
 *
...</pre>
<p>Note: After every update, security patch etc., check your index.php file if the include command is still there. Re-add it, if necessary.</p>
<hr />
<h3>Restrict admin access to certain IP ranges</h3>
<p>In addition, it definitely makes sense to make the virtual /admin subdirectory more secure. It does not really exist in Magento&#8217;s file structure, so you cannot use .htaccess files like it can be done for the /downloader directory. But you can extend the new checks.inc.php file you created before:</p>
<pre title="checks.inc.php" class="lang:php decode:true ">&lt;php
#addition

function isAllowedAsAdmin()
{
    $whitelist = array(
        '10.1.*',
        '192.168.1.*',
        '77.1.2.34',
        '234.45.567.80'
    );

    if(in_array($_SERVER['REMOTE_ADDR'], $whitelist))
        return true;
    else{
        foreach($whitelist as $i){
            $wildcardPos = strpos($i, "*");

            if($wildcardPos !== false &amp;&amp; substr($_SERVER['REMOTE_ADDR'], 0, $wildcardPos) . "*" == $i)
                return true;
        }
    }

    return false;
}

if (strpos($_SERVER['REQUEST_URI'], "/admin") !== false)
{
    if (!isAllowedAsAdmin())
    {
        echo $_SERVER['REMOTE_ADDR'] . " not allowed.";
        exit;
    }
}
</pre>
<p>&nbsp;[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2017/06/magento-commerce-restrict-customer-email-addresses-at-checkout-limit-admin-access/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]LetsEncrypt SSL-Zertifikate im LAN verteilen[:en]Distributing LetsEncrypt SSL certificates in LAN[:]</title>
		<link>https://www.dxsdata.com/2017/05/distributing-letsencrypt-ssl-certificates-in-lan/</link>
					<comments>https://www.dxsdata.com/2017/05/distributing-letsencrypt-ssl-certificates-in-lan/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 13 May 2017 09:46:24 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1790</guid>

					<description><![CDATA[[:en] Scenario You have some webservers or mailservers in your LAN which you want to work with the Let&#8217;s Encrypt SSL service. It provides the creation of free SSL certificates which are known by most browsers. The only drawback is, they are valid for only 90 days. So if you do not want to renew [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]</p>
<h3>Scenario</h3>
<p>You have some webservers or mailservers in your LAN which you want to work with the <a href="https://letsencrypt.org/">Let&#8217;s Encrypt</a> SSL service. It provides the creation of free SSL certificates which are known by most browsers.</p>
<p>The only drawback is, they are valid for only 90 days. So if you do not want to renew manually every 3 months, you can automate most parts of the process.</p>
<p>In this tutorial, we will create a certificate server which provides always up-to-date certificates, so they can be fetched by other servers in your LAN.</p>
<h3>Steps</h3>
<p>Certbot, the LetsEncrypt utility for getting certificates e.g. under Ubuntu, basically needs an open outgoing Port 80 TCP, and also an incoming Port 80 TCP. I didn&#8217;t want to open outgoing internet for all of the servers, so I decided to create a separate LetsEncrypt certificate server which runs certbot regularly.</p>
<p>Create a new Ubuntu Server virtual machine: Default setup, install Samba/CIFS, Apache2 and <a href="https://certbot.eff.org/#ubuntuxenial-apache">certbot</a>.</p>
<p>Configure:</p>
<ul>
<li>Apache&#8217;s ports.conf and 000-default.conf to only listen on port 81, docroot: /share
<ul>
<li>(Do not use port 80 because certbot needs it later)</li>
</ul>
</li>
<li>Samba&#8217;s smb.conf: Add a public read-only share &#8220;certs&#8221; for /share</li>
</ul>
<p>You might already have another Apache webserver running which listens on your router&#8217;s public port 80, so we have to redirect certain request from there to the new cert server.</p>
<p>Modify every virtual host config of Apache which needs SSL certificates like in this example:</p>
<pre class="lang:sh decode:true " title="/etc/apache2/sites-enabled/yourconfig.conf">&lt;VirtualHost *:80&gt;
    DocumentRoot "/var/www"
    ServerName www
    ServerAlias *
    ErrorLog "/var/log/apache2/error.log"
    CustomLog "/var/log/apache2/access.log" common

    #letsencrypt
    ProxyPass /.well-known/acme-challenge/ http://certs/.well-known/acme-challenge/
    ProxyPassReverse /.well-known/acme-challenge/ http://certs/.well-known/acme-challenge/
&lt;/VirtualHost&gt;</pre>
<p>Note: In this example, certbot always uses port 80! Make sure to consider all of your subdomains, e.g. also for your mailserver etc.</p>
<p>The following script can be run as a cronjob (crontab -e), it gets and renews the certificates from LetsEncrypt and creates password protected zip files for easy local distribution:</p>
<pre class="lang:sh decode:true" title="/scripts/getCerts.sh">#!/bin/bash

#www.dxsdata.com, 2017-05
#creates pw protected zip archives containing certificate files

PW=somepw
SHARE=/share
CERTPATH=/etc/letsencrypt/live
EMAIL=it@example.com

declare -a DOMAINS=(
                "myfirst.example.com"
                "mysecond.example.com -d autodiscover.example.com"
                )

#halt on any error
set -e

#clean share
rm -rf $SHARE/*

for DOMAIN in "${DOMAINS[@]}"
do
        MAINDOMAIN=`echo $DOMAIN | head -n1 | cut -d " " -f1`
        #echo $MAINDOMAIN
        certbot certonly --standalone -d $DOMAIN --preferred-challenges http --agree-tos -n -m $EMAIL --keep-until-expiring

        #create file for ms exchange server
        openssl pkcs12 -export -in $CERTPATH/$MAINDOMAIN/cert.pem -inkey $CERTPATH/$MAINDOMAIN/privkey.pem -out  $CERTPATH/$MAINDOMAIN/cert.p12 -password pass:$PW
        zip -er --password $PW $SHARE/$MAINDOMAIN.zip $CERTPATH/$MAINDOMAIN -j
done
</pre>
<p>&nbsp;</p>
<p>The main part is done, we should be able to get the certificate zip files via CIFS and browser (port 81).</p>
<p>Now we want the &#8220;client&#8221; servers to fetch the certificates from the local certs server.</p>
<h4>Example script for an Ubuntu Apache webserver &#8220;client&#8221;</h4>
<pre class="lang:sh decode:true " title="/scripts/refreshCerts.sh">#!/bin/bash

#www.dxsdata.com, 2017-05
#gets SSL certificates from local certs server and replaces the existing/old ones

PW=somepw
REMOTECERTPATH="http://certs:81"
CERTPATH=/certs/letsencrypt
TMPPATH=/tmp/certzip

declare -a DOMAINS=(
                "myfirst.example.com"
                )

mkdir -p $TMPPATH

#halt on any error
set -e

for DOMAIN in "${DOMAINS[@]}"
do
        wget -O $TMPPATH/$DOMAIN.zip $REMOTECERTPATH/$DOMAIN.zip
        unzip -o -P $PW $TMPPATH/$DOMAIN.zip -d $CERTPATH/$DOMAIN/
done


apachectl configtest
service apache2 restart
</pre>
<p>Make sure your Apache certificate config and the script&#8217;s certpath point to the same directory.</p>
<p>&nbsp;</p>
<h4>Example for MS Exchange 2010/2013/2016</h4>
<p>This is not a functional Powershell script, but some useful commands to create one:</p>
<pre class="lang:ps decode:true">//Load zip file from \\certs\certs or http://certs:81, then:
Get-ExchangeCertificate -&gt; you get the Thumbprint
Enable-ExchangeCertificate -&gt; SMTP,IIS,IMAP,POP + Thumbprint from above
(Alternative: Import-ExchangeCertificate)
</pre>
<p>&nbsp;</p>
<p>&nbsp;[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2017/05/distributing-letsencrypt-ssl-certificates-in-lan/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Ubuntu Upgrade von 14 Trusty auf 16 Xenial, MySQL-Probleme beheben[:en]Ubuntu upgrade from 14 Trusty to 16 Xenial, solve MySQL issues[:]</title>
		<link>https://www.dxsdata.com/2017/04/ubuntu-upgrade-from-14-trusty-to-16-xenial-solve-mysql-issues/</link>
					<comments>https://www.dxsdata.com/2017/04/ubuntu-upgrade-from-14-trusty-to-16-xenial-solve-mysql-issues/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 29 Apr 2017 12:54:42 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1755</guid>

					<description><![CDATA[[:en]&#160; Upgrading Ubuntu from v14 to 16 LTS can lead to MySQL server issues (MySQL is upgraded from v5.6 to 5.7 during the upgrade process). E.g. if you use deprecated variables in /etc/mysql/my.cnf, MySQL server will fail to start after the upgrade is finished. My recommendations for the upgrade: If the server is a virtual [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]&nbsp;</p>
<p>Upgrading Ubuntu from v14 to 16 LTS can lead to MySQL server issues (MySQL is upgraded from v5.6 to 5.7 during the upgrade process).</p>
<p>E.g. if you use deprecated variables in /etc/mysql/my.cnf, MySQL server will fail to start after the upgrade is finished.</p>
<p>My recommendations for the upgrade:</p>
<ol>
<li>If the server is a virtual appliance, create a snapshot when the system is shut down. Otherwise create a full backup.</li>
<li>Within Ubuntu v14, do an &#8220;apt-get update &amp;&amp; apt-get upgrade&#8221; and check if everything is running fine.</li>
<li>Create a snapshot again.</li>
<li>Edit /etc/mysql/my.cnf. In my case I had to delete variables
<ol>
<li>table_cache</li>
<li>log-slow-queries</li>
<li>(long query time)</li>
</ol>
</li>
<li>Run &#8220;do-release-upgrade&#8221; to v16 Xenial.</li>
<li>If you are using phpMyAdmin, the dbcommon upgrade procedure might fail during the upgrade process (&#8220;cannot access mysqld.sock&#8221; or similar). Simply ignore it for now.</li>
<li>When the upgrade is finished, check if MySQL is running (&#8220;ps ax&#8221;) and if not, try to start it manually (e.g. &#8220;service mysql restart&#8221;).
<ol>
<li>If MySQL server is unable to start, look at /var/log/mysql/error.log, maybe you have to modify my.cnf again, e.g. remove further certain variables. In this case, I recommend to note the vars and start from the latest snapshot again.</li>
</ol>
</li>
<li>If you have huge MySQL databases, watch /var/log/mysql/error.log and/or mysql.log. It might take several minutes as some DB types might be converted to newer formats in all tables.</li>
<li>Check if phpMyAdmin works. If Dbcommon failed during the upgrade, run &#8220;dpkg-reconfigure phpmyadmin&#8221;.</li>
</ol>
<p>&nbsp;</p>
<p>Additions:</p>
<p>It turned out that more modifications are necessary:</p>
<p>MySQL 5.7 seems to ignore max_connections value. If it is e.g. set to 600 in my.cnf, it still uses value 214.</p>
<p>To solve this issue, we have to do a few more adaptions.</p>
<pre title="/lib/systemd/system/mysql.service" class="lang:sh decode:true">LimitNOFILE=infinity
LimitMEMLOCK=infinity</pre>
<p>&nbsp;</p>
<pre title="/etc/security/limits.conf" class="lang:sh decode:true ">* soft nofile 1024000
* hard nofile 1024000
* soft nproc 10240
* hard nproc 10240</pre>
<p>&nbsp;</p>
<pre title="/etc/mysql/my.cnf" class="lang:sh decode:true ">open_files_limit = 1024000
table_open_cache = 500</pre>
<p>Optionally, also decrease the timeout values:</p>
<pre title="/etc/mysql/my.cnf" class="lang:sh decode:true ">wait_timeout = 5000
interactive_timeout = 5000</pre>
<p>Run afterwards:</p>
<pre class="lang:sh decode:true ">systemctl daemon-reload
service mysql restart</pre>
<p>Check the currently used max_connections value e.g. with phpMyAdmin or MySQL console.</p>
<p>Update 2017-05-04:</p>
<p>If you encounter further MySQL errors like &#8220;ERROR 1366 Incorrect integer value: &#8221; for column &#8216;xx&#8217; at row xx, you might want to change sql_mode&#8217;s value to the default one from v5.6 (if modifying the SQL query is not an option):</p>
<pre title="/etc/mysql/my.cnf" class="lang:sh decode:true">sql_mode=NO_ENGINE_SUBSTITUTION</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://stackoverflow.com/questions/35111698/unable-to-increase-mysql-open-files-limit">Reference</a></p>
<p><a href="https://unix.stackexchange.com/questions/152186/mysql-max-open-files-more-than-1024#answer-157910">Reference</a>[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2017/04/ubuntu-upgrade-from-14-trusty-to-16-xenial-solve-mysql-issues/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Amazon Echo Dot (Alexa) mit OpenHAB 2: Kombinieren mit Squeezebox, KNX, HTTP- und SSH-Kommandos senden[:en]Amazon Echo Dot (Alexa) with OpenHAB 2: Controlling Squeezebox, KNX, send HTTP and SSH commands[:]</title>
		<link>https://www.dxsdata.com/2017/03/amazon-echo-dot-alexa-with-openhab-2-controlling-squeezebox-knx-send-http-and-ssh-commands/</link>
					<comments>https://www.dxsdata.com/2017/03/amazon-echo-dot-alexa-with-openhab-2-controlling-squeezebox-knx-send-http-and-ssh-commands/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Thu, 02 Mar 2017 16:23:26 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Entertainment]]></category>
		<category><![CDATA[Home Automation]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1646</guid>

					<description><![CDATA[[:en]Amazon&#8217;s Echo Dot is a great way to control your smart home via voice. If you are already using a visualization tool like OpenHAB for your smart home, it&#8217;s quite easy to get it running. Because every smart home installation is configured very individually, I will only explain some basics here. OpenHAB 2 If you [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]Amazon&#8217;s Echo Dot is a great way to control your smart home via voice.</p>
<p>If you are already using a visualization tool like OpenHAB for your smart home, it&#8217;s quite easy to get it running.</p>
<p>Because every smart home installation is configured very individually, I will only explain some basics here.</p>
<h3>OpenHAB 2</h3>
<p>If you are running OpenHAB v1, please upgrade it to v2. Most OH1&#8217;s add-ons, bindings etc. can be used with OH2 and the <a href="http://docs.openhab.org/tutorials/migration.html">migration process</a> is quite feasible.</p>
<p>Upgrade recommendations:</p>
<ul>
<li>Use a fresh installation for OH2 (new Ubuntu VM, Raspberry Pi etc.)</li>
<li>Decide at the beginning which of the 3 configuration types (text-based, Paper UI, Karaf) you would like to use in the future. It could be error-prone to change in the future, because every type saves the configs to other places. I would prefer Paper UI, but the migration doc linked above recommends text-based config.</li>
</ul>
<p>When you have OH2 ready to run, install the addon &#8220;Hue Emulation&#8221;:</p>
<ul>
<li>Text-based config: In services/addons.cfg, uncomment the &#8220;misc =&#8221; line and add &#8220;hueemulation&#8221;</li>
<li>Paper UI: Open Add-ons -&gt; Misc -&gt; Install Hue Emulation</li>
</ul>
<p>Then open your items file. For testing purposes, simply add &#8220;[ &#8220;Lighting&#8221; ]&#8221;  or &#8220;[ &#8220;Switchable&#8221; ]&#8221; to an already switch.</p>
<p>Example:</p>
<pre class="lang:sh decode:true">Switch myswitch "Test" &lt;myicon&gt; (mygroup) [ "Switchable" ] { channel=... }</pre>
<p>Save the items file, then run the Alexa app, connect it and let it search for devices. You can also do this via voice command, e.g. &#8220;Alexa, search for connected devices&#8221;, or in German &#8220;Alexa, suche nach verbundenen Geräten&#8221;. Make sure you have enabled the Pairing mode, e.g. via Paper UI addon config.</p>
<p>Alexa should find a device called &#8220;Test&#8221;. Try it e.g. by saying &#8220;Alexa, switch Test on.&#8221;.</p>
<h3>Send HTTP commands</h3>
<p>Sometimes it can be useful to make Echo Dot call simple HTTP GET commands, especially with a KNX / smart home server, which reside in your local network and you want those commands to be called directly in your LAN, not via cloud/Skill feature etc.</p>
<p>To achieve this, enable the OpenHAB HTTP binding. You might also need the TCP binding.</p>
<p>In your items file, add a simple switch item like:</p>
<pre class="lang:sh decode:true">Switch AlexaRollershutters "Shutters" [ "Switchable" ]</pre>
<p>You do not have to add it in your sitemap, so it can stay invisible.</p>
<p>Append to your rules file:</p>
<pre class="lang:sh decode:true ">rule "Alexa: Rollershutters"
        when
                Item AlexaRollershutters received command
        then
                //sendHttpGetRequest("http://myserver/myCommandToControlShutters") //if you don't have an existing OH switch for your shutters, you could use this way
                switch(receivedCommand) {
                 case ON : MyRollershutters.sendCommand(DOWN)
                 case OFF : MyRollershutters.sendCommand(UP)
                 }

        end</pre>
<p>Add the &#8220;Shutters&#8221; device to Alexa like described above. You should now be able to control your rollershutters.</p>
<p>For debugging purposes, you can temporarily add the switch AlexaRollershutters to your sitemap to test it manually.</p>
<p>Example with Squeezebox / Logitech Media Server:</p>
<pre class="lang:sh decode:true">sendHttpGetRequest("http://10.1.0.21:9000/status.html?p0=play&amp;player=da%3Ada%3Ada%3Ada%3Ada%3A10")</pre>
<p>In this case, the MAC address (ID of the player) is &#8220;da:da:da:da:da:10&#8221;. The command tells the certain player to start playing.</p>
<p>&nbsp;</p>
<h3>Send SSH commands</h3>
<p>This can be one way to execute remote commands on Linux machines, e.g. tell your Raspberry Pi, OpenELEC / LibreELEC / Kodi Mediacenter to power up (see also <a href="https://www.dxsdata.com/2015/02/openelec-script-for-controlling-tvs-and-displays-with-and-without-cec-with-and-without-suspend-feature/">here</a>).</p>
<p>You can either configure SSH to accept password-less logins (certificates), or the slightly more convenient way would be to install apt-package &#8220;sshpass&#8221;.</p>
<p>First, connect Putty to your OpenHAB 2 server (in my case Ubuntu 16).</p>
<p>Double-check if the command or script you want to run remotely can be executed by the local openhab user, i.e. check if it has the correct permissions. To test the behavior, run a test command like</p>
<pre class="lang:sh decode:true">ssh root@yourRemoteIp reboot</pre>
<p>SSH will ask if it should save the connection hash (important: choose Yes), and then run the reboot command after you have entered the password.</p>
<p>If this works, try the same using sshpass:</p>
<pre class="lang:sh decode:true">sshpass -p yourpassword ssh root@yourRemoteIp reboot</pre>
<p>The reboot command should work immediately on the remote machine.</p>
<p>So to integrate this process into OpenHAB and therefore combine it with Alexa, create a simple Switch like in the HTTP example above and create a rule, e.g.:</p>
<pre class="lang:sh decode:true">rule "Alexa: TV on/off"
        when
                Item AlexaTv received command
        then
                executeCommandLine("sshpass -p libreelec ssh root@10.1.0.91 /storage/.kodi/userdata/onOffHelper.sh &amp;")
        end</pre>
<p>Be careful if you have to use quotation marks within your SSH command. You can use e.g. &#8220;@@&#8221;. For more details, have a look at the <a href="http://docs.openhab.org/configuration/index.html">OH configuration documents</a>.[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2017/03/amazon-echo-dot-alexa-with-openhab-2-controlling-squeezebox-knx-send-http-and-ssh-commands/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>[:de]Ubuntu APT sources.list wiederherstellen[:en]How to restore Ubuntu&#8217;s APT sources.list[:]</title>
		<link>https://www.dxsdata.com/2017/02/how-to-restore-ubuntus-apt-sources-list/</link>
					<comments>https://www.dxsdata.com/2017/02/how-to-restore-ubuntus-apt-sources-list/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 08 Feb 2017 19:34:55 +0000</pubDate>
				<category><![CDATA[Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://www.dxsdata.com/?p=1434</guid>

					<description><![CDATA[[:en]If you have, for whatever reason, destroyed your local /etc/apt/sources.list file which Ubuntu uses for packages updates, here is a useful site which can regenerate it: https://repogen.simplylinux.ch/ My recommendation is to enter country release (get it with &#8220;lsb_release -a&#8221; command) tick the first 12 checkboxes Copy the result to your local file and run &#8220;apt-get [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>[:en]If you have, for whatever reason, destroyed your local /etc/apt/sources.list file which Ubuntu uses for packages updates, here is a useful site which can regenerate it:</p>
<p><a href="https://repogen.simplylinux.ch/">https://repogen.simplylinux.ch/</a></p>
<p>My recommendation is to enter</p>
<ul>
<li>country</li>
<li>release (get it with &#8220;lsb_release -a&#8221; command)</li>
<li>tick the first 12 checkboxes</li>
</ul>
<p>Copy the result to your local file and run &#8220;apt-get update&#8221;.[:]</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dxsdata.com/2017/02/how-to-restore-ubuntus-apt-sources-list/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
