Starting a screen session after log on with ssh
processes running even if you close screen session (see below
Starting: screen -S session_name
To keep screen runing press ctrl + a than d, close ssh
To reconnect after log in with ssh, screen -r session_name
To close screen session type exit, when loged in
To see all sessions, screen -ls
Installation lighttpd on Raspbian Stretch
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install lighttpd
sudo apt-get install php7.0-fpm php-cgi
sudo lighttpd-enable-mod fastcgi-php
sudo service lightppd force-reload
Adding user and passwords for internal pages
The password file is /etc/lighttpd/.htpasswd.
To create file with a first user and password: sudo htpasswd -c /etc/lighttpd/.htpasswd benutzername
To change the password or add new user: sudo htpasswd /etc/lighttpd/.htpasswd benutzername
Scanner Server saned
Sane and saned are installed and activate on the Raspbery as scanner server.
For testing, if everything is working correct use sane-find-scanner and scanimage -L
Attention, following settings are importent in the ufw firewall:
In file /etc/default/ufw, DEFAULT_OUTPUT_POLICY="ACCEPT"
In the same file, DEFAULT_INPUT_POLICY="ACCEPT"
Also in that file, add nf_conntrack_sane to list IPT_MODULES
Add ports 10000 to 10100 as allowed for tcp and udp
Log output of /etc/init.d/own_startup.sh with date/time in /var/log/own_startup.log
Linux mint
Backup Linux
sudo mount_raspberry
backup_add
To create a *.7z from the folder LaptopLinux to be able to make a new backu_add:
goto raspberry
change directory: cd /media/pi/RaspExt1/Backups
create 7z: 7z a 20201122_LaptopLinux.7z Laptop_Linux
detelte content (not folder) of Laptop_Linux
Backup Windows
sudo mount_raspberry
backup_win_add
Mount an image file
go to path with *.img
Find block size and start bloc of image to calculate offset: fdisk -l /path/to/*.img
offset=blocksize*startblock of linux image
mount -o loop,offset=offset *.img /mnt/temp example: sudo mount -o loop,offset=67108864 RaspSD_20181223.img test
Windows Linux time problem
The time differences between Linux occures because Windows stores the time as local time and Linux in UTC time. The easyest way to fix the
problem is to store the time also as local time.
Type in terminal: timedatectl set-local-rtc 1 --adjust-system-clock
To undo the change, use the same command but with 0 instead of 1.
Generate ssl certifikat with certbot for internet pages
cd /etc/letsencrypt
sudo su
sudo certbot certonly --manual --preferred-challenges dns -d stepper-obersteinbach.duckdns.org