Navigation
This version of the documentation is archived and no longer supported.

Install MongoDB Enterprise

New in version 2.2.

MongoDB Enterprise is available on four platforms and contains support for several features related to security and monitoring.

Required Packages

Changed in version 2.4.4: MongoDB Enterprise uses Cyrus SASL instead of GNU SASL. Earlier 2.4 Enterprise versions use GNU SASL (libgsasl) instead. For required packages for the earlier 2.4 versions, see Earlier 2.4 Versions.

To use MongoDB Enterprise, you must install several prerequisites. The names of the packages vary by distribution and are as follows:

  • Debian or Ubuntu 12.04 require: libssl0.9.8, snmp, snmpd, cyrus-sasl2-dbg, cyrus-sasl2-mit-dbg, libsasl2-2, libsasl2-dev, libsasl2-modules, and libsasl2-modules-gssapi-mit. Issue a command such as the following to install these packages:

    sudo apt-get install libssl0.9.8 snmp snmpd cyrus-sasl2-dbg cyrus-sasl2-mit-dbg libsasl2-2 libsasl2-dev libsasl2-modules libsasl2-modules-gssapi-mit
    
  • CentOS and Red Hat Enterprise Linux 6.x and 5.x, as well as Amazon Linux AMI require: net-snmp, net-snmp-libs, openssl, net-snmp-utils, cyrus-sasl, cyrus-sasl-lib, cyrus-sasl-devel, and cyrus-sasl-gssapi. Issue a command such as the following to install these packages:

    sudo yum install openssl net-snmp net-snmp-libs net-snmp-utils cyrus-sasl cyrus-sasl-lib cyrus-sasl-devel cyrus-sasl-gssapi
    
  • SUSE Enterprise Linux requires libopenssl0_9_8, libsnmp15, slessp1-libsnmp15, snmp-mibs, cyrus-sasl, cyrus-sasl-devel, and cyrus-sasl-gssapi. Issue a command such as the following to install these packages:

    sudo zypper install libopenssl0_9_8 libsnmp15 slessp1-libsnmp15 snmp-mibs cyrus-sasl cyrus-sasl-devel cyrus-sasl-gssapi
    

Earlier 2.4 Versions

Before version 2.4.4, the 2.4 versions of MongoDB Enterprise use libgsasl. The required packages for the different distributions are as follows:

  • Ubuntu 12.04 requires libssl0.9.8, libgsasl, snmp, and snmpd. Issue a command such as the following to install these packages:

    sudo apt-get install libssl0.9.8 libgsasl7 snmp snmpd
    
  • Red Hat Enterprise Linux 6.x series and Amazon Linux AMI require openssl, libgsasl7, net-snmp, net-snmp-libs, and net-snmp-utils. To download libgsasl you must enable the EPEL repository by issuing the following sequence of commands to add and update the system repositories:

    sudo rpm -ivh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
    
    sudo yum update -y
    

    When you have installed and updated the EPEL repositories, issue the following install these packages:

    sudo yum install openssl net-snmp net-snmp-libs net-snmp-utils libgsasl
    
  • SUSE Enterprise Linux requires libopenssl0_9_8, libsnmp15, slessp1-libsnmp15, and snmp-mibs. Issue a command such as the following to install these packages:

    sudo zypper install libopenssl0_9_8 libsnmp15 slessp1-libsnmp15 snmp-mibs
    

    Note

    Before 2.4.4, MongoDB Enterprise 2.4 for SUSE requires libgsasl which is not available in the default repositories for SUSE.

Install MongoDB Enterprise Binaries

When you have installed the required packages, and downloaded the Enterprise packages you can install the packages using the same procedure as a standard installation of MongoDB on Linux Systems.

Note

.deb and .rpm packages for Enterprise releases are available for some platforms. You can use these to install MongoDB directly using the dpkg and rpm utilities.

Use the sequence of commands below to download and extract MongoDB Enterprise packages appropriate for your distribution:

Ubuntu 12.04

curl -O http://downloads.10gen.com/linux/mongodb-linux-x86_64-subscription-ubuntu1204-2.4.14.tgz
tar -zxvf mongodb-linux-x86_64-subscription-ubuntu1204-2.4.14.tgz
cp -R -n mongodb-linux-x86_64-subscription-ubuntu1204-2.4.14/ mongodb

Red Hat Enterprise Linux 6.x

curl -O http://downloads.10gen.com/linux/mongodb-linux-x86_64-subscription-rhel62-2.4.14.tgz
tar -zxvf mongodb-linux-x86_64-subscription-rhel62-2.4.14.tgz
cp -R -n mongodb-linux-x86_64-subscription-rhel62-2.4.14/ mongodb

Amazon Linux AMI

curl -O http://downloads.10gen.com/linux/mongodb-linux-x86_64-subscription-amzn64-2.4.14.tgz
tar -zxvf mongodb-linux-x86_64-subscription-amzn64-2.4.14.tgz
cp -R -n mongodb-linux-x86_64-subscription-amzn64-2.4.14/ mongodb

SUSE Enterprise Linux

curl -O http://downloads.10gen.com/linux/mongodb-linux-x86_64-subscription-suse11-2.4.14.tgz
tar -zxvf mongodb-linux-x86_64-subscription-suse11-2.4.14.tgz
cp -R -n mongodb-linux-x86_64-subscription-suse11-2.4.14/ mongodb

Running and Using MongoDB

Note

The Enterprise packages currently include an example SNMP configuration file named mongod.conf. This file is not a MongoDB configuration file.

Before you start mongod for the first time, you will need to create the data directory (i.e. dbpath). By default, mongod writes data to the /data/db directory.

1

Create dbpath

To create the default dbpath directory, use the following command:

mkdir -p /data/db
2

Set dbpath Permissions

Ensure that the user that runs the mongod process has read and write permissions to this directory. For example, if you will run the mongod process, change the owner of the /data/db directory:

chown mongodb /data/db

You must create the mongodb user separately.

You can specify an alternate path for data files using the --dbpath option to mongod. If you use an alternate location for your data directory, ensure that this user can write to the alternate data directory.

Start MongoDB

To start mongod, run the executable mongod at the system prompt.

For example, if your PATH includes the location of the mongod binary, enter mongod at the system prompt.

mongod

If your PATH does not include the location of the mongod binary, enter the full path to the mongod binary.

Starting mongod without any arguments starts a MongoDB instance that writes data to the /data/db directory. To specify an alternate data directory, start mongod with the --dbpath option:

mongod --dbpath <some alternate directory>

Whether using the default /data/db or an alternate directory, ensure that the user account running mongod has read and write permissions to the directory.

Stop MongoDB

To stop the mongod instance, press Control+C in the terminal where the mongod instance is running.

Further Reading

As you begin to use MongoDB, consider the Getting Started with MongoDB and MongoDB Tutorials resources. To read about features only available in MongoDB Enterprise, consider: Monitor MongoDB with SNMP and Deploy MongoDB with Kerberos Authentication.