- Download the latest Lite version from https://www.raspberrypi.org/software/operating-systems/
- Use the "balenaEtcher" app (https://www.balena.io/etcher/) to flash the iso to a microSD card
- Copy a blank file named
ssh
to the boot partition (the root folder of the microSD card) - Power up the Raspberry PI, find it's IP in your router's connected devices, and
ssh pi@<ip>
(password: raspberry)
sudo raspi-config
- System Options > Change user password
- System Options > Change hostname
- Localisation Options > Set Timezone
- Advanced options > Expand Filesystem
- Update OS
sudo apt-get update sudo apt-get clean # Was necessary to resolve hanging on "waiting for headers" sudo apt-get upgrade sudo apt-get dist-upgrade
- [Optional] If
apt-get install
is hanging on waiting for headers switch your repo to this one# Modify /etc/apt/sources.list as follows deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free rpi #deb http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi
- Disable Wifi and Bluetooth (https://raspberrypi.stackexchange.com/a/62522)
# Add the following lines to /boot/config.txt dtoverlay=pi3-disable-wifi dtoverlay=pi3-disable-bt
- Disable systemd service that initializes Bluetooth Modems connected by UART.
sudo systemctl disable hciuart
- Disable systemd service that initializes Bluetooth Modems connected by UART.
In a nutshell
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install plexmediaserver
More official docs: https://forums.plex.tv/t/read-me-first-about-server-armv7-and-armv8-ubuntu-debian/226567.
- Also see the Raspberry Embedded section of https://support.plex.tv/articles/208050647-getting-started/, for Plex's official instructions, for more info
# From https://github.com/azlux/log2ram#install
echo "deb [signed-by=/usr/share/keyrings/azlux-archive-keyring.gpg] http://packages.azlux.fr/debian/ bullseye main" | sudo tee /etc/apt/sources.list.d/azlux.list
sudo wget -O /usr/share/keyrings/azlux-archive-keyring.gpg https://azlux.fr/repo.gpg
sudo apt update
sudo apt install log2ram
Update /etc/fstab as follows and reboot
# Reduce ext4 journaling to every 6h (21600s) by adding commit=21600 to /etc/fstab to the root filesystem
PARTUUID=600410ff-02 / ext4 defaults,noatime,commit=21600 0 1
# Run iotop package and monitor for which processes are writing over time
sudo apt install iotop
sudo iotop -aok
# jbd2/mmc.. are from ext4 journaling and should only be seen every 10min now
sudo apt-get install netatalk
# Optional add the line: /mnt "Mount"
# at the bottom of sudo nano /etc/netatalk/AppleVolumes.default
# then
sudo /etc/init.d/netatalk restart
sudo apt update
# Optional list packages that have updates
sudo apt list --upgradable
# This is the most complete command to keep things up to date but will remove packages
# as needed to upgrade (unlike apt upgrade), so must carefully review the planned removed packages.
sudo apt full-upgrade
# To retrieve disk space: also 1. cleanup unused packages, 2. cleanup apt cache
sudo apt autoremove && sudo apt clean
# They have warnings saying not to do this unless necessary, lots of sites still recommend it
sudo rpi-update
# https://hub.docker.com/r/marcomontel/rpi-speedtest-cli
docker run -e PYTHONHTTPSVERIFY=0 --rm marcomontel/rpi-speedtest-cli
# Check whether wifi or ethernet is used. Whatever is the top of this list
route -n
# Stop the ethernet interface until reboot (to force it to use wlan0)
sudo ifconfig eth0 down
# Make the wlan0 (wifi) interface higher priority than eth0
# Add the following to /etc/dhcpcd.conf, as eth0 is metric 202, the lower the metric the higher the priority
interface wlan0
metric 100
Built-in commands here: https://www.raspberrypi.org/documentation/raspbian/applications/
# Check temperature (VideoCore GPU Temperature)
/opt/vc/bin/vcgencmd measure_temp
# GPU Memory
/opt/vc/bin/vcdbg reloc stats