- Install MongoDB >
- Install MongoDB Enterprise >
- Install MongoDB Enterprise on Linux >
- Install MongoDB Enterprise on Debian
Install MongoDB Enterprise on Debian¶
On this page
Overview¶
Use this tutorial to install MongoDB Enterprise from .deb
packages on
Debian 8 “Jessie”.
Important
The unofficial mongodb
package provided by Debian is
not maintained by MongoDB. You should always use the official
MongoDB mongodb-enterprise
packages, which are kept up-to-date with the
most recent major and minor MongoDB releases.
Platform Support
This installation guide only supports 64-bit systems. See Platform Support for details.
MongoDB provides officially supported Enterprise packages in their own repository. This repository contains the following packages:
Package Name | Description |
---|---|
mongodb-enterprise |
A metapackage that will automatically install
the four component packages listed below. |
mongodb-enterprise-server |
Contains the mongod daemon and associated
configuration and init scripts. |
mongodb-enterprise-mongos |
Contains the mongos daemon. |
mongodb-enterprise-shell |
Contains the mongo shell. |
mongodb-enterprise-tools |
Contains the following MongoDB tools: mongoimport
bsondump , mongodump , mongoexport ,
mongofiles , mongooplog ,
mongoperf , mongorestore , mongostat ,
and mongotop . |
Install MongoDB Enterprise¶
Note
To install a different version of MongoDB, please refer to that version’s documentation. For example, see version 3.2.
This installation guide only supports 64-bit systems. See Platform Support for details.
Use the provided distribution packages as described in this page if possible. These packages will automatically install all of MongoDB’s dependencies, and are the recommended installation method.
Import the public key used by the package management system.¶
From a terminal, issue the following command to import the MongoDB public GPG Key from https://www.mongodb.org/static/pgp/server-3.4.asc:
The operation should respond with an OK
.
Create a /etc/apt/sources.list.d/mongodb-enterprise.list
file for MongoDB.¶
Create the list file using the command appropriate for your version of Debian:
- Debian 8 “Jessie”
If you’d like to install MongoDB Enterprise packages from a particular release series, such as 2.6, you can specify the release series in the repository configuration. For example, to restrict your system to the 2.6 release series, add the following repository:
Currently packages are only available for Debian 8 “Jessie”.
Reload local package database.¶
Issue the following command to reload the local package database:
Install MongoDB Enterprise From Tarball¶
While you should use the .deb
packages as previously
described, you may also manually install MongoDB using the tarballs. See
Install MongoDB Enterprise From Tarball for details.
Run MongoDB Enterprise¶
The MongoDB instance stores its data files in /var/lib/mongodb
and its log files in /var/log/mongodb
by default,
and runs using the mongodb
user account. You can specify alternate log and data file
directories in /etc/mongod.conf
. See systemLog.path
and storage.dbPath
for additional information.
If you change the user that runs the MongoDB process, you
must modify the access control rights to the /var/lib/mongodb
and
/var/log/mongodb
directories to give this user access to these
directories.
Most Unix-like operating systems limit the system resources that a session may use. These limits may negatively impact MongoDB operation. See UNIX ulimit Settings for more information.
Verify that MongoDB has started successfully¶
Verify that the mongod
process has started
successfully:
You can also check the log file for the current status of the
mongod
process, located at:
/var/log/mongodb/mongod.log
by default. A running
mongod
instance will indicate that it is ready for
connections with the following line:
[initandlisten] waiting for connections on port 27017
Begin using MongoDB.¶
To help you start using MongoDB, MongoDB provides Getting Started Guides in various driver editions. See Getting Started for the available editions.
Before deploying MongoDB in a production environment, consider the Production Notes document.
Later, to stop MongoDB, press Control+C
in the terminal where the
mongod
instance is running.
Uninstall MongoDB¶
To completely remove MongoDB from a system, you must remove the MongoDB applications themselves, the configuration files, and any directories containing data and logs. The following section guides you through the necessary steps.
Warning
This process will completely remove MongoDB, its configuration, and all databases. This process is not reversible, so ensure that all of your configuration and data is backed up before proceeding.
Remove Packages.¶
Remove any MongoDB packages that you had previously installed.
Remove Data Directories.¶
Remove MongoDB databases and log files.