wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo systemctl status mongod
sudo systemctl enable mongod
sudo apt update
# Import the public key used by the package management system
# The operation should respond with an OK.
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
# Create a list file for MOngoDB
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
# Reload localpackage database
sudo apt update
#Install MongoDB packages
sudo apt install -y mongodb-org
FOR WSL2
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
sudo apt-get install gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list
sudo apt-get update
sudo apt-get install -y mongodb-org
sudo nano /etc/init.d/mongod
paste this content in the file 'https://raw.githubusercontent.com/mongodb/mongo/master/debian/init.d'
#give permissions
sudo chmod +x /etc/init.d/mongod
#start the service
sudo service mongod start
sudo systemctl start mongod
sudo systemctl stop mongod
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -sudo add-apt-repository 'deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse'CopyCopy
mongo
Code Example |
---|
Shell :: docker remove container |
Shell :: how to uninstall npm package |
Shell :: git stash example |
Shell :: git ignore updates to file |
Shell :: how to uninstall react-slick |
Shell :: firebase kill port |
Shell :: git change message specific commit |
Shell :: lenovo touchpad not working ubuntu |
Shell :: Something is already running on port 3000. Probably: |
Shell :: delete directory from cmd |
Shell :: wslconfig example |
Shell :: grep without |
Shell :: scp local to remote |
Shell :: git branch |
Shell :: gitlab docker setup |
Shell :: install fira code ubuntu |
Shell :: nodejs installation on ubuntu |
Shell :: vagrant box remove version |
Shell :: anaconda install package |
Shell :: current time linux |
Shell :: download latest docker-compose |
Shell :: gitbash update |
Shell :: zip a file terminal |
Shell :: ssh key |
Shell :: relaunch doc macos |
Shell :: bash not equal |
Shell :: check pip library path ubuntu |
Shell :: mkdir with permissions |
Shell :: Bash print elements in array |
Shell :: kill process using cmd |