Board version: | Pi 3 B+ Rev 1.3 |
Memory: | 1 GB |
RPi OS version: | Lite 64-bit |
HAT: | Raspberry Pi PoE+ HAT |
Note that before proceeding you will need to be running a 64-bit version of Raspberry Pi OS for this tutorial to work.
$ sudo apt install rng-tools
We now need to make a slight change to the rng-tools configuration.
Begin editing the config file by running the following command:
$ sudo nano /etc/default/rng-tools-debian
Within this file, find and uncomment the following line.
Find:
#HRNGDEVICE=/dev/hwrng
uncommenting this line:
HRNGDEVICE=/dev/hwrng
By uncommenting this line, we are adding to the amount of entropy (The amount of randomness) that the system has available.
The Raspberry Pi features an integrated random number generator that we can utilize to increase the entropy pool.
Once you have made the change, Save the file.
Finally, restart the rng-tools service by running the command below:
$ sudo systemctl restart rng-tools
$ sudo apt install libssl1.1
$ wget https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/4.4/multiverse/binary-arm64/mongodb-org-server_4.4.18_arm64.deb -O mongodb.deb
Once the package is downloaded, install it by using the following command within the terminal:
$ sudo dpkg -i mongodb.deb
Now that we have installed the MongoDB server, set it to start when your Raspberry Pi boots using the command below:
$ sudo systemctl enable mongod
Finally, start MongoDB by running the command shown below in the terminal.
This will start the server immediately, so we won’t have to wait till our device restarts:
$ sudo systemctl start mongod
$ echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/ubiquiti-archive-keyring.gpg] https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list >/dev/null
You might notice that we are using “amd64” and not “arm64” or “armhf“. This is due to Ubiquiti not having their repository set up to mark “arm64” as compatible. However, it doesn’t hugely matter as, at the moment, it will still download files compatible with our Raspberry Pi.
We now need to add the repositories GPG key by using the following command:
$ curl https://dl.ui.com/unifi/unifi-repo.gpg | sudo tee /usr/share/keyrings/ubiquiti-archive-keyring.gpg >/dev/null
The GPG key is what helps tell the package manager it is downloading the correct package.
As we made changes to the repositories, we need to now update the package list by running the command below:
$ sudo apt update
Now finally, we can install version 17 of the OpenJDK runtime as well as the Unifi Controller software itself to our Raspberry Pi by running the following command:
$ sudo apt install openjdk-17-jre-headless unifi
Installing UniFi through this method will automatically set up a service. This service will automatically start the UniFi software at boot.
Additionally, we are installing version 17 of the Java runtime environment as it is currently the only version supported by the UniFi controller.
https://[IPADDRESS]:8443
If you run into a certificate error, it is safe to ignore it as we know what device we are connecting to.