- SSH to your Ubuntu server
- Import the v3.6 public key used by the package management system
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
- 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
- Reload local package database
sudo apt-get update
- Update to the latest stable version of MongoDB
sudo apt-get install -y mongodb-org
- Check the result
mongod --version
You should see "db version v3.6.0" - 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.