Upgrading to MongoDB 3.6 on Ubuntu 16.04 LTS Dec 12, 2017

Update MongoDB 3.6

  1. SSH to your Ubuntu server
  2. Import the v3.6 public key used by the package management system
    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
  3. Create a list file for MongoDB v3.6
    echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
  4. Reload local package database
    sudo apt-get update
  5. Update to the latest stable version of MongoDB
    sudo apt-get upgrade
  6. Check the result
    mongod --version
    You should see "db version v3.6.0"
  7. Enable backwards-incompatible 3.6 features
    Run the setFeatureCompatibilityVersion command against the admin database:
    db.adminCommand( { setFeatureCompatibilityVersion: "3.6" } )

Congratulations! You are now have MongoDB 3.6.0 installed on your Ubuntu server.

Advertisement

Latest Updates