Hi,
On my 1st (original) Ubuntu 20.04 Dev Server I have Mongodb installed and use nodejs to provide a web application.
I now want to create a fresh server (2nd server) installed Mongodb using this guide : https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu and all went well.
However, the two server use different commands to start, stop etc and I don’t understand why ? Is it related to one being a daemon and the other being a DB ?
1st server - MongoDB shell version v3.6.8
systemctl start mongodb
root@ubuntu-s-1vcpu01:/# systemctl status mongodb
● mongodb.service - An object/document-oriented database
Loaded: loaded (/lib/systemd/system/mongodb.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2020-08-05 19:54:47 UTC; 53min ago
Docs: man:mongod(1)
Main PID: 1250559 (mongod)
Tasks: 26 (limit: 1137)
Memory: 133.5M
CGroup: /system.slice/mongodb.service
└─1250559 /usr/bin/mongod --unixSocketPrefix=/run/mongodb --config /etc/mongodb.conf
2nd server - MongoDB shell version v4.4.0
systemctl start mongod (no ‘b’ at end of command)
root@ubuntu1:~# systemctl status mongod
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: active (running) since Wed 2020-08-05 20:45:54 UTC; 21s ago
Docs: https://docs.mongodb.org/manual
Main PID: 36251 (mongod)
Memory: 162.6M
CGroup: /system.slice/mongod.service
└─36251 /usr/bin/mongod --config /etc/mongod.conf
Thanks