Get the OS image file(RASPBIAN STRETCH LITE) from https://www.raspberrypi.org/downloads/raspbian/, and write it into a SD card as said by https://www.raspberrypi.org/documentation/installation/installing-images/README.md
- For a headless server, enable SSH by putting a “ssh” file into the root, as instructed by https://www.raspberrypi.org/documentation/remote-access/ssh/README.md The default username/password is: pi/raspberry
- For VNC(remote desktop) and other ways of remote access, refer to https://www.raspberrypi.org/documentation/remote-access/
A wired network connection is required for headless server installation. And wireless access can be configured as said by https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md
More config options can be found here https://www.raspberrypi.org/documentation/configuration/
The default source(mirrordirector.raspbian.org) for apt-get is very slow, you need to pick up a nearer one from http://www.raspbian.org/RaspbianMirrors. Update /etc/apt/sources.list as said by https://raspberrypi.stackexchange.com/questions/27479/cannot-connect-to-mirrordirector-raspbian-org/27482#27482?newreg=b684bff77e8642c39ac2b75f0a3a45a2
To backup the whole SD card into an image file, refer to https://thepihut.com/blogs/raspberry-pi-tutorials/17789160-backing-up-and-restoring-your-raspberry-pis-sd-card and https://www.raspberrypi.org/magpi/back-up-raspberry-pi/
Basically, it’s like this(on a Mac):
- Get the SD card device by
diskutil list
- Backup it by
sudo dd if=/dev/disk2 | zip ~/my-raspbian.img.zip -
. It may take some while(10 minutes for 8GB in my case).
To restore, put the image into a SD card just like installing Raspbian OS image on a SD card.
To mount a USB disk, do it as said by https://blog.alexellis.io/attach-usb-storage/ You don’t need to do it manually since OpenMediaVault, the NAS software will do it for us later. It’s here just for how-to.
- For CPU info:
lscpu
orcat /proc/cpuinfo
- For USB info:
lsusb
- For memory:
free -m
- For disks:
df -h
OpenMediaVault is the NAS software we want. Install it as instructed by https://openmediavault.readthedocs.io/en/latest/installation/on_debian.html
Note: Put an openmediavault image in SD card is not recommended, since the auto setup requires a lot of packages to install, which is by the default slow source of APT aforementioned.
After installation, you need
- Make sure the default user pi has the “ssh” group, otherwise it’s disabled in ssh access.
- Add disk and mount
- Add users optionally
- Add share folders
- Enable services like SMB, etc.
- Add plugins optionally
OMV-Extras is a OMV(OpenMediaVault) plugin for more plugins, including the one for Bittorrent, Transmission. Install it by http://omv-extras.org/joomla/index.php/guides. This page list the plugins it includes: http://omv-extras.org/joomla/index.php/omv-plugins-4/4-stable.
Transmission can be configured in OMV, but to use it, you need its own Web GUI, which is on the port 9091 of the same host as OMV. However, the Web GUI is disabled by default, you need to enable Transmission’s “RPC” from the OMV.