Reply
New Member
Posts: 13
Registered: ‎02-09-2017

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

@AmazedMender16

 

Great script,

 

Thank you for maintaining it, you saved me so many hours fighting it.

 

cheers

 

G.

Senior Member
Posts: 10,065
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

Hello @gallico916,

 

Thank you for your kind words!

I for sure will keep maintaining/updating the scripts!

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Emerging Member
Posts: 44
Registered: ‎07-25-2016
Kudos: 7
Solutions: 1

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

[ Edited ]

Hi Glenn

 

Great work with the scripts, i spent hours going round in circles installing manually - My Linux knowledge is limited so having a script that installs all the dependencies is a god send

 

However.... I've come across an error (see below)  I've had a go at installing the key manually but that results in yet another error Smiley LOL (key install script i used was "sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C2518248EEA14886" )

 

It's google cloud Ubuntu 18.04 if that makes any difference, running as root

 

Hope you can help, and thanks again

 

Crossovercable

 

 

 

Hit:1 http://us-east1.gce.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://us-east1.gce.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://us-east1.gce.archive.ubuntu.com/ubuntu bionic-backports InRelease
Ign:4 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease
Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:7 http://archive.canonical.com/ubuntu bionic InRelease
Hit:8 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release
Get:5 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease [15.4 kB]
Err:5 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease: The following signatures couldn't
be verified because the public key is not available: NO_PUBKEY C2518248EEA14886
E: The repository 'http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
########################################
# An error occurred. Aborting script.. #
########################################

Senior Member
Posts: 10,065
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

[ Edited ]

Hello @crossovercable,

 

Is it a clean install for UniFi?

Give this a try.

sudo apt autoclean
sudo mv /var/lib/apt/lists /tmp
sudo apt autoclean
sudo apt update

Once you did that, run the script again.

 

Is there already a Java version installed?

java --version

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Senior Member
Posts: 10,065
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

[ Edited ]

Hello Everyone,

 

18/08/2018

 

Added a few lines to the update script that will check if you already have the UniFi source files!

The script will remove these source files, once the script finishes up it will prompt you to add them back.

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 8
Registered: ‎01-20-2017
Kudos: 6

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

[ Edited ]

Hi guys,

 

I am fairly new to Ubiquiti products (loving it all already) and decided the other day to venture into setting up my own Azure VM, running Ubuntu 16.04.1 LTS. I managed to get everything right, following a video from Chris @ Crosstalk Solutions (this vid was centered around Digital Ocean, but scripting via SSH pretty much the same for Azure besides swap file and some odds n ends).

 

Low and behold, I saw a 'upgrade to Ubuntu 18.04.1 LTS popup' once logged in via PuTTy, and decided what the hek, lets do it! All fine and lovely until I got hit with the MongoDB problem :/

 

I tried some commands but everything was a fail. I then decided, let's see what the community has to say... Came across the almighty GlennR and his posts so I decided to email him... now, I live in South Africa and Glenn resides within the Netherlands so I was expecting a reply, hopefully, within a week at least, if any... 5mins after I hit the send button to fire off that email, Glenn replies. Immediately saying he can help me 'right now'! I was excited, but at the same time sorta shocked!! Man Happy

 

Needless to say, I granted him teamviewer access and within 30mins, I had a working UniFi v5.8.28 hosted controller, running off a B1S instance in Azure. He even helped me with the DNS naming so I can hit https://unifi.yourname.co.za:8443 afterwards instead of using the public IP Azure sets up by default.

 

I haven't had time to get devices migrated into the cloud controller as yet, but everything is rock solid and stable. Downloaded the UniFi app from Apple Store and pretty darn happy with everything right now.

 

Massive THANK YOU to GlennR for his humbleness (to a noob) and his expert insight into Linux scripting. This dude is a genius and I will recommend anyone struggling with UniFi particulars to give him a shout! Hek, Ubiquiti should hire him at the same time and put him into the professional services consulting field!

 

Thanks a million dude, really appreciate the time and 'small' effort it took you to help me out. I'd probably still be looking at PuTTy today tryna figure out what to do.

 

Cheers.

 

renze

Senior Member
Posts: 10,065
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

[ Edited ]

Hello @sa-renze,

 

I really appreciate your kind words!

Wish you the best with your controller/sites!

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Senior Member
Posts: 10,065
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

[ Edited ]

Hello Everyone,

 

Added a few lines to the update script.

* The script will now pause for 30 seconds between big upgrades for database migrations!

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 2
Registered: ‎04-12-2018

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

Hi have have a brand new ubuntu 18.04 server im setting up for my Unifi controler.  I run through everything and I get the following when it is on Installing UniFi dependency.
 

 

E: Unable to locate package jsvc
E: Unable to locate package libcommons-daemon-java

########################################
# An error occurred. Aborting script.. #
########################################

Senior Member
Posts: 10,065
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

[ Edited ]

Hello @tve784,

 

Thanks for reporting.

I have pushed a fix for the scripts!

 

Please download the new one (deleted the old one)

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 2
Registered: ‎04-12-2018

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

awesome thank you got it working
Senior Member
Posts: 10,065
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

Hello @tve784,

 

Awesome to hear!

Sorry for the inconvenience..

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 5
Registered: ‎07-11-2018

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

Thank you so much. Your controller fixed all of the issues i was having.

Senior Member
Posts: 10,065
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

Re: UniFi Installation Scripts | UniFi Easy Update Scripts | Works on Ubuntu 18.04 and 16.04

[ Edited ]

Hello @americanpool,

 

Thank you for your kind words!

Glad it fixed your issues!

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 4
Registered: ‎06-22-2015

Re: UniFi Installation Scripts - Works on Ubuntu 18.04 and 16.04

The script shows that it sucessfully installs Java but than it fails:

################################################

Java 8 installation completed
Installing UniFi dependency

################################################

 

 

E: Unable to locate package jsvc
E: Unable to locate package libcommons-daemon-java

########################################
# An error occurred. Aborting script.. #
########################################

 

Any idea?

Senior Member
Posts: 10,065
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

Re: UniFi Installation Scripts - Works on Ubuntu 18.04 and 16.04

[ Edited ]

Hello @pzharyuk,

 

Please download the updated script (v1.8)

Remove the old script first! (rm unifi-5.x.x.sh)

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 4
Registered: ‎08-21-2018

Re: UniFi Installation Scripts - Works on Ubuntu 18.04 and 16.04

Can you help?

 

 

Statusinformationen werden eingelesen.... Fertig
oracle-java8-set-default ist schon die neueste Version (8u181-1~webupd8~1).
oracle-java8-set-default wurde als manuell installiert festgelegt.
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert.
unifi-5.8.28.sh: 84: unifi-5.8.28.sh: source: not found
-e
########################################
# An error occurred. Aborting script.. #
########################################

root@dg-ubuntu:~#

Senior Member
Posts: 10,065
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

Re: UniFi Installation Scripts - Works on Ubuntu 18.04 and 16.04

Hello @fwuerfel,

 

Welcome to the community!

 

Could you give me some more information about your setup?

OS Version?

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 4
Registered: ‎08-21-2018

Re: UniFi Installation Scripts - Works on Ubuntu 18.04 and 16.04

Hello, Thanks

 

Ubuntu 18.04 AMD64

 

 

Senior Member
Posts: 10,065
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

Re: UniFi Installation Scripts - Works on Ubuntu 18.04 and 16.04

Hello @fwuerfel,

 

Could you run this command.

apt purge oracle-java* -y

After that please run the script again.

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Reply