X

How to monitor UNIQUI UBIQUITI devices in zabbix - Part 4 - Upgrading the UniFi controller - Ubuntu 14.04 to version 5.9.29


"We're stuck with technology when what we most want is something that just works."

Douglas Adams.

In previous versions I used the windows versions of the Controller. However, I realized that the linux version, besides being more stable, was much faster than the windows version. Which made me choose to use this version as default.

My production environment consists of dozens of remote sites and each of them with an individual UniFI controller installed under Ubuntu 14.04. Half of these steps are unnecessary in newer versions, such as: upgrading Java or editing the repository server.

But, I understand that for most people redoing a server is not always an option, so let's to the update procedure from a relatively old version. In my example, version 5.4.11

Em primeiro lugar devemos fazer um backup do banco de dados. Bastando para isto clicar no botão “SETTINGS”, selecionar a opção “Maintenance”. Em “BACKUP” Selecionar o periodo que você quer fazer o backup e clicar no botão “DOWNLOAD BACKUP”

A file with the version number and the .unf extension will be created.

Before upgrading Unifi, you should upgrade Java to version 1.8.

You can do this through ssh and / or terminal.

Updating JAVA to version 1.8

java -version

We see that the installed version is 1.7.0_121. Which means that if you upgrade Ubuntu directly, your UniFi controller will no longer work.

Then, we should execute the series of commands below as root user:

sudo su
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update && apt-get install -y oracle-java8-installer

You will see the following screens:


After completion we see that the Java version has been updated, so we can continue with the UBUNTU update process.

apt-get upgrade

During the ubuntu upgrade process you will be asked if you have a backup. However, as we have previously backed up, we can follow the process by answering to the question.

At the end of the process you will see that the version has been updated. However, it is not the most current version yet.

Why did this happen? Probably just like me, you made the manual selection of which Unifi repository Ubuntu should use. But the solution is simple. Just edit the archive of repositories and indicate what you will use: (I use VI to edit linux files, you can use another)

vi /etc/apt/sources.list

Find any line that looks like this and enter a #:

deb http://www.ubnt.com/downloads/unifi/debian unifi5 ubiquiti

Remove the # from the following line:

# deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti

Your file will look something like this:

Save the changes and run the Ubuntu upgrade again using the commands:

apt-get update && apt-get upgrade

And at the end of the process your UniFi SDN will be updated with the latest version.

However, after logging in you will be prompted to update the SSH access password so that it does not match the site administration password.

Be careful with this step, because if you do not keep the password you will probably have difficulties if you need to access your AP via SSH.

THE END!

Did you like the article?

Leave your comment, question or suggestion here.

See you the next time!

Categories: JAVA UBUNTU UNIFI
Alex Moura: Apenas mais um entusiasta de TI que não deseja que você passe os apuros que eu passei!