Reply
New Member
Posts: 5
Registered: ‎05-07-2017

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

I'm havin trouble with your script on a fresh 18.04 installation. It seems the script is unable to find the mongodb-org package

Spoiler

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

Updates successful.
Now installing mongodb 3.4

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


deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse
OK
Hit:1 http://lu.archive.ubuntu.com/ubuntu bionic InRelease
Ign:2 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease
Hit:3 http://lu.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release
Hit:5 http://lu.archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Fetched 83.2 kB in 1s (74.3 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mongodb-org

########################################
# An error occurred. Aborting script.. #
########################################
Any idea what might be happening ?
Senior Member
Posts: 10,063
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

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

Hello @OlwkkfAA,

 

Could you run the following commands and show me the output?

ls -a /etc/apt/sources.list.d/

 

 

 

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: ‎05-07-2017

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

it's pretty brief:

XXX@ubuntu-vm:~$ ls -a /etc/apt/sources.list.d/
. .. mongodb-org-3.4.list

 

that's it ?!

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

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

[ Edited ]

Hello @OlwkkfAA,

 

Remove that mongodb source file.

rm /etc/apt/sources.list.d/<the mongodb>

Once you done that run these commands.

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
apt update
apt install mongodb-org

 Let me know the results

 

 

 

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: ‎05-07-2017

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

[ Edited ]

It still doesn't work but I think it might be because I'm running the vanilla x86 (aka 32-bit) install since it's running on my NAS and I don't need it for much.

 

I suppose I need to add a different repo ?

 

Spoiler
root@ubuntu-vm:/home/claude# rm /etc/apt/sources.list.d/mongodb-org-3.4.list
root@ubuntu-vm:/home/claude# apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
Executing: /tmp/apt-key-gpghome.OsLS0xgjXg/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
gpg: key BC711F9BA15703C6: "MongoDB 3.4 Release Signing Key <packaging@mongodb.com>" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
root@ubuntu-vm:/home/claude# echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse
root@ubuntu-vm:/home/claude# apt update
Hit:1 http://lu.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://lu.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://lu.archive.ubuntu.com/ubuntu bionic-backports InRelease
Ign:4 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease
Hit:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release
Hit:6 http://security.ubuntu.com/ubuntu bionic-security InRelease
Get:8 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4/multiverse amd64 Packages [11.8 kB]
Get:9 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4/multiverse arm64 Packages [11.8 kB]
Fetched 23.6 kB in 1s (20.3 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
root@ubuntu-vm:/home/claude#
root@ubuntu-vm:/home/claude#
root@ubuntu-vm:/home/claude#
root@ubuntu-vm:/home/claude# Building dependency tree
Building: command not found
root@ubuntu-vm:/home/claude# apt install mongodb-org
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package mongodb-org
Senior Member
Posts: 10,063
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

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

Hello @OlwkkfAA,

 

MongoDB 3.4 doesn’t support 32bit anymore.

You will need to add a repo which supports the 32bit OS  (I may look it up later on).

 

 

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: ‎05-07-2017

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

I'll try with a 64-bit OS and report back.

New Member
Posts: 5
Registered: ‎05-07-2017

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

FYI worked the first time with the amd64 version !
Senior Member
Posts: 10,063
Registered: ‎08-04-2017
Kudos: 1631
Solutions: 493

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

Hello @OlwkkfAA,

 

Awesome to hear!

Goodluck with your controller and 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
New Member
Posts: 13
Registered: ‎02-09-2017

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

[ Edited ]

@AmazedMender16, will this script also update 5.8.24 to 5.8.28?

New Member
Posts: 1
Registered: ‎02-24-2015

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

Flawless! 

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

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

[ Edited ]

Hello @gallico916,

 

Do you mean the second script?

Yes it will update to 5.8.28.

 

 

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: 13
Registered: ‎02-09-2017

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

[ Edited ]

Yes, the second one

 

I have tried it last night, and for some strange reason it didn't. it told me i'm already running the latest package

I did run the full script and that did the work.

 

Thnak you for you reply and the great scripts

 

Edit: Just saw all the replys from late last night, when I run the script the repo was still on .24

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

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

Hello @gallico916,

 

The repo is still on 5.8.24, I took the check repo part out of the script. I will keep updating the script manually when new versions come out Man Happy

 

 

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: 11
Registered: ‎02-06-2016
Kudos: 5

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

[ Edited ]

First of all great script. Keep up the great work. What's the default user/pswd for your install?

14 UNIFI SITES deployed
128 WiFi radio
6 USG
8 USG-PRO
9 Pfsense Devces
5 S-48-750W
4 US-24-500W
3 US-8
8 UAP-AC-M
4 EP-S16
6 EP-R6
4 Edge Power
37 ETH‑SP‑G2
5 F‑POE
8 Edge Router Lite
New Member
Posts: 1
Registered: ‎04-22-2014

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

It uses the default install, so I would suggest you just to try the default ubntubnt

Senior Member
Posts: 10,063
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 @MMaduro,

 

Thank you for your kind words Man Happy

 

The default password for the devices are:

root/ubnt

ubnt/ubnt

 

For the controller, you need to create your own account in the setup menu.

 

 

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: 1
Registered: ‎12-28-2017

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

Thank you. I lost a whole day trying to get this working before I found you post.
Senior Member
Posts: 10,063
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 @amareto,

 

Glad it helped you out, awesome to hear!

 

 

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,063
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 Everyone,

 

16/08/2018

 

Added a line to the update script to delete itself after a successful execution!

This prevents users from using the same script over and over again, ending up not being able to update to newer versions!

 

 

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