How to Install & Update UNIFI via APT on Debian

Installing the Default JRE/JDK

The easiest option for installing Java is using the version packaged with Debian. Specifically, this will install OpenJDK 8, the latest and recommended version.
First, update the package index.
  • sudo apt-get update
Next, install Java. Specifically, this command will install the Java Runtime Environment (JRE).
  • sudo apt-get install default-jre



When prompted, type y for yes to confirm the installation.
There is another default Java installation called the JDK (Java Development Kit). The JDK is usually only needed if you are going to compile Java programs or if the software that will use Java specifically requires it.
The JDK does contain the JRE, so there are no disadvantages if you install the JDK instead of the JRE, except for the larger file size.
You can install the JDK with the following command:
  • sudo apt-get install default-jdk
You now have the Java Runtime Environment or the Java Development Kit installed.

Installing the Oracle JDK

If you want to install the Oracle JDK, which is the official version distributed by Oracle, you’ll need to follow a few more steps. You’ll first need to install the software-properties-common package in order to use the apt-get-repository command. This will work to add the repository to your sources list and import the associated key.
  • sudo apt-get install software-properties-common
When prompted to confirm the installation, type y for yes.
To ensure that we get the correct source line on Debian, we’ll need to run the following command that also modifies the line:
  • sudo add-apt-repository "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main"
Once we do that we’ll need to update:
  • sudo apt-get update
 Install and upgrade the UniFi controller.
sudo apt install unifi

No comments:

Post a Comment