Deployment Overview of MongoDB on Server¶
Prerequisites and Basic Requirements¶
The deployment of MongoDB requires a Debian-based operating system. The installation process utilizes the APT package manager and requires root privileges to execute system-level commands. The following software components are installed as part of the setup: - curl - gnupg - nano - vim - htop - net-tools - dnsutils
Application Installation Process¶
The application is installed using the official MongoDB repository. The process involves adding the GPG key and configuring the repository source before installing the mongodb-org package.
- The GPG key is retrieved from
https://www.mongodb.org/static/pgp/server-{{ mongo_version }}.asc. - A repository list file is created at
/etc/apt/sources.list.d/mongodb-org-{{ mongo_version}}.listwith the following content: - The
mongodb-orgpackage is installed via APT.
Starting, Stopping, and Updating¶
The MongoDB service is managed using systemd. After installation, the service is started and enabled to run automatically on system boot.
- To start the service:
- To enable the service:
- To stop the service:
- To restart the service:
- To check the status of the service: