Nextcloud Server auf ubuntu oder Linux Mint

May 8th, 2018 linux, ubuntu
apt update
apt-get -y install apache2
apt-get -y install mariadb-server mariadb-client
mysql_secure_installation

(Mysql/MriaDB testen, datenbank und DB-Nutzer anlegen)
mysql -u root -p

...

apt-get -y install php7.0 libapache2-mod-php7.0
systemctl restart apache2
cd /var/www/html/
echo "< ?php phpinfo(); ?>" > info.php
apt-get -y install php7.0-mysql
systemctl restart apache2

mkdir /var/www/html/nextcloud/
cd /var/www/html/nextcloud/

(nextclound als zip herunterladen...)

unzip latest-13.zip 

(ceertbot für Let's encrypt SSL Zertigfikat   https://....  )
apt-get install software-properties-common
add-apt-repository ppa:certbot/certbot
apt-get update
apt install certbot
apt-get install python-certbot-apache   
certbot --apache
apt-get install php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring
apt-get install php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip
   
cd /var/www/html/nextcloud/
cat .htaccess
vi  /etc/apache2/apache2.conf 

siehe:

Nextcloud auf Debian 9 mit docker, ngnix und letsencrypt

April 20th, 2018 debian, linux

Ich bin dieser Anleitung gefolgt:

https://kopfkrieg.org/2017/06/15/nextcloud-docker-nginx/

Leider wurde meine bash-history nicht geschrieben, weil ich mich nicht ordentlich abgemeldet habe 🙁

Beim repo habe ich
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"

statt “ubuntu” verwendet.


docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c79cf8de0944 nextcloud "/entrypoint.sh apac…" 2 hours ago Up 2 hours 127.0.0.1:32768->80/tcp nextcloud

docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
nextcloud latest 6cec9cff80aa 19 hours ago 593MB

Änderung in /etc/ngnix/sites-available/default gegenüber der o.g. Anleitung:

server {
listen 443 ssl http2; # IPv4, SSL/TLS, HTTP/2
listen [::]:443 ssl http2; # IPv6, SSL/TLS, HTTP/2
server_name cac1.lug-marl.de;
root /var/www/nextcloud;
index index.html;
# Let's Encrypt on port 443
# location ^~ /.well-known {
# root /var/www/letsencrypt;
# }
ssl on;
ssl_certificate /etc/letsencrypt/live/my.example.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/my.example.org/privkey.pem;

...

Hilft gegen Timeout:
/etc/ngnix/ngnix.conf

...
http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
proxy_connect_timeout 600;

...

soweit so gut. läuft fluffig.
To Do:

* automatische umleitung http -> https
* caldav testen
* carddav testen
* postgres statt sqlite

text to speech

April 9th, 2018 electronics, hardware, linux

I have a notebook with a broken display. I removed the display and want to use TTS instead. So on boot the machine can say things like “conected to Wifi SSID ….” and “my IP adress is …”

When I know the IP then I can connect via ssh or vnc. That might also be useful for Raspberry Pi. Another option can be a LCD connected via usb-to serial cable.

I found 3 solutions ; one for bash and one for python:

bash 1:
apt-get install libttspico-utils


A=`echo "hello world"` ; pico2wave --wave /tmp/Test.wav "$A" ; play /tmp/Test.wav; rm /tmp/Test.wav

bash 2:
apt-get install festival festvox-don


(echo "my IP adress is " ; hostname -I ) |festival --tts

python:

pip install pyttsx3

import pyttsx3;
engine = pyttsx3.init();
engine.say("hello world");
engine.runAndWait() ;

MAX7219

September 15th, 2017 arduino, electronics, hardware

Heute kam wieder Spielzeug aus China: 4 Stück 32×8 LED Matrix Displays mit je 4 x MAX7219 als Controller. Preis bei aliexpress: $3,75 für ein 4er Modul – entspricht $0,93 für 8×8 pixel. Ein 4-er Modul(32×8 pixel) hat die Abmessungen: 32mm x 128mm x 15mm. Module verschiedener Hersteller sind unterschiedlich verdrahtet. Es gibt mindestens 3 Varianten.

Die Arduino Library “LEDMatrixDriver.hpp” passte sofort zu meinem Modul – zumindest wenn man sie nur in X Richtung verbindet. Ein 32×16 habe ich damit noch nicht hingekrigt. Sie kann bitmaps in 4 Richtungen scrollen. Es gibt eine Laufschrift Demo mit einem Text-Font. Der Font ist aber nicht hübsch und hat keine Kleinbuchstaben.

Die Arduino Library “MD_MAX72XX” (geht auch mit ESP8266) passte erst, nachdem ich 2 Zeilen in libraries/MD_MAX72XX/src/MD_MAX72xx.h gändert habe:

#define USE_PAROLA_HW 0
#define USE_FC16_HW 1

Die “Daft Punk” Demo hat einige schöne Animationen:

(in dem Video sieht man 2 Stück 4er Module)

64x16 LED Display

16pixel font

WLAN in der Regionalbahn

June 25th, 2017 fly

Gestern saß ich mit Laptop in einer Regionalbahn der DB Regio und hab das kostenlose WLAN getestet. Wie so oft gibt es ein Captive Portal
bei dem man einen Button klicken muss.

Testen Sie unser kostenloses WLAN in diesem Zug. – derzeit für Sie mit 50 MB pro Fahrt.

Ich akzeptiere die Nutzungsbedingungen von Icomera AB
button: Hier online gehen”

Einen Tag später stelle ich fest, dass MintUpdate kaputt ist. Grund:
Er hat sich die Captive Seite geladen und in diverse Dateien im Ordner
/var/lib/apt/lists/
gespeichert. 🙁


grep -l Icomera *
packages.linuxmint.com_dists_rosa_import_i18n_Translation-en
packages.linuxmint.com_dists_rosa_main_i18n_Translation-de
packages.linuxmint.com_dists_rosa_main_i18n_Translation-en
packages.linuxmint.com_dists_rosa_upstream_i18n_Translation-de
packages.linuxmint.com_dists_rosa_upstream_i18n_Translation-en

Falls Dir auch so etwas passiert: Das hat in meinem Fall geholfen:

cd /var/lib/apt/lists/
rm -r /var/lib/apt/lists/*
apt update

SEI SEHR VORSICHTIG mit rm -r !

64×8 rote LEDs

June 15th, 2017 arduino, electronics, hardware, wlan

Anno 1993 habe ich aus 8 LED Boards ein 64×8 LED Display gebaut. Ein einzelnes Board sieht so aus:

LED Streifen

Ein LED Board ist ein horizontaler Streifen mit 64 LEDs, 8 x 74LS164N Schieberegister, einem 74LS14 und einem BD 244 Transistor (für Blank und LED Strom)

Damals wurde es mit dem (“Centronics” / Parallelport ) Duckerausgang eines Atari ST angesteuert: 8 Datenleitungen (für jede Zeile eine) eine Taktleitung und 1 x blank. Der Atari hat Buchstaben mit einstellbarer Geschwindigkeit scheibchenweise von rechts ‘rein geschoben. Der Atari ST war also der erste Controller für dieses LED Display.

Ungefähr 10 Jahre später habe ich das Display mit einem ATMEL ATmega32 und der “2D Borg” Software von www.das-labor.org angesteuert. Die Firmware hat Treiber für verschiedene Displays. Damit die Hardware besser zur Firmware passt, habe ich die 8 Taktleitungen aufgetrennt und die 8 Datenleitungen zu einer zusammengeführt. Das sah dann so aus:

Weitere >10 Jahre später (2017) habe ich die Schaltung wieder modifiziert, weil ich das Display mit einem ESP8266 steuern möchte. Diesmal verbinde ich 7 x Data out (Pin 13) des letzten Schieberegisters eines Streifens mit Data In des darunter liegenden Streifen. Dadurch benötige ich nur noch 3 IO Pins des Microcontrollers statt bisher 10. Ein erster Test mit einem Arduino war erfolgreich:



FN LED Baord 1000/1
Stecker1
1 -
2 GND
3 clear/reset: 1k Ohm pull up nach +5V
4 clock
5 blank (PWM)
6 -
7 Data In

Stecker2
8 Data Out
9 clock
10 clear/reset
11 +5V
12 +5V
13 GND
14 GND

Epoptes 0.5.10

March 19th, 2017 linux, skolelinux, ubuntu

Seit Version 0.5.9 hat epoptes “automatic client reconnecting”
Bei älteren Versionen konnte man Clients nicht steuern wenn der Client gestartet wurde, bevor der Server gestartet ist. Das Problem ist seit Version 0.5.9 behoben.

Auf einem Test-Server hatte ich ein Problem mit epoptes/ui/notifications.py , was sich aber durch auskommentieren einiger Zeilen bzw. Einfügen von “pass” Befehlen lösen konnte.

http://www.epoptes.org/

Miles & More

January 20th, 2017 fly

Weil ein Großteil meiner Meilen bald verfallen währen, habe ich 12500 Meilen gegen einen Eurowings Flug eingetauscht. Normaler Flugpreis: €80 + €15 für Gepäck. Alternativ: 12500 Meilen + €39.- für Flughafengebühren + Gepäck. In meinem Beispiel sind also 12500 Meilen nur 56€ wert.
Daraus ergibt sich der Wert einer Meile: 0,00448 € Ich finde das sehr enttäuschend! Ich hatte gelesen, dass 10.000 Meilen angeblich 100€ Wert seien, also mehr als doppelt so viel wie in meinem konkreten Fall.

Laut diesem Blogpost hätte ich meine Meilen besser im World-Shop ausgegeben, ist natürlich fraglich, ob ich da irgendwas finde, was ich wirklich haben möchte.

https://meilenschwund.wordpress.com/meilenwert/

Firefox spielt diverse Videos nicht mehr

December 24th, 2016 linux

Das hat geholfen:


apt update
apt install firefox libav-tools libavcodec-extra libavcodec-extra-54

Orange Pi one und Armbian Linux

November 18th, 2016 debian, electronics, linux

Hab mir bei AliExpress einen Orange Pi one gekauft. Orange Pi one ist ein Linux- oder Android-Computer vergleichbar mit dem Raspberry Pi 2 oder Raspberry 2 Zero. Lieferzeit war 2,5 Wochen. Der Orange Pi one ist mit €12,73 inkl. Versand erheblich günstiger als ein Raspberry Pi.

Vorteile:

  • Preis
  • Open Source
  • Geschwindigkeit
  • 4K Video @30fps
  • GPIO ist Raspberry Pi kompatibel
  • Lötpunkte für analog Audio & Video und 2 weitere USB Ports vorhanden

Nachteile:

  • nur 512MB RAM
  • Stromversorgung nur über 1,7mm Rundstecker
  • nur 1 USB + 1 USB OTG
  • SD Karten Images für Raspberry Pi kann man nicht verwenden
  • funktioniert nicht mit HDMI nach DVI Adapter (es gibt einen Patch dafür)
  • CPU kann unter Vollast sehr heiß werden (wie Raspberry Pi3)
  • außer HDMI kein zusätzlicher Anschluß für LCD

Ich habe mir mit “dd” 3 micro SD Karten zum testen gemacht:

  • Lubuntu_1404_For_OrangePiPC_v0_8_0
  • Raspbian_For_OrangePi_PC_v0_8_0
  • Armbian_5.20_Orangepione_Debian_jessie_3.4.112

Alle 3 Images funktionieren. SD Cards 2GB, 8GB und 32GB, Class 4 und 10 funktionieren.

Alle 3 Images starten mit 720p (1280×720) – kann die Hardware kein auto-detect ?

Für das “headless server” Armbian Image genügt eine 2GB Karte, die anderen brauchen mindensten 4GB.

Bei Raspbian und Armbian muss man kein Display/Tastatur/Maus anschliessen, man kann sich übers Netzwerk per ssh anmelden.

Bei Armbian leuchte die grüne LED. Wenn sie blinkt kann man sich das erste Mal per ssh anmelden und ein neues root passwort vergeben (default root-passwort: 1234)

Bei Raspbian und Lubuntu leuchtet die rote LED dauerhaft.


root@orangepione:~# armbianmonitor -h
Usage: armbianmonitor [-h] [-b] [-c $path] [-d] [-m] [-p] [-r] [-u]

############################################################################

Use armbianmonitor for the following tasks:

armbianmonitor -b switches between verbose and normal boot
armbianmonitor -c /path/to/test performs disk health/performance tests
armbianmonitor -d tries to upload debug disk info to improve armbianmonitor
armbianmonitor -m provides simple CLI monitoring
armbianmonitor -p tries to install cpuminer for performance measurements
armbianmonitor -r tries to install RPi-Monitor
armbianmonitor -u tries to upload armhwinfo.log for support purposes

############################################################################

Your display settings are currently 720p (1280x720). To change this use the
h3disp utility. Do you want to change display settings now? [nY]

Usage: h3disp [-h/-H] -m [-d] [-c [0-2]]

############################################################################

This is a tool to set the display resolution of your Orange
Pi by patching script.bin.

In case you use an HDMI-to-DVI converter please use the -d switch.

The resolution can be set using the -m switch. The following resolutions
are currently supported:

480i use "-m 480i" or "-m 0"
576i use "-m 576i" or "-m 1"
480p use "-m 480p" or "-m 2"
576p use "-m 576p" or "-m 3"
720p50 use "-m 720p50" or "-m 4"
720p60 use "-m 720p60" or "-m 5"
1080i50 use "-m 1080i50" or "-m 6"
1080i60 use "-m 1080i60" or "-m 7"
1080p24 use "-m 1080p24" or "-m 8"
1080p50 use "-m 1080p50" or "-m 9"
1080p60 use "-m 1080p60" or "-m 10"
1080p25 use "-m 1080p25" or "-m 11"
1080p30 use "-m 1080p30" or "-m 12"
1080p24_3d use "-m 1080p24_3d" or "-m 13"
720p50_3d use "-m 720p50_3d" or "-m 14"
720p60_3d use "-m 720p60_3d" or "-m 15"
1080p24_3d use "-m 1080p24_3d" or "-m 23"
720p50_3d use "-m 720p50_3d" or "-m 24"
720p60_3d use "-m 720p60_3d" or "-m 25"
1080p25 use "-m 1080p25" or "-m 26"
1080p30 use "-m 1080p30" or "-m 27"
4kp30 use "-m 4kp30" or "-m 28"
4kp25 use "-m 4kp25" or "-m 29"
800x480 use "-m 800x480" or "-m 31"
1024x768 use "-m 1024x768" or "-m 32"
1280x1024 use "-m 1280x1024" or "-m 33"
1360x768 use "-m 1360x768" or "-m 34"
1440x900 use "-m 1440x900" or "-m 35"
1680x1050 use "-m 1680x1050" or "-m 36"

Two examples:

'h3disp -m 1080p60 -d' (1920x1080@60Hz DVI)
'h3disp -m 720i' (1280x720@30Hz HDMI)

You can also specify the colour-range for your HDMI-display with the -c switch.

The following values for -c are currently supported:

0 -- RGB range 16-255 (Default, use "-c 0")
1 -- RGB range 0-255 (Full range, use "-c 1")
2 -- RGB range 16-235 (Limited video, "-c 2")

############################################################################