devices:raspberrypi
Inhaltsverzeichnis
Raspberry Pi
Hardware
Raspberry Hardware:
- Raspberry Pi 4B mit 4 oder 8 GB RAM
- Gehäuse
- Netzteil
- 16 GB microSD Karte
USB-Stick (für die Daten):
Betriebssystem
Vorbereitungen
Auf der Workstation das Raspberry Pi OS Betriebssystem herunterladen und auf die SD-Karte schreiben:
Raspberry Pi OS → Raspberry Pi OS Lite (nur Kommandozeile) herunterladen.
sudo dnf install rpi-imager sudo rpi-imager
Imager → Raspberry Pi OS (other) → Raspberry Pi OS Lite (32-bit)
Dann die SD-Karte in den Raspberry Pi einlegen und starten:
- Login: pi / raspberry (hier noch raspberrz eingeben)
Konfiguration
sudo raspi-config
- 5 Localisation Options
- L1 Locale: de_DE.UTF-8 UTF-8
- default locale: none (vgl.: https://wiki.debian.org/Locale)
- L2 Timezone: Europe / Berlin
- L3 Keyboard: Generische PC-Tastatur mit 105 Tasten (Intl) / Tastaturbelegung: Deutsch / Rest im Standard belassen
- 1 System Options
- S3 Password: Passwort für den Benutzer pi setzen
- 3 Interface Options
- P2 SSH: Enable
- 6 Advanced Options
- A1 Expand Filesystem: Durchführen
- 8 Update
Zeit
sudo timedatectl set-timezone Europe/Berlin sudo nano /etc/systemd/timesyncd.conf
[Time] NTP=0.europe.pool.ntp.org 1.europe.pool.ntp.org 2.europe.pool.ntp.org 3.europe.pool.ntp.org
sudo timedatectl set-ntp false sudo timedatectl set-ntp true timedatectl status # Manuell: sudo date -s 'YYYY-MM-DD HH:mm:ss'
Update
sudo apt update sudo apt upgrade
Netzwerk
# Prüfung auf Verwendung von systemd cat /proc/1/comm nano /etc/dhcpcd.conf
#Example static IP configuration: #interface eth0 #static ip_address=192.168.0.10/24 #static ip6_address=fd51:42f8:caae:d92e::ff/64 #static routers=192.168.0.1 #static domain_name_servers=192.168.0.1 8.8.8.8 fd51:42f8:caae:d92e::1 # It is possible to fall back to a static IP if DHCP fails: # define static profile profile static_eth0 static ip_address=192.168.178.xxx/24 static routers=192.168.178.1 static domain_name_servers=192.168.178.1 # fallback to static profile on eth0 interface eth0 fallback static_eth0
systemctl restart networking systemctl status dhcpcd
Firewall
apt install ufw ufw allow 22/tcp ufw logging medium ufw default deny incoming ufw enable systemctl restart ufw ufw status
# ufw Regel löschen ufw status numbered ufw delete <Nummer>
Zugriff
https://www.raspberrypi.org/documentation/computers/remote-access.html
hostname -I ssh pi@<IP-Adresse>
devices/raspberrypi.txt · Zuletzt geändert: 2025/01/29 11:58 von hse