Raspberry Pi Install - Untested

https://community.ubnt.com/t5/UniFi-Wireless/UniFi-Controller-5-5-on-Raspberry-Pi/td-p/2045751

 Click here to expand...

I just finished installing this, mostly following Chris's guide (http://www.lowefamily.com.au/2016/06/02/installing-ubiquiti-unifi-controller-5-on-raspberry-pi/), but I hit a few snags along the way, so I'm documenting them here for posterity and xkcd 979.


First off, at the time of the writing, stable is actually 5.5, but that will keep on shifting as Ubiquiti releases new versions of the controller. Adapting these instructions to the new versions of the unifi controller should be easy, but I'll adjust.


I've actually followed these modifications to install on both a  1 model B and a 2 model B+.


Now for the actual snags:

  1. Oracle Java 8 is actually required for the controller to work. Instead of installing openjdk and oracle java separately, you can install oracle java and unifi at the same time. Through the magic of the dependency resolution, apt will determine that oracle-java8-jdk statisfies the java dependency of unifi, and not even bother installing openjdk.

    sudo apt-get install unifi oracle-java8-jdk -y
    If you installed the two parts separately, you can uninstall openjdk after the fact, or switch to oracle by default by updating the java alternatives.

    update-java-alternatives -s jdk-8-oracle-arm32-vfp-hflt
  2. For mongodb, you don't actually need to run that line to disable the default mongodb instance. Instead, run the following two commands. They will prevent the default mongodb server from starting, as the unifi controller starts its own instance of mongo automatically.

    sudo systemctl disable mongodb
    sudo systemctl stop mongodb
  3. For the snappy java library, 5.5 comes with an updated version (5.5.20 includes 1.1.2). This version of snappy works perfectly fine on the Raspberry Pis

After these changes, the unifi controller should come up on boot without issue!

https://www.technologist.site/2016/06/02/how-to-install-ubiquiti-unifi-controller-5-on-the-raspberry-pi/?doing_wp_cron=1538471823.0863869190216064453125

Really slow and out of date so I may rewrite it here if I actually use it. 

https://gist.github.com/TechnologistAU/40ce7a5232356f53bb63f85a89a57a38/

 Click here to expand...
#!/bin/bash

################################################################################
#
# This script automates the installation of the UniFi controller software on the
# Raspberry Pi.
#
# http://www.technologist.site/ubnt
#
################################################################################

apt-get update && apt-get -y upgrade
apt-get -y install oracle-java8-jdk

echo 'deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti' > /etc/apt/sources.list.d/100-ubnt.list
wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ubnt.com/unifi/unifi-repo.gpg 
apt-get update

apt-get -y install unifi

systemctl stop mongodb
systemctl disable mongodb

if [[ "$(uname -m)" =~ ^armv6.* ]]; then
	rm /usr/lib/unifi/lib/native/Linux/armhf/libubnt_webrtc_jni.so
fi