- Install MongoDB >
- Install MongoDB Enterprise >
- Install MongoDB Enterprise on SUSE
Install MongoDB Enterprise on SUSE¶
On this page
Overview¶
Use this tutorial to install MongoDB Enterprise on SUSE Linux. MongoDB Enterprise is available on select platforms and contains support for several features related to security and monitoring.
Packages¶
MongoDB provides packages of the officially supported MongoDB Enterprise builds in it’s own repository. This repository provides the MongoDB Enterprise distribution in the following packages:
mongodb-enterprise
This package is a
metapackage
that will automatically install the four component packages listed below.mongodb-enterprise-server
This package contains the
mongod
daemon and associated configuration and init scripts.mongodb-enterprise-mongos
This package contains the
mongos
daemon.mongodb-enterprise-shell
This package contains the
mongo
shell.mongodb-enterprise-tools
This package contains the following MongoDB tools:
mongoimport
bsondump
,mongodump
,mongoexport
,mongofiles
,mongoimport
,mongooplog
,mongoperf
,mongorestore
,mongostat
, andmongotop
.
Control Scripts¶
The mongodb-enterprise
package includes various control scripts, including the init script /etc/rc.d/init.d/mongod
.
The package configures MongoDB using the /etc/mongod.conf
file in
conjunction with the control scripts. See
the Configuration File
reference for documentation of settings available in the configuration file.
As of version 2.6.12, there are no control scripts for
mongos
. The mongos
process is used only in
sharding. You can use the mongod
init script
to derive your own mongos
control script.
Prerequisites¶
MongoDB only provides Enterprise packages for 64-bit builds of SUSE Enterprise Linux version 11.
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.
Install MongoDB Enterprise¶
Configure the package management system (zypper
).¶
Add the repository so that you can install MongoDB using zypper
.
Use the following command to specify the MongoDB 2.6 branch:
Install the MongoDB packages and associated tools.¶
To install the latest release of MongoDB 2.6, issue the following command:
To install a specific release of MongoDB, specify each component package individually and append the version number to the package name, as in the following example:
You can specify any available version of MongoDB. However zypper
will upgrade the packages when a newer version becomes available. To
prevent unintended upgrades, pin the packages by running the following
command:
Install MongoDB Enterprise From Tarball¶
Note
The Enterprise tarball includes an example SNMP configuration file
named mongod.conf
. This file is not a MongoDB configuration file.
Install dependencies¶
Download and install the MongoDB Enterprise packages.¶
After you have installed the required prerequisite packages, download
and install the MongoDB Enterprise packages from
http://mongodb.com/download/. The MongoDB
binaries are located in the bin/
directory of the archive. To download
and install, use the following sequence of commands.
Install the MongoDB packages and associated tools.¶
Once you have copied the MongoDB binaries to their target location,
ensure that the location is included in your PATH
variable. If it is
not, either include it or create symbolic links from the binaries to a
directory that is included.
Run MongoDB Enterprise¶
The MongoDB instance stores its data files in /var/lib/mongo
and its log files in /var/log/mongodb
by default,
and runs using the mongod
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/mongo
and
/var/log/mongodb
directories to give this user access to these
directories.
Verify that MongoDB has started successfully¶
You can verify that the mongod
process has started
successfully by checking the contents of the log file at
/var/log/mongodb/mongod.log
for a line reading
where <port>
is the port configured in /etc/mongod.conf
, 27017
by default.
You can optionally ensure that MongoDB will start following a system reboot by issuing the following command:
Begin using MongoDB.¶
To begin using MongoDB, see Getting Started with MongoDB. Also consider the Production Notes document before deploying MongoDB in a production environment.
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.