Is there any way to install MongoDB on Windows like Ubuntu..?

Viewed 76
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5

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

sudo apt-get update

sudo apt-get install -y mongodb-org

mkdir data

echo "mongod --dbpath=data --nojournal" > mongod

chmod a+x mongod

Is there any similar way to install MongoDB on Windows, like using these commands on Ubuntu? If there is.. What are the requirements?

2 Answers

apt-get is a linux package manager. There are some Windows package managers, too:


Examples of installing MongoDB server with package manager

You must first install one of the package managers above, then you can use their respective command line interfaces:

winget: (currently latest version available is v4.4.4)

winget install -e --id MongoDB.Server

scoop: (currently latest version available is v5.0)

scoop install mongodb
Related