In this video you will learn how to install MongoDB in your linux system. An example will be shown on Ubuntu 20.04 distribution, we will go from updating server packages to removing MongoDB from the server. You can also learn how to enable password authorization on your MongoDB server
Commands used
Apt update && apt upgrade -y
apt install mongodb-server
systemctl status mongodb
systemctl enable mongodb
$mongo
version()
use admin
db.createUser({user: "Admin", pwd: "Admin", roles:[ { role: "userAdminAnyDatabase", db: "admin" }, "readWriteAnyDatabase" ]})
vi /etc/mongodb.conf
security:
authorization: enabled
systemctl restart mongodb
apt purge mongodb*