Reply
Senior Member
Posts: 10,616
Registered: ‎08-04-2017
Kudos: 1723
Solutions: 521

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

Hello @wireless-p,

 

No problem Man Happy Thanks for contacting me.

Goodluck with the controller 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: 4
Registered: ‎12-13-2017

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

[ Edited ]

Hi!
Have a problem installing UniFi controller on Ubuntu 18.04
Using script unifi-5.8.24.sh

Spoiler

Here is second part of install log:

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

Updates successful.
Now installing mongodb 3.4

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


deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse
OK
Hit:1 http://ua.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://ua.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://ua.archive.ubuntu.com/ubuntu bionic-backports InRelease
Ign:4 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease
Get:5 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Hit:6 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release
Hit:7 http://dl.ubnt.com/unifi/debian stable InRelease
Fetched 83.2 kB in 1s (106 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
The following additional packages will be installed:
mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
The following NEW packages will be installed:
mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/68.0 MB of archives.
After this operation, 271 MB of additional disk space will be used.
Selecting previously unselected package mongodb-org-shell.
(Reading database ... 103750 files and directories currently installed.)
Preparing to unpack .../mongodb-org-shell_3.4.16_amd64.deb ...
Unpacking mongodb-org-shell (3.4.16) ...
Selecting previously unselected package mongodb-org-server.
Preparing to unpack .../mongodb-org-server_3.4.16_amd64.deb ...
Unpacking mongodb-org-server (3.4.16) ...
Selecting previously unselected package mongodb-org-mongos.
Preparing to unpack .../mongodb-org-mongos_3.4.16_amd64.deb ...
Unpacking mongodb-org-mongos (3.4.16) ...
Preparing to unpack .../mongodb-org-tools_3.4.16_amd64.deb ...
Unpacking mongodb-org-tools (3.4.16) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_3.4.16_amd64.deb (--unpack):
trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Selecting previously unselected package mongodb-org.
Preparing to unpack .../mongodb-org_3.4.16_amd64.deb ...
Unpacking mongodb-org (3.4.16) ...
Errors were encountered while processing:
/var/cache/apt/archives/mongodb-org-tools_3.4.16_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

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

 

I can remove this packadge usin such commands

service mongod stop && apt-get purge mongodb-org* && rm -r /var/log/mongodb && rm -r /var/lib/mongodb

but still can't instal mongo-db the same error happens when runing script.
I don`t have previous installation of Unifi. So how can I install it?

Senior Member
Posts: 10,616
Registered: ‎08-04-2017
Kudos: 1723
Solutions: 521

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

Hello,

 

What does the command below show?

 

mongod --version

What error codes are your receiving when executing these commands?

 

sudo service mongod stop
sudo apt purge mongodb-org*
sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/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: 4
Registered: ‎12-13-2017

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

root@BackUp:/home/jmurr/install/UniFi# mongod --version

Spoiler
db version v3.4.16
git version: 0d6a9242c11b99ddadcfb6e86a850b6ba487530a
OpenSSL version: OpenSSL 1.0.2n 7 Dec 2017
allocator: tcmalloc
modules: none
build environment:
distmod: ubuntu1604
distarch: x86_64
target_arch: x86_64

 

After executing each command, the return code is 0

 

Spoiler

root@BackUp:/home/jmurr/install/UniFi# service mongod stop && echo $?
0
root@BackUp:/home/jmurr/install/UniFi# apt purge mongodb-org* && echo $?
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'mongodb-org-unstable-tools' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-mongos' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-tools' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-server' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-shell' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-shell' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-unstable-mongos' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-unstable' for glob 'mongodb-org*'
Note, selecting 'mongodb-org' for glob 'mongodb-org*'
Note, selecting 'mongodb-org-server' for glob 'mongodb-org*'
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-org' is not installed, so not removed
Package 'mongodb-org-mongos' is not installed, so not removed
Package 'mongodb-org-shell' is not installed, so not removed
Package 'mongodb-org-tools' is not installed, so not removed
The following packages were automatically installed and are no longer required:
ca-certificates-java fontconfig-config fonts-dejavu-core java-common jsvc libavahi-client3 libavahi-common-data libavahi-common3 libcommons-daemon-java libcups2 libfontconfig1 libjpeg-turbo8 libjpeg8
liblcms2-2 libpcsclite1 libxi6 libxrender1 libxtst6 openjdk-8-jre-headless x11-common
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
mongodb-org-server* unifi*
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
After this operation, 174 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 105801 files and directories currently installed.)
Removing unifi (5.8.24-11016) ...
Removing mongodb-org-server (3.4.16) ...
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for systemd (237-3ubuntu10) ...
Processing triggers for man-db (2.8.3-2) ...
(Reading database ... 104531 files and directories currently installed.)
Purging configuration files for unifi (5.8.24-11016) ...
Removing user `unifi' ...
Warning: group `unifi' has no more members.
Done.
Purging configuration files for mongodb-org-server (3.4.16) ...
0
root@BackUp:/home/jmurr/install/UniFi# rm -r /var/log/mongodb && echo $?
0
root@BackUp:/home/jmurr/install/UniFi# rm -r /var/lib/mongodb && echo $?
0
root@BackUp:/home/jmurr/install/UniFi# apt autoremove && echo $?
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
ca-certificates-java fontconfig-config fonts-dejavu-core java-common jsvc libavahi-client3 libavahi-common-data libavahi-common3 libcommons-daemon-java libcups2 libfontconfig1 libjpeg-turbo8 libjpeg8
liblcms2-2 libpcsclite1 libxi6 libxrender1 libxtst6 openjdk-8-jre-headless x11-common
0 upgraded, 0 newly installed, 20 to remove and 0 not upgraded.
After this operation, 107 MB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 104530 files and directories currently installed.)
Removing jsvc (1.0.15-8) ...
Removing libcommons-daemon-java (1.0.15-8) ...
Removing openjdk-8-jre-headless:amd64 (8u171-b11-0ubuntu0.18.04.1) ...
Removing libfontconfig1:amd64 (2.12.6-0ubuntu2) ...
Removing fontconfig-config (2.12.6-0ubuntu2) ...
Removing fonts-dejavu-core (2.37-1) ...
Removing java-common (0.63ubuntu1~02) ...
Removing libcups2:amd64 (2.2.7-1ubuntu2) ...
Removing libavahi-client3:amd64 (0.7-3.1ubuntu1) ...
Removing libavahi-common3:amd64 (0.7-3.1ubuntu1) ...
Removing libavahi-common-data:amd64 (0.7-3.1ubuntu1) ...
Removing libjpeg8:amd64 (8c-2ubuntu8) ...
Removing libjpeg-turbo8:amd64 (1.5.2-0ubuntu5.18.04.1) ...
Removing liblcms2-2:amd64 (2.9-1) ...
Removing libpcsclite1:amd64 (1.8.23-1) ...
Removing libxi6:amd64 (2:1.7.9-1) ...
Removing libxrender1:amd64 (1:0.9.10-1) ...
Removing libxtst6:amd64 (2:1.2.3-1) ...
Removing x11-common (1:7.7+19ubuntu7) ...
Removing ca-certificates-java (20170930ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...
Processing triggers for ca-certificates (20180409) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...

updates of cacerts keystore disabled.
done.
0

 

 

 

 

Senior Member
Posts: 10,616
Registered: ‎08-04-2017
Kudos: 1723
Solutions: 521

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

Hello,

 

Could you execute the script one more time?

 

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: ‎12-13-2017

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

Still getting error

 

Spoiler

root@BackUp:/home/jmurr/install/UniFi# rm -f unifi-5.8.24.sh && wget https://get.glennr.nl/unifi/5.8.24/U1804/unifi-5.8.24.sh && chmod +x unifi-5.8.24.sh && echo unifi-5.8.24.sh && ./unifi-5.8.24.sh
--2018-07-10 17:19:10-- https://get.glennr.nl/unifi/5.8.24/U1804/unifi-5.8.24.sh
Resolving get.glennr.nl (get.glennr.nl)... 51.38.48.41
Connecting to get.glennr.nl (get.glennr.nl)|51.38.48.41|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3279 (3.2K) [text/x-sh]
Saving to: ‘unifi-5.8.24.sh’

unifi-5.8.24.sh 100%[======================================================================================================================>] 3.20K --.-KB/s in 0.001s

2018-07-10 17:19:10 (2.10 MB/s) - ‘unifi-5.8.24.sh’ saved [3279/3279]

unifi-5.8.24.sh
################################################

Getting the latest patches for your machine!

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


Hit:1 http://ua.archive.ubuntu.com/ubuntu bionic InRelease
Get:2 http://ua.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:3 http://ua.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Ign:5 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease
Hit:6 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release
Hit:7 http://dl.ubnt.com/unifi/debian stable InRelease
Fetched 247 kB in 1s (281 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
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
################################################

Updates successful.
Now installing mongodb 3.4

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


deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse
OK
Hit:1 http://ua.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://ua.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://ua.archive.ubuntu.com/ubuntu bionic-backports InRelease
Ign:4 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 InRelease
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:6 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 Release
Hit:7 http://dl.ubnt.com/unifi/debian stable InRelease
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
The following additional packages will be installed:
mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
The following NEW packages will be installed:
mongodb-org mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 30.6 MB/68.0 MB of archives.
After this operation, 271 MB of additional disk space will be used.
Get:1 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4/multiverse amd64 mongodb-org-shell amd64 3.4.16 [7,997 kB]
Get:2 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4/multiverse amd64 mongodb-org-server amd64 3.4.16 [14.3 MB]
Get:3 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4/multiverse amd64 mongodb-org-mongos amd64 3.4.16 [8,286 kB]
Get:4 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4/multiverse amd64 mongodb-org amd64 3.4.16 [3,522 B]
Fetched 30.6 MB in 47s (649 kB/s)

Selecting previously unselected package mongodb-org-shell.
(Reading database ... 104104 files and directories currently installed.)
Preparing to unpack .../mongodb-org-shell_3.4.16_amd64.deb ...
Unpacking mongodb-org-shell (3.4.16) ...
Selecting previously unselected package mongodb-org-server.
Preparing to unpack .../mongodb-org-server_3.4.16_amd64.deb ...
Unpacking mongodb-org-server (3.4.16) ...
Selecting previously unselected package mongodb-org-mongos.
Preparing to unpack .../mongodb-org-mongos_3.4.16_amd64.deb ...
Unpacking mongodb-org-mongos (3.4.16) ...
Preparing to unpack .../mongodb-org-tools_3.4.16_amd64.deb ...
Unpacking mongodb-org-tools (3.4.16) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_3.4.16_amd64.deb (--unpack):
trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Selecting previously unselected package mongodb-org.
Preparing to unpack .../mongodb-org_3.4.16_amd64.deb ...
Unpacking mongodb-org (3.4.16) ...
Errors were encountered while processing:
/var/cache/apt/archives/mongodb-org-tools_3.4.16_amd64.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

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

 

 

 

Senior Member
Posts: 10,616
Registered: ‎08-04-2017
Kudos: 1723
Solutions: 521

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

[ Edited ]

Hello @jMurr,

 

Strange... Is it a clean installed server?

There are mongodb 3.6 packages installed which don't want to get uninstalled...

 

If it is a clean install i would suggest to setup a clean Ubuntu 18.04 server...

 

Could you try running these commands?

sudo rm /usr/bin/click
sudo apt --fix-broken install

 

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: ‎12-13-2017

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

 

 

Spoiler

  

root@BackUp:/home/jmurr# sudo rm /usr/bin/click
rm: cannot remove '/usr/bin/click': No such file or directory

 

 

Spoiler

 

root@BackUp:/home/jmurr# apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  mongodb-org-tools
The following NEW packages will be installed:
  mongodb-org-tools
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
Need to get 0 B/37.4 MB of archives.
After this operation, 156 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
(Reading database ... 104131 files and directories currently installed.)
Preparing to unpack .../mongodb-org-tools_3.4.16_amd64.deb ...
Unpacking mongodb-org-tools (3.4.16) ...
dpkg: error processing archive /var/cache/apt/archives/mongodb-org-tools_3.4.16_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/bsondump', which is also in package mongo-tools 3.6.3-0ubuntu1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/mongodb-org-tools_3.4.16_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

O.K. I'll reinstall server and then try to run your script.
I think that this is the simplest way

New Member
Posts: 3
Registered: ‎05-31-2017

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

Running into this issue  (twice now) when attempting to run the script on a google cloud platform Ubuntu 18.04, any idea what's going on?  This was done on a freshly deployed vm, twice, each time with same results. 

 

 

 UniFi 5.8.24 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: enabled)
   Active: active (running) since Thu 2018-07-12 20:33:44 UTC; 3s ago
    Tasks: 29 (limit: 667)
   CGroup: /system.slice/unifi.service
           ├─22485 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre -cp /usr/share/java/commons-daemo
           ├─22487 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre -cp /usr/share/java/commons-daemo
           ├─22488 unifi -cwd /usr/lib/unifi -home /usr/lib/jvm/java-8-oracle/jre -cp /usr/share/java/commons-daemo
           ├─22507 /usr/lib/jvm/java-8-oracle/jre/bin/java -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Dapple.a
           └─22538 curl -s --connect-timeout 1 -o /dev/null -w %{http_code} http://localhost:8080/status

Jul 12 20:33:44 unifi-server systemd[1]: unifi.service: Found left-over process 22488 (jsvc) in control group while
Jul 12 20:33:44 unifi-server systemd[1]: This usually indicates unclean termination of a previous run, or service i
Jul 12 20:33:44 unifi-server systemd[1]: unifi.service: Found left-over process 22507 (java) in control group while
Jul 12 20:33:44 unifi-server systemd[1]: This usually indicates unclean termination of a previous run, or service i
Jul 12 20:33:44 unifi-server systemd[1]: unifi.service: Found left-over process 22538 (curl) in control group while
Jul 12 20:33:44 unifi-server systemd[1]: This usually indicates unclean termination of a previous run, or service i
Jul 12 20:33:44 unifi-server systemd[1]: Starting unifi...
Jul 12 20:33:44 unifi-server unifi.init[22568]:  * Starting Ubiquiti UniFi Controller unifi
Jul 12 20:33:44 unifi-server unifi.init[22568]:    ...fail!
Jul 12 20:33:44 unifi-server systemd[1]: Started unifi.
lines 1-21/21 (END)

 

Senior Member
Posts: 10,616
Registered: ‎08-04-2017
Kudos: 1723
Solutions: 521

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

[ Edited ]

Hello @jgmiterek,

 

Are you able to access the controller by going to its interface?

https://ipofserver:8443

 

First time seeing this... Have you tried a restart?

What are the specifications of the server, are they within the minimum system requirements?

 

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: 3
Registered: ‎05-31-2017

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

Hello,

1. I am unable to access controller using https://ipofserver:8443, i have tipple checked my firewall rules and settings which is configured with following;
ports: tcp:80; tcp:8880; tcp:8443; tcp:8843; tcp:8080; tcp:6789; udp:3478 including open http and https access

2. Have restarted multiple times with no difference

The only thing, which i'm not sure it should have mattered but it may, when i ran the script i ran it via sudo vs # root
Senior Member
Posts: 10,616
Registered: ‎08-04-2017
Kudos: 1723
Solutions: 521

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

Hello,

 

Does the server have the minimum requirements? (See my previous post)

Could you run it as root?

 

If you don't have a root password set run the following commands.

 

sudo passwd root
su

 

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: 3
Registered: ‎05-31-2017

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

Attempting to do it again using Ubuntu 16.04 while running script as root

The vm is the micro spec (free version) of googles cloud platform, the only thing i can see that it misses out on is the required memory

Thing is though i had some luck using different method ( https://metis.fi/en/2018/02/unifi-on-gcp/ ) except i could not cloud connect controller, but it would run using same system specs

f1-micro (1 vCPU, 0.6 GB memory)
CPU platform
Intel Haswell


New Member
Posts: 2
Registered: ‎02-09-2018
Kudos: 1

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

Thanks for the script - I had the same issue as @jMurr and solved it by removing the /apt/sources/sources.list.d/mongo something file, fixing the broken dependencies, removing mongodb* and then running the script again. In case you havent reinstalled the server yet, maybe this helps too.

 

 

Senior Member
Posts: 10,616
Registered: ‎08-04-2017
Kudos: 1723
Solutions: 521

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

[ Edited ]

Hello @MaxStephan,

 

Thanks for the feedback!

 

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: ‎02-09-2018
Kudos: 1

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

[ Edited ]

Output below:

 

pi@KGTec1Ubiquity:~$ mongod --version
db version v3.4.16
git version: 0d6a9242c11b99ddadcfb6e86a850b6ba487530a
OpenSSL version: OpenSSL 1.0.2n  7 Dec 2017
allocator: tcmalloc
modules: none
build environment:
    distmod: ubuntu1604
    distarch: x86_64
    target_arch: x86_64

 running on 

 

Welcome to Ubuntu 18.04 LTS (GNU/Linux 4.15.0-23-generic x86_64)

 

I guess in my case the mess occured because I tried the installation of the latest stable unifi on 18.04 before, somehow this left some weird remains of the new MongoDB which caused failure of your script... Before trying that I also tried to go back to an old Unify version by directly referencing that in apt sources, then tried "testing" release and perhaps some other stuff as well... At some point I also thought of reinstalling the VM from scratch.

Senior Member
Posts: 10,616
Registered: ‎08-04-2017
Kudos: 1723
Solutions: 521

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

Hello,

 

Added a option to chose if you want to be able to update the controller version using:

apt update && apt upgrade

This has been suggested by a user, thank you for your suggestion!

 

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: ‎07-13-2018
Kudos: 1

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

Thank you for your script. I found this topic and it is so fast and useful.
Senior Member
Posts: 10,616
Registered: ‎08-04-2017
Kudos: 1723
Solutions: 521

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

Hello @zacharytruong,

 

Welcome to the community!

 

Thanks for your feedback goodluck on your site!

 

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: ‎06-28-2016
Kudos: 5

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

Thank you, thank you, thank you!

 

Been trying to get a new controller up and running on AWS since I lost access to admin privileges to my old AWS controller.  This made it happen!

Reply