Install Unifi on Raspbery Pi Ubuntu 20.04

on Aug. 22, 2023, 1:17 a.m.

install assumes your are running ubuntu 20.04 LTS on a RPi 4 model B
sudo apt install openjdk-8-jdk ca-certificates apt-transport-https gnupg binutils-common libbinutils binutils-aarch64-linux-gnu binutils

verify it's 1.8.0_*
java -version
javac -version

hold java version
sudo apt-mark hold openjdk-8-jdk

setup mongodb repo
wget -qO - https://www.mongodb.org/static/pgp/server-3.4.asc | sudo gpg -o /etc/apt/trusted.gpg.d/mongodb-server-3.4.gpg --dearmor
echo "deb https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

install mongodb
sudo apt update
sudo apt-get install -y mongodb

hold mongodb version
sudo apt-mark hold mongodb-server mongodb mongo-tools mongodb-clients mongodb-server-core

check if mongo is running
sudo systemctl status mongodb
sudo systemctl start mongodb.service
sudo systemctl enable mongodb.service
test mongo is responsive
mongo --eval 'db.runCommand({ connectionStatus: 1 })'

output should look like this


MongoDB shell version v4.4.18
connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb
Implicit session: session { "id" : UUID("d20c23a9-b94d-4c9c-b7df-b6e132f149e5") }
MongoDB server version: 4.4.18
{
"authInfo" : {
"authenticatedUsers" : [ ],
"authenticatedUserRoles" : [ ]
},
"ok" : 1
}

install the unifi controller
wget https://dl.ui.com/unifi/7.2.97/unifi_sysvinit_all.deb
wsudo dpkg -i unifi_sysvinit_all.deb
wsudo systemctl status unifi.service
wsudo systemctl start unifi.service
wsudo systemctl enable unifi.service