GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - NANDILLONMaxence/Install_auto_MongoDB

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
001_Install_mongodb-7.0-deb-all.sh
001_Install_mongodb-7.0-deb-all.sh
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Welcome to the repository for MongoDB 7 installation on all Debian. This README provides step-by-step instructions to install MongoDB Community Edition using the apt package manager. Let's get started !

Step 1: Install gnupg and curl if not already installed

sudo apt-get update
sudo apt-get install -y gnupg curl wget

Import the MongoDB public GPG key

curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \
   sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \
   --dearmor

Step 2: Create MongoDB sources list file for Debian 11 "Bullseye"

echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian `lsb_release -cs`/mongodb-org/7.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list

Step 3: Reload local package database

sudo apt-get update

Step 4: Install MongoDB packages

sudo apt-get install -y mongodb-org

Optional: Pin MongoDB package to prevent unintended upgrades

echo "mongodb-org hold" | sudo dpkg --set-selections
echo "mongodb-org-database hold" | sudo dpkg --set-selections
echo "mongodb-org-server hold" | sudo dpkg --set-selections
echo "mongodb-mongosh hold" | sudo dpkg --set-selections
echo "mongodb-org-mongos hold" | sudo dpkg --set-selections
echo "mongodb-org-tools hold" | sudo dpkg --set-selections

Step 5: Start MongoDB

sudo systemctl start mongod

Step 6: Run the following command first:

sudo systemctl daemon-reload

Step 7: Verify MongoDB status

sudo systemctl status mongod

Optional: Enable MongoDB to start on system reboot

sudo systemctl enable mongod

Step 8: Reload local package database

sudo apt-get update

Step 9: Stop MongoDB (if needed)

sudo systemctl stop mongod

Step 10: Restart MongoDB (if needed)

sudo systemctl restart mongod

Step 11: Remove MongoDB packages (if needed)

sudo apt-get purge "mongodb-org*"

Step 12: Remove MongoDB data directories (if needed)

sudo rm -r /var/log/mongodb
sudo rm -r /var/lib/mongodb

About

No description, website, or topics provided.

Resources

Readme
GPL-3.0 license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.