2020/07/20

UniFi Controller 5.13.32 on Debian 10.4

I installed UniFi Controller 5.13 on Debian 10.4. Here is the instruction from Ubiquiti but it is a bit old now.

https://help.ui.com/hc/en-us/articles/220066768-UniFi-How-to-Install-and-Update-via-APT-on-Debian-or-Ubuntu


Below is what I did to install UniFi Controller 5.13.32 on Debian 10.4.


Debian 10.4 (VM)

  • Installer image: debian-10.4.0-amd64-netinst.iso
  • CPU:1
  • RAM: 2GB
  • HDD: 10GB (Swap:2GB)
  • Software selection: SSH server + Standard system utilities

Set static IP address

# vi /etc/network/interfaces
auto enp0s4
iface enp0s4 inet static
        address 192.168.20.5/24
        gateway 192.168.20.1
# systemctl restart networking

Install MongoDB 3.6

UniFi requires MongoDB 3.6 but Debian 10 installs 4.x. It needs to use Debian 9/Stretch's package. Gnupg is required by apt-key.

# apt install gnupg

# wget -qO - https://www.mongodb.org/static/pgp/server-3.6.asc | apt-key add -

# echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6 main" | tee /etc/apt/sources.list.d/mongodb-org-3.6.list

# apt update

# apt install mongodb-org

# mongo --version

MongoDB shell version v3.6.18

# systemctl start mongod

# systemctl status mongod

# systemctl enable mongod


Install Java 8

UniFi requires Java 8, but it is not available for Debian 10 (yet? never?). And so using Stretch again.

# echo "deb http://ftp.nl.debian.org/debian stretch main" > /etc/apt/sources.list.d/stretch.list

# apt update

# apt install openjdk-8-jre-headless


Install UniFi Controller

Now, you can install UniFi controller.

# apt-get install ca-certificates apt-transport-https

# echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | tee /etc/apt/sources.list.d/100-ubnt-unifi.list

# wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg

# apt update

# apt info unifi

Package: unifi

Version: 5.13.32-13646-1

Priority: optional

Section: java

Maintainer: UniFi developers <unifi-dev@ubnt.com>

Installed-Size: 231 MB

Provides: unifi-controller

Pre-Depends: debconf (>= 0.5) | debconf-2.0

Depends: binutils, coreutils, adduser, libcap2, curl,

 mongodb-server (>= 2.4.10) | mongodb-10gen (>= 2.4.14) | mongodb-org-server (>= 2.6.0),

 mongodb-server (<< 1:4.0.0) | mongodb-10gen (<< 4.0.0) | mongodb-org-server (<< 4.0.0),

 java8-runtime-headless, jsvc (>=1.0.8), logrotate

Conflicts: unifi-controller

Replaces: unifi-controller

Homepage: http://www.ubnt.com/unifi

Download-Size: 128 MB

APT-Sources: https://www.ui.com/downloads/unifi/debian stable/ubiquiti amd64 Packages

# apt install unifi

# systemctl start unifi

# systemctl status unifi

# systemctl enable unifi


Disk Usage after installation (w/o any UniFi device)

$ df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/sda2       7.4G  2.4G  4.6G  35% /

/dev/sda1       511M  5.1M  506M   1% /boot/efi


Memory Usage after installation (w/o any UniFi device)

MiB Mem : 1994.8 total,  315.2 free,  548.5 used, 1131.1 buff/cache
MiB Swap: 2046.0 total, 2046.0 free,    0.0 used. 1279.1 avail Mem

  PID USER         VIRT    RES    SHR %MEM   TIME+ COMMAND
 5610 unifi     3054.3m 273.2m  22.8m 13.7 1:40.45 Java
 5649 unifi     1020.9m 126.3m  38.5m  6.3 1:00.50 mongod
 2438 mongodb    963.4m 105.6m  32.0m  5.3 0:49.68 mongod
 5588 unifi     2895.0m  79.3m  21.0m  4.0 0:14.20 launcher


0 件のコメント:

コメントを投稿