The server (an old Atom-powered PC) on which I ran my ham radio wiki on my local network died, so I decided to try to set up its replacement on a Raspberry Pi 3. I settled on Debian as the OS, both because it would provide a lightweight system for the 1GB Pi, and because it would give me a system that I could configure exactly as I wanted it. Also, I thought it would be interesting to have a 64-bit operating system running on the 64-bit Pi. In the end, it went so well that I repeated it with a Pi 4.
It had been many years since I last installed a basic Debian system, and my system administration skills had grown more than a little rusty. Also, Debian has changed over the years, particularly in adopting systemd. Those things combined to make it a learning experience for me. Still, with the assistance of the Web, I was able to get one up and running more quickly than I had expected.
When I did this in early June, 2021, Debian 11 Bullseye was in its release candidate stage, so I figured it would be stable enough to try to see whether it would serve my needs. Some things surely have changed since then as the final bugs were ironed out, but the installation process should work the same way. With the exception of the Debian ISO selected, this process is pretty much the same for both Pi versions 3 and 4.
hostnamectlto see what I had. It showed that the kernel was version 220.127.116.11, architecture arm64. I also ran
dfto check free space, and was gratified to see that the original 1.3GB image had been expanded to fill the entire 16GB SD card.
The system at this point consists of the most basic working system. No application software or GUI are installed. It also is only minimally configured. There is no install program with the image, so settings that typically are made during an install, such as passwords, user, time zone, need to be configured manually. How I did that follows below.
[A note on root: I discovered on the Pi 3 that the system seemed to be set up for using
sudo, rather than running as the root user. Few shell commands are in root’s path, though I was able to find (and run) them in
/usr/sbin. Once I installed sudo and ran as a sudo user, all the commands were in my path. That wasn’t a problem on the Pi 4.]
passwdto set a password for root.
apt updatefollowed by
apt upgrade. This must be done first, in order to get the repository set up properly. If this isn’t done, subsequent steps that install software will fail.
shutdown -r now.
hostnamectl set-hostname <HOSTNAME>, followed by editing the
/etc/hostsfile (with vi or nano) to add new line to make a reference to it:
apt install sudo. I added my user to the
usermod -a -G sudo myusername. I then logged out as root and back in again as myself so I could continue the installation using sudo.
apt install localesto install the package. I ran
dpkg-reconfigure localesand selected the locales I wanted to be generated, then selected a default locale on the next screen.
sudo timedatectl set-timezone America/Los_Angeles.
At this point, the system was ready for software installation. I was able to install Dokuwiki and restore my site pages from a backup. Since then, the system has been working just as it should, using even less electricity than the frugal Atom-powered box it replaced.