Score:0

How do you install MongoDB 5.0 on Ubuntu 20.04 with apt-get?

re flag

I'm wondering how to install the latest MongoDB version 5.0 via apt-get to avoid having to spend time on the mongodb official website and enter any personal information.

Score:0
re flag
  1. Add the mongo pgp key:

curl -fsSL https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -

  1. Add the mongodb source list

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list

  1. Run update to update local sources list

sudo apt update

  1. Install the mongodb package

sudo apt install mongodb-org

  1. Start the mongodb servicde

sudo systemctl start mongod.service

  1. Verify the service is running

sudo systemctl status mongod

  1. Configure mongodb to start on startup

sudo systemctl enable mongod

  1. Verify the mongo shell is installed and that you can connect to your local mongodb instance

mongo --eval 'db.runCommand({ connectionStatus: 1 })'

Source: https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-18-04-source

Modified versions from 4.4 to 5.0.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.