Reply
New Member
Posts: 4
Registered: ‎08-29-2018

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

[ Edited ]

@AmazedMender16I prefer solving this instead of doing a clean install Man Wink

Maybe this helps pinpointing the problem: Unifi and mongod (after starting that one manually) do seem to be running (according to systemctl), but I can't find any indication of anything listening on port 8443 and according to mongod's log, mongod is listening on port 27017, one of the solutions I came across said to configure a different port. Which I had, but I guess your script reset it.

The log of unifi still points to system.properties not found, from what I've read that file should be created automatically on the first start of unifi, shouldn't it?

Not sure what the other error means, the one pointing to something java-related. At least I think it's pointing to that.

Edit: I just created the system.properties manually, following http://www.lowefamily.com.au/forums/topic/unifi-not-listing-on-port-8443-or-any-other-port/ , that seems to have done something, I am now getting the certificate error Man Happy

There is still something wrong though: WARN system - ServiceConfig - cannot write /usr/lib/unifi/data/system.properties. That looks like a permission issue.

Senior Member
Posts: 10,064
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 @bartgrefte,

 

Run these commands, after that run the script.

sudo service mongod stop
sudo apt purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
sudo apt autoremove 
sudo rm /etc/apt/sources.list.d/mongod*.list
sudo apt purge unifi -y
sudo rm /usr/lib/unifi sudo apt purge oracle-java* -y sudo apt autoremove

 

 

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-29-2018

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

I already tried those commands when trying to get unifi to work (should've mentioned that, woopsSmiley Embarassed), but it looks like I've solved the errors I've been getting.

 

The "<main> WARN  system - reload system.properties failed: file not found" error was solved by manually creating that file with the contents from http://www.lowefamily.com.au/forums/topic/unifi-not-listing-on-port-8443-or-any-other-port/

After that unifi started listening at 8443 but there was still a regularly occurring error: "java.io.FileNotFoundException: /usr/lib/unifi/data/system.properties (Permission denied)", which I solved with "sudo chown unifi:unifi /usr/lib/unifi/data/system.properties".

Unifi seems to be working now, but I haven't got a clue as of why it wasn't able to create the system.properties by itself.

Senior Member
Posts: 10,064
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 @bartgrefte,

 

I'm glad that you were able to resolve it yourself.

 

 

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: ‎08-29-2018

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

Hi,

 

I was so glad I found your script, but I cant figure it out!

 

First I tried to get the controller working the normal way. Not sure why it didn't work, then I found your script and gave it a try. But I cant get it working. I still think I'm really close I just need a little help! Man Happy

 

I read this thread and tried these:

sudo rm /etc/apt/sources.list.d/mongodb*
sudo rm /etc/apt/sources.list.d/100-ubnt-unifi.list
sudo service mongod stop
sudo apt purge mongodb-org*
sudo apt purge mongodb
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
sudo apt autoremove 
sudo rm /etc/apt/sources.list.d/mongod*.list
sudo apt purge unifi -y
sudo rm /usr/lib/unifi
sudo apt purge oracle-java* -y
sudo apt autoremove

... and then tried the script again.

 

And here's what happened:

 

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

 UniFi dependency installation completed
 Now installing UniFi Controller 5.8.28

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


--2018-08-30 00:00:36--  https://dl.ubnt.com/unifi/5.8.28/unifi_sysvinit_all.deb
Resolving dl.ubnt.com (dl.ubnt.com)... 13.33.100.78
Connecting to dl.ubnt.com (dl.ubnt.com)|13.33.100.78|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 66812202 (64M) [application/x-debian-package]
Saving to: ‘unifi_sysvinit_all.deb’

unifi_sysvinit_all. 100%[===================>]  63,72M  10,2MB/s    in 6,3s    

2018-08-30 00:00:42 (10,2 MB/s) - ‘unifi_sysvinit_all.deb’ saved [66812202/66812202]

Selecting previously unselected package unifi.
(Reading database ... 217587 files and directories currently installed.)
Preparing to unpack unifi_sysvinit_all.deb ...
Unpacking unifi (5.8.28-11052-1) ...
dpkg: dependency problems prevent configuration of unifi:
 unifi depends on mongodb-server (<< 1:3.6.0) | mongodb-10gen (<< 3.6.0) | mongodb-org-server (<< 3.6.0); however:
  Package mongodb-server is not installed.
  Package mongodb-10gen is not installed.
  Version of mongodb-org-server on system is 4.0.2.

dpkg: error processing package unifi (--install):
 dependency problems - leaving unconfigured
Processing triggers for systemd (229-4ubuntu21.4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 unifi

########################################
# An error occurred. Aborting script.. #
#######################################
Senior Member
Posts: 10,064
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 @viccctor,

 

Welcome to the community!

 

Seems like MongoDB didn't get removed correctly, could you show me the ouput of these commands?

sudo service mongod stop
sudo apt-get purge mongodb*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
sudo rm /etc/apt/sources.list.d/mongodb*

 

 

 

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: ‎08-29-2018

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

Hi Glenn, and thank you!

 

Ok, here's the output. In parts.

 

When I type the frist line and use tab to compete, it gives me mongodb instead of mongod. See the output below.

 

victor@Fladern:~$ sudo service mongod stop
victor@Fladern:~$ sudo service mongodb stop
Warning: mongodb.service changed on disk. Run 'systemctl daemon-reload' to reload units.
victor@Fladern:~$ sudo apt-get purge mongodb*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'mongodb18-10gen' for glob 'mongodb*'
Note, selecting 'mongodb-org-unstable-tools' for glob 'mongodb*'
Note, selecting 'mongodb' for glob 'mongodb*'
Note, selecting 'mongodb-org-mongos' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-mongos' for glob 'mongodb*'
Note, selecting 'mongodb-org-tools' for glob 'mongodb*'
Note, selecting 'mongodb-stable' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-enterprise-shell' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-unstable-shell' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-tools' for glob 'mongodb*'
Note, selecting 'mongodb-nightly' for glob 'mongodb*'
Note, selecting 'mongodb-org-unstable-server' for glob 'mongodb*'
Note, selecting 'mongodb-org-unstable-shell' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable' for glob 'mongodb*'
Note, selecting 'mongodb-org-shell' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-tools' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise' for glob 'mongodb*'
Note, selecting 'mongodb-server' for glob 'mongodb*'
Note, selecting 'mongodb-org-unstable-mongos' for glob 'mongodb*'
Note, selecting 'mongodb-dev' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-enterprise-server' for glob 'mongodb*'
Note, selecting 'mongodb-10gen' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-enterprise' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-shell' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-unstable-server' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-unstable' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-mongos' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-server' for glob 'mongodb*'
Note, selecting 'mongodb-org-unstable' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-enterprise-mongos' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-shell' for glob 'mongodb*'
Note, selecting 'mongodb-org' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-unstable-mongos' for glob 'mongodb*'
Note, selecting 'mongodb-clients' for glob 'mongodb*'
Note, selecting 'mongodb-org-server' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-enterprise-tools' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-server' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-unstable-tools' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-enterprise' for glob 'mongodb*'
Note, selecting 'mongodb20-10gen' for glob 'mongodb*'
Package 'mongodb-10gen' is not installed, so not removed
Package 'mongodb-10gen-enterprise' is not installed, so not removed
Package 'mongodb-10gen-unstable' is not installed, so not removed
Package 'mongodb-10gen-unstable-enterprise' is not installed, so not removed
Package 'mongodb-10gen-unstable-enterprise-mongos' is not installed, so not removed
Package 'mongodb-10gen-unstable-enterprise-server' is not installed, so not removed
Package 'mongodb-10gen-unstable-enterprise-shell' is not installed, so not removed
Package 'mongodb-10gen-unstable-enterprise-tools' is not installed, so not removed
Package 'mongodb-10gen-unstable-mongos' is not installed, so not removed
Package 'mongodb-10gen-unstable-server' is not installed, so not removed
Package 'mongodb-10gen-unstable-shell' is not installed, so not removed
Package 'mongodb-10gen-unstable-tools' is not installed, so not removed
Package 'mongodb-dev' is not installed, so not removed
Package 'mongodb-enterprise' is not installed, so not removed
Package 'mongodb-enterprise-mongos' is not installed, so not removed
Package 'mongodb-enterprise-server' is not installed, so not removed
Package 'mongodb-enterprise-shell' is not installed, so not removed
Package 'mongodb-enterprise-tools' is not installed, so not removed
Package 'mongodb-enterprise-unstable' is not installed, so not removed
Package 'mongodb-enterprise-unstable-mongos' is not installed, so not removed
Package 'mongodb-enterprise-unstable-server' is not installed, so not removed
Package 'mongodb-enterprise-unstable-shell' is not installed, so not removed
Package 'mongodb-enterprise-unstable-tools' is not installed, so not removed
Package 'mongodb-nightly' is not installed, so not removed
Package 'mongodb-org-unstable' is not installed, so not removed
Package 'mongodb-org-unstable-mongos' is not installed, so not removed
Package 'mongodb-org-unstable-server' is not installed, so not removed
Package 'mongodb-org-unstable-shell' is not installed, so not removed
Package 'mongodb-org-unstable-tools' is not installed, so not removed
Package 'mongodb-stable' is not installed, so not removed
Package 'mongodb18-10gen' is not installed, so not removed
Package 'mongodb20-10gen' is not installed, so not removed
Package 'mongodb' is not installed, so not removed
Package 'mongodb-clients' is not installed, so not removed
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 unifi : Depends: mongodb-server (>= 2.4.10) but it is not going to be installed or
                  mongodb-10gen (>= 2.4.14) but it is not installable or
                  mongodb-org-server (>= 2.6.0) but it is not going to be installed
         Depends: mongodb-server (< 1:3.6.0) but it is not going to be installed or
                  mongodb-10gen (< 3.6.0) but it is not installable or
                  mongodb-org-server (< 3.6.0) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
victor@Fladern:~$ 

 

and here the output for removing stuff

 

victor@Fladern:~$ sudo rm -r /var/log/mongodb
rm: cannot remove '/var/log/mongodb': No such file or directory
victor@Fladern:~$ sudo rm -r /var/lib/mongodb
rm: cannot remove '/var/lib/mongodb': No such file or directory
victor@Fladern:~$ sudo rm /etc/apt/sources.list.d/mongodb*
victor@Fladern:~$

 

Hope this give you a clue to what the problem is.

 

// Victor

Senior Member
Posts: 10,064
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 @viccctor,

 

Run my script again please.

 

 

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: ‎08-29-2018

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

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

 Getting the latest patches for your machine!
 And installing needed packages!

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


Hit:1 http://se.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://se.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]    
Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]     
Hit:4 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease        
Hit:5 http://se.archive.ubuntu.com/ubuntu xenial-backports InRelease           
Hit:6 https://downloads.plex.tv/repo/deb public InRelease                      
Hit:7 http://dl.ubnt.com/unifi/debian stable InRelease                    
Fetched 216 kB in 0s (293 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
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 unifi : Depends: mongodb-server (< 1:3.6.0) but it is not installed or
                  mongodb-10gen (< 3.6.0) but it is not installable or
                  mongodb-org-server (< 3.6.0) but 4.0.2 is installed
E: Unmet dependencies. Try using -f.

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

root@Fladern:/# 
Senior Member
Posts: 10,064
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 @viccctor,

 

Hmmm.... run these commands again, please share the output...

sudo apt -f install 
sudo service mongod stop
sudo apt-get purge mongodb*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
sudo rm /etc/apt/sources.list.d/mongodb*
sudo apt autoremove

 

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: ‎08-29-2018

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

Thank you for helping me!

 

victor@Fladern:/# sudo apt -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  unifi
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 120 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 218845 files and directories currently installed.)
Removing unifi (5.8.28-11052-1) ...
Processing triggers for systemd (229-4ubuntu21.4) ...
Processing triggers for ureadahead (0.100.0-19) ...
ureadahead will be reprofiled on next reboot
victor@Fladern:~$ sudo service mongodb stop
victor@Fladern:~$ sudo service mongod stop
victor@Fladern:~$ sudo apt-get purge mongodb*
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'mongodb18-10gen' for glob 'mongodb*'
Note, selecting 'mongodb-org-unstable-tools' for glob 'mongodb*'
Note, selecting 'mongodb' for glob 'mongodb*'
Note, selecting 'mongodb-org-mongos' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-mongos' for glob 'mongodb*'
Note, selecting 'mongodb-org-tools' for glob 'mongodb*'
Note, selecting 'mongodb-stable' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-enterprise-shell' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-unstable-shell' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-tools' for glob 'mongodb*'
Note, selecting 'mongodb-nightly' for glob 'mongodb*'
Note, selecting 'mongodb-org-unstable-server' for glob 'mongodb*'
Note, selecting 'mongodb-org-unstable-shell' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable' for glob 'mongodb*'
Note, selecting 'mongodb-org-shell' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-tools' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise' for glob 'mongodb*'
Note, selecting 'mongodb-server' for glob 'mongodb*'
Note, selecting 'mongodb-org-unstable-mongos' for glob 'mongodb*'
Note, selecting 'mongodb-dev' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-enterprise-server' for glob 'mongodb*'
Note, selecting 'mongodb-10gen' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-enterprise' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-shell' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-unstable-server' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-unstable' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-mongos' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-server' for glob 'mongodb*'
Note, selecting 'mongodb-org-unstable' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-enterprise-mongos' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-shell' for glob 'mongodb*'
Note, selecting 'mongodb-org' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-unstable-mongos' for glob 'mongodb*'
Note, selecting 'mongodb-clients' for glob 'mongodb*'
Note, selecting 'mongodb-org-server' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-enterprise-tools' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-server' for glob 'mongodb*'
Note, selecting 'mongodb-enterprise-unstable-tools' for glob 'mongodb*'
Note, selecting 'mongodb-10gen-unstable-enterprise' for glob 'mongodb*'
Note, selecting 'mongodb20-10gen' for glob 'mongodb*'
Package 'mongodb-10gen' is not installed, so not removed
Package 'mongodb-10gen-enterprise' is not installed, so not removed
Package 'mongodb-10gen-unstable' is not installed, so not removed
Package 'mongodb-10gen-unstable-enterprise' is not installed, so not removed
Package 'mongodb-10gen-unstable-enterprise-mongos' is not installed, so not removed
Package 'mongodb-10gen-unstable-enterprise-server' is not installed, so not removed
Package 'mongodb-10gen-unstable-enterprise-shell' is not installed, so not removed
Package 'mongodb-10gen-unstable-enterprise-tools' is not installed, so not removed
Package 'mongodb-10gen-unstable-mongos' is not installed, so not removed
Package 'mongodb-10gen-unstable-server' is not installed, so not removed
Package 'mongodb-10gen-unstable-shell' is not installed, so not removed
Package 'mongodb-10gen-unstable-tools' is not installed, so not removed
Package 'mongodb-dev' is not installed, so not removed
Package 'mongodb-enterprise' is not installed, so not removed
Package 'mongodb-enterprise-mongos' is not installed, so not removed
Package 'mongodb-enterprise-server' is not installed, so not removed
Package 'mongodb-enterprise-shell' is not installed, so not removed
Package 'mongodb-enterprise-tools' is not installed, so not removed
Package 'mongodb-enterprise-unstable' is not installed, so not removed
Package 'mongodb-enterprise-unstable-mongos' is not installed, so not removed
Package 'mongodb-enterprise-unstable-server' is not installed, so not removed
Package 'mongodb-enterprise-unstable-shell' is not installed, so not removed
Package 'mongodb-enterprise-unstable-tools' is not installed, so not removed
Package 'mongodb-nightly' is not installed, so not removed
Package 'mongodb-org-unstable' is not installed, so not removed
Package 'mongodb-org-unstable-mongos' is not installed, so not removed
Package 'mongodb-org-unstable-server' is not installed, so not removed
Package 'mongodb-org-unstable-shell' is not installed, so not removed
Package 'mongodb-org-unstable-tools' is not installed, so not removed
Package 'mongodb-stable' is not installed, so not removed
Package 'mongodb18-10gen' is not installed, so not removed
Package 'mongodb20-10gen' is not installed, so not removed
Package 'mongodb' is not installed, so not removed
Package 'mongodb-clients' is not installed, so not removed
The following packages will be REMOVED:
  mongodb-org* mongodb-org-mongos* mongodb-org-server* mongodb-org-shell*
  mongodb-org-tools* mongodb-server*
0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
After this operation, 244 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 217586 files and directories currently installed.)
Removing mongodb-org (4.0.2) ...
Purging configuration files for mongodb-org (4.0.2) ...
Removing mongodb-org-mongos (4.0.2) ...
Removing mongodb-org-server (4.0.2) ...
Purging configuration files for mongodb-org-server (4.0.2) ...
Removing mongodb-org-shell (4.0.2) ...
Removing mongodb-org-tools (4.0.2) ...
Removing mongodb-server (1:2.6.10-0ubuntu1) ...
Purging configuration files for mongodb-server (1:2.6.10-0ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
victor@Fladern:~$ sudo rm -r /var/log/mongodb
rm: cannot remove '/var/log/mongodb': No such file or directory
victor@Fladern:~$ sudo rm -r /var/lib/mongodb
rm: cannot remove '/var/lib/mongodb': No such file or directory
victor@Fladern:~$ sudo rm /etc/apt/sources.list.d/mongodb*
rm: cannot remove '/etc/apt/sources.list.d/mongodb*': No such file or directory
victor@Fladern:~$ sudo apt autoremove
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
victor@Fladern:~$
Senior Member
Posts: 10,064
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 @viccctor,

 

This looks good, now lets hope it works...

Run the script again please.

 

 

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: ‎08-29-2018

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

Working!

 

Thank you so much!!

 

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

 UniFi 5.8.28 has been installed successfully
 Now checking UniFi system status
 
 TIP: Press CTRL+C to exit UniFi system status!

 Author   | Glenn Rietveld
 Email    | glennrietveld8@hotmail.nl
 Website  | https://glennr.nl

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



● unifi.service - unifi
   Loaded: loaded (/lib/systemd/system/unifi.service; enabled; vendor preset: en
   Active: active (running) since tor 2018-08-30 08:34:31 CEST; 5min ago
 Main PID: 24983 (jsvc)
   CGroup: /system.slice/unifi.service
           ├─24983 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jr
           ├─24984 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jr
           ├─24985 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jr
           ├─25015 /usr/lib/jvm/java-8-oracle/jre/bin/java -Dfile.encoding=UTF-8
           └─25864 bin/mongod --dbpath /usr/lib/unifi/data/db --port 27117 --uni

aug 30 08:33:47 Fladern systemd[1]: Starting unifi...
aug 30 08:33:48 Fladern unifi.init[24897]:  * Starting Ubiquiti UniFi Controller
aug 30 08:34:31 Fladern unifi.init[24897]:    ...done.
aug 30 08:34:31 Fladern systemd[1]: Started unifi.
aug 30 08:34:32 Fladern systemd[1]: Started unifi.
lines 1-16/16 (END)
Senior Member
Posts: 10,064
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 @viccctor,

 

Awesome!

Goodluck with your controller!

 

 

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: ‎05-31-2018

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

Great script AmazedMender, we were in the same situation as Vicctor and the final solution seems to be the only one working for installation IF you are running 18.04 LTS and MongoDB 3.6.3 AND allready have a working installation of unifi. However for us we cannot access the webpage after the installation is complete.

We get the certwarning and the web is responding on the port but the unifi page will not be displayed. 

Both Mongod and unifi service is started successfully. I validated the mongod version its been successfully downgraded with the script. 

 

Any suggestions? Thanks.  .

Senior Member
Posts: 10,064
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 @caleit,

 

Is it a clean installation?

Are you able to click okay on the certification warning?

 

 

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
Member
Posts: 357
Registered: ‎02-11-2014
Kudos: 48
Solutions: 4

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

your scripts awesome! you should add in beta version too!

New Member
Posts: 4
Registered: ‎05-31-2018

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

Hello, No thats the problem. it will not proceed from the certificate warning. It just doesn´t start the unifi start page. 

 

Yes its a complete clean installation. I do have snapshots though so i did a rollback. I could try just using the update script though but i must run the purge of the mongodb otherwise it will not install complaining of the mongod version

Senior Member
Posts: 10,064
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 @caleit,

 

Run all these commands, after that run my script.

sudo service mongod stop
sudo apt purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb
sudo apt autoremove 
sudo rm /etc/apt/sources.list.d/mongod*.list
sudo apt purge unifi -y
sudo apt purge oracle-java* -y
sudo apt autoremove

 

 

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,064
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 @cardins2u,

 

Thanks for your kind words!

I will consider posting my scripts in beta.

 

 

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