Last active
April 14, 2022 11:33
-
-
Save CharlesNepote/13198c2ed336fc64cb674d63876e8d99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MongoDB installation on Debian 10 or Debian 11 | |
apt update | |
apt upgrade -y | |
apt install gnupg | |
# Install libcurl3 from Debian 9 Stretch because Debian 10 only provide libcurl4 | |
echo "deb http://deb.debian.org/debian/ stretch main" | sudo tee /etc/apt/sources.list.d/debian-stretch.list | |
apt update | |
apt install libcurl3 | |
# Install MongoDB 4.4 | |
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add - | |
echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/4.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list | |
apt update | |
apt install -y mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools | |
# Test | |
mongo --version # should answer "MongoDB shell version v4.4.3 [...]" | |
# sudo systemctl enable mongod --now # start the DB | |
# mongo --eval 'db.runCommand({ connectionStatus: 1 })' # to verify mongo is running |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment