⬅️ **[[$-Linux|Linux]]** | [[$-Devices|Device]] *** # Raspberry Pi Installation - [[DEPRECATED-2022-05 - home-pi - Pi-4b]] - [[Pi-3b Ambilight]] - https://deskpi.com/collections/frontpage/products/deskpi-pro-for-raspberry-pi-4 - [[MCE - Pi 4]] This handle all default configurations for a new Pi. - Install Image - First Boot and Update - Configuration - Standard Software ## Importan Links - [NoIP DynDNS Service](https://www.noip.com/login?ref_url=console#!/dynamic-dns) - [PiMyLifeUp - DynDNS Tutorial](https://pimylifeup.com/raspberry-pi-port-forwarding/) - [PiMyLifeUp - Samba Tutorial](https://pimylifeup.com/raspberry-pi-samba/) - [PiMyLifeUp - RDP Tutorial](https://pimylifeup.com/raspberry-pi-remote-desktop/) - [LinuxUndIch - Tutorial WLAN](https://linuxundich.de/raspberry-pi/drei-wege-das-wlan-auf-einem-raspberry-pi-einzurichten/) ## 1 Install new Pi with Raspbian 1. Download Raspbian 2. Download [Balena Etcher](https://www.balena.io/etcher/) (img to SD Card) 3. Add files to Boot partition - re-insert SD Card - add `wpa_supplicant.conf` file to configure WLAN settings. This will later be present under `/etc/wpa_supplicant/wpa_supplicant.conf` ``` ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 country=DE network={ ssid="<WLAN-Name>" psk="<Password --> encrypt later!!!>" key_mgmt=WPA-PSK } ``` - add empty `ssh` file to enable SSHD 4. Start Pi 5. Login into Pi - Default user: `pi` - Default password: `raspberry` 6. Update PI ``` sudo apt-get update sudo apt-get upgrade ``` ## 2 Users and initial configs - as default user `pi` ```bash # new working user sudo adduser tobi # new git user, no login (in /etc/shadow marked with `!`) sudo adduser --disabled-login git # sudo without password sudo vi /etc/sudoers User privilege specification root ALL=(ALL:ALL) ALL tobi ALL = NOPASSWD: ALL ``` - as new user ```bash # edit the hostname sudo vi /etc/hostname # --> pi-home # edit the hostname sudo vi /etc/hosts # --> pi-home # reboot to see changes sudo reboot # check /etc/shadow sudo vi /etc/shadow # check WLAN settings sudo vi /etc/wpa_supplicant/wpa_supplicant.conf # delete the default user pi sudo userdel -r pi ``` ## 3 Install Standard Software ```bash sudo apt-get install tree git vim samba rsync wakeonlan ``` ## 4 Configs - `.vimrc` for root and per user - provide SSH Public keys with `ssh-copy-id` - Edit `/etc/sshd_config` and restart service `sudo service sshd restart` - WLAN Password Encryption in - see in [Linux Basics](/technik/tool/LinuxBasics)