Installation on Ubuntu / Debian
MongoDB publishes its own APT repository, which should be preferred over the
distribution's packages (often several major versions behind). The
installation block adds the GPG key, declares the repository, then installs the
mongodb-org meta-package.
The mongod service starts via systemd; enable it at boot with
systemctl enable mongod. The configuration lives in /etc/mongod.conf.