To install UniFi Controller on FreeNAS 9.10-STABLE run the following command within a new FreeNAS Jail.
curl -sL "https://gist.githubusercontent.com/mattrude/27db653a5c8a09fc419d/raw/unifi-freenas-install.sh" | csh
#!/bin/csh | |
sed -i .bkp 's/sshd_enable=\"NO\"/sshd_enable=\"YES\"/g' /etc/rc.conf && \ | |
sed -i .bkp 's/#PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config && \ | |
service sshd start && pkg install -y openjdk8 && \ | |
echo "fdesc /dev/fd fdescfs rw 0 0" > /etc/fstab && \ | |
echo "proc /proc procfs rw 0 0" >> /etc/fstab && \ | |
pkg install -y mongodb && echo 'mongod_enable="YES"' >> /etc/rc.conf && \ | |
portsnap fetch extract && cd /usr/ports/net-mgmt/unifi4/ && make install clean && \ | |
echo 'unifi_enable="YES"' >> /etc/rc.conf && service unifi start && \ | |
echo "Complete!" |