Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

For this setup we will be using the 64-bit version of Ubuntu Server 18.04.2 3 LTS specifically for the Raspberry Pi 3B+.

Download the image file for Ubuntu Server from from http://cdimage.ubuntu.com/ubuntu/releases/18.04.2bionic/release/ubuntu-18.04.25-preinstalled-server-arm64+raspi3.img.xz,   then insert your microSD card into your computer so that you can flash the disk image onto it. If you are running Ubuntu or any other Linux distro, you can flash the image using this command:

xzcat ubuntu-18.04.25-preinstalled-server-arm64+raspi3.img.xz | sudo dd bs=32M of=/dev/mmcblk0 iflag=fullblock oflag=direct status=progress; sync

...

The RaspberryPi 3B+ has a full gig of ram, but while running MongoDB (and also when building from source if you choose to do so) this may not be enough. So before going any further you will first want to create some additional memory capacity by adding a swap file to your filesystem. Run the following command to create a new 2GB swap file, start swapping on it, and automatically remount the swapfile on reboot:

sudo touch /tmpvar/theswapswap
sudo chmod 600 600 /tmpvar/theswapswap
sudo dd if=/dev/zero of=/tmpvar/theswap swap bs=1M count=2048
sudo mkswap mkswap /tmpvar/theswap 
sudo swapon /tmp/theswapswap 
sudo swapon /var/swap
sudo sh -c "echo /var/swap swap swap defaults 0 0 >> /etc/fstab"

You  may also want to be able to connect and manage your device remotely, in which case you should also install:

...