raspi4
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| raspi4 [15.03.2022] – [Sytem updaten] hochrath | raspi4 [27.12.2023] (aktuell) – [WLan deaktivieren] hochrath | ||
|---|---|---|---|
| Zeile 33: | Zeile 33: | ||
| < | < | ||
| raspi-config | raspi-config | ||
| + | | ||
| + | |||
| reboot | reboot | ||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | \\ | ||
| + | ==== Webserver einrichten ==== | ||
| + | |||
| + | < | ||
| + | sudo apt install apache2 -y | ||
| + | sudo apt install php -y | ||
| + | |||
| + | sudo su | ||
| + | cd / | ||
| + | mv index.html indexorg.html | ||
| + | echo "hallo welt"> | ||
| + | |||
| + | apt install mariadb-server php-mysql -y | ||
| + | service apache2 restart | ||
| + | |||
| + | service apache2 status | ||
| + | service mysql status | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | < | ||
| + | mysql_secure_installation | ||
| + | </ | ||
| + | Immer mit Y bestätigen und root-Passwort setzen.\\ | ||
| + | |||
| + | < | ||
| + | apt install phpmyadmin -y | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | phpenmod mysqli | ||
| + | service apache2 restart | ||
| + | |||
| + | ln -s / | ||
| + | </ | ||
| + | |||
| + | |||
| + | < | ||
| + | mysql --user=root --password | ||
| + | |||
| + | | ||
| + | |||
| + | grant all privileges on *.* to admin@localhost; | ||
| + | |||
| + | FLUSH PRIVILEGES; | ||
| + | |||
| + | exit; | ||
| + | </ | ||
| + | |||
| + | Das Passwort läst nich nach der Anmeldung über http:// | ||
| + | |||
| + | |||
| + | \\ | ||
| + | \\ | ||
| + | ==== RAMDisk ==== | ||
| + | |||
| + | Eien RAMDisk ist schnell eingerichtet.\\ | ||
| + | Verzeichnis anlegen:\\ | ||
| + | < | ||
| + | mkdir / | ||
| + | </ | ||
| + | |||
| + | fstab erweitern: | ||
| + | < | ||
| + | nano /etc/fstab | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | # ramdisk | ||
| + | tmpfs / | ||
| + | </ | ||
| + | |||
| + | |||
| + | \\ | ||
| + | \\ | ||
| + | ==== zweite IP-Adresse ==== | ||
| + | |||
| + | Manchmal benötigt man eine zweite IP-Adresse unter der der Raspi erreichbar ist.\\ | ||
| + | < | ||
| + | ip addr add 192.168.178.28/ | ||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | \\ | ||
| + | ==== Backup einrichten ==== | ||
| + | raspibackup gemäß Anleitung einrichten: | ||
| + | https:// | ||
| + | \\ | ||
| + | |||
| + | < | ||
| + | mkdir / | ||
| + | |||
| + | curl -L https:// | ||
| + | </ | ||
| + | |||
| + | Die Konfiguration durchgehen und das Backup ausführen lassen: | ||
| + | < | ||
| + | raspiBackup.sh | ||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | \\ | ||
| + | ==== CPU-Temperatur auslesen ==== | ||
| + | \\ | ||
| + | Bash-Befehl: | ||
| + | < | ||
| + | cat / | ||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | Bash-Script: | ||
| + | < | ||
| + | nano / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | #!/bin/bash | ||
| + | |||
| + | # cpu temperatur auslesen | ||
| + | vcgencmd measure_temp > / | ||
| + | # | ||
| + | cat / | ||
| + | |||
| + | </ | ||
| + | |||
| + | < | ||
| + | chmod +x / | ||
| + | / | ||
| + | |||
| + | |||
| + | root@raspberrypi3:/ | ||
| + | total 8 | ||
| + | -rw-r--r-- 1 root root 12 Dec 27 20:37 cputemp2.txt | ||
| + | -rw-r--r-- 1 root root 6 Dec 27 20:37 cputemp.txt | ||
| + | |||
| + | |||
| + | root@raspberrypi3:/ | ||
| + | 49388 | ||
| + | |||
| + | root@raspberrypi3:/ | ||
| + | temp=49.4' | ||
| + | </ | ||
| + | |||
| + | |||
| + | \\ | ||
| + | \\ | ||
| + | ==== WLan deaktivieren ==== | ||
| + | |||
| + | \\ | ||
| + | < | ||
| + | sudo nano / | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | ctrl_interface=DIR=/ | ||
| + | update_config=1 | ||
| + | |||
| + | network={ | ||
| + | ssid=" | ||
| + | psk=geheimespasswort | ||
| + | } | ||
| + | |||
| + | </ | ||
| + | |||
| + | < | ||
| + | ifconfig | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | ifconfig wlan0 down | ||
| </ | </ | ||
raspi4.1647333952.txt.gz · Zuletzt geändert: 15.03.2022 von hochrath
