Skip to content

Instantly share code, notes, and snippets.

@mattrude
Last active April 4, 2017 20:12
Show Gist options
  • Save mattrude/27db653a5c8a09fc419d to your computer and use it in GitHub Desktop.
Save mattrude/27db653a5c8a09fc419d to your computer and use it in GitHub Desktop.
A simple script to install the UniFi Controller v4 on FreeNAS 9.10-STABLE. For more information see https://wiki.mattrude.com/FreeNAS/Unifi_Controller_Install

UniFi Controller FreeNAS Install

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!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment