How to Install Ubiquiti UniFi Controller 5 on Ubuntu
Please share with your friends...
  • 2
  •  
  •  
  •  
  •  
  • 1
  •  
  •  
  •  
  •  
    3
    Shares


⇐ BackPageNext ⇒

MongoDB 3.6

MongoDB is a free and open-source cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with schemas.

MongoDB 3.6 was released in November 2017, with a date for End-of-Life product support yet to be announced.

To install MongoDB 3.6, complete the following steps:

  1. Determine the MongoDB 3.6 repository to use based on the Ubuntu release codename, using the following commands:

    codename=$(lsb_release -s -c)
    if [ $codename == "artful" ] || [ $codename == "bionic" ]; then codename="xenial"; fi
    There is currently no specific MongoDB 3.6 repository for Ubuntu 17 Artful Aardvark or Ubuntu 18 LTS Bionic Beaver. However, these Ubuntu releases can use the MongoDB 3.6 repository for Ubuntu 16 LTS Xenial Xerus.
  2. Add the MongoDB 3.6 repository to the sources list, using the following command:

    echo 'deb https://repo.mongodb.org/apt/ubuntu '$codename'/mongodb-org/3.6 multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
  3. Import the MongoDB 3.6 repository public key, using the following command:

    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
  4. Update the package lists, using the following command:

    sudo apt-get update
  5. Launch the MongoDB 3.6 installer, using the following command:

    sudo apt-get install -y mongodb-org
    The download and installation process will begin and run through to completion with no further interaction required.
  1. The remaining steps are used to address an incompatibility between UniFi 5.x and MongoDB 3.x
    The UniFi software passes an unsupported –nohttpinterface parameter to MongoDB when starting the database engine, which unfortunately causes MongoDB to fail and shutdown.
    However, as a simple work-around until Ubiquiti fixes the problem, we can use a small BASH script to remove this unsupported parameter.
  2. Rename the existing mongod binary executable, using the following command:
    sudo mv /usr/bin/mongod /usr/bin/mongod.bin
  3. Use the nano text editor to create a new mongod script file, using the following command:
    sudo nano /usr/bin/mongod
  4. Type or paste the following script into the nano editor:
    #!/bin/bash
    args=$(echo $* | sed -e \'s/--nohttpinterface//\')
    exec /usr/bin/mongod.bin ${args}
  5. Press Ctrl+X to exit nano, press Y to save changes when prompted, and press Enter to confirm mongod as the filename.
  6. Mark the new mongod script file as executable, using the following command:
    sudo chmod +x /usr/bin/mongod

    MongoDB 3.6 is now installed and ready for use with UniFi 5.

⇐ BackPageNext ⇒

Ubuntu and the Ubuntu logo are trademarks of Canonical Ltd. Linux® is a registered trademark of Linus Torvalds. Mongo, MongoDB and the MongoDB leaf logo are registered trademarks of MongoDB, Inc. Oracle and Java™ are trademarks of the Oracle Corporation. UBNT and UniFi® are trademarks of Ubiquiti Networks, Inc.
How to Install Ubiquiti UniFi Controller 5 on Ubuntu

Please share with your friends...
  • 2
  •  
  •  
  •  
  •  
  • 1
  •  
  •  
  •  
  •  
    3
    Shares
Tagged on:                                     

2 thoughts on “How to Install Ubiquiti UniFi Controller 5 on Ubuntu

  • 17/07/2018 at 10:58 AM
    Permalink

    So i have run into this error after executing your script can you help me with this?
    The following packages have unmet dependencies:
    unifi : 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 3.6.6 is to be installed
    E: Unable to correct problems, you have held broken packages.

    Reply

Leave a Reply