Install MongoDB Enterprise Edition on SUSE
On this page
Overview
Use this tutorial to install MongoDB 3.6 Enterprise Edition on SUSE Linux Enterprise Server (SLES) using the zypper
package manager.
MongoDB Enterprise Edition is available on select platforms and contains support for several features related to security and monitoring.
Considerations
Platform Support
EOL Notice
MongoDB 3.6 Enterprise Edition supports the following 64-bit SUSE Linux Enterprise Server (SLES) release on x86_64 architecture:
- SLES 12 - for MongoDB versions 3.6.0 - 3.6.16 only. More recent version of MongoDB 3.6 are not supported on SLES 12. Please consider upgrading to MongoDB 4.0 or later.
MongoDB only supports the 64-bit version of this platform.
See Supported Platforms for more information.
Windows Subsystem for Linux (WSL) - Unsupported
MongoDB does not support the Windows Subsystem for Linux (WSL).
Production Notes
Before deploying MongoDB in a production environment, consider the Production Notes document which offers performance considerations and configuration recommendations for production MongoDB deployments.
Install MongoDB Enterprise Edition
Follow these steps to install MongoDB Enterprise Edition using the zypper
package manager.
Configure the package management system (zypper
).
Add the repository so that you can install MongoDB using zypper
.
Run the command appropriate for your version of SUSE:
- SUSE 12
If you’d like to install MongoDB packages from a previous release series such as 3.4, you can specify the release series in the repository configuration. For example, to restrict your SUSE 12 system to the 3.4 release series, use the following command:
Install the MongoDB packages.
To install MongoDB 3.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:
Previous versions of MongoDB packages use a different repository location. Refer to the version of the documentation appropriate for your MongoDB version.
Run MongoDB Enterprise Edition
By default, MongoDB instance stores:
- its data files in
/var/lib/mongo
- its log files in
/var/log/mongodb
If you installed via the package manager, these default directories are created during the installation.
If you installed manually by downloading the tarballs, you can create the directories using mkdir -p <directory>
or sudo mkdir -p <directory>
depending on the user that will run MongoDB. (See your linux man pages for information on mkdir
and sudo
.)
By default, MongoDB runs using the mongod
user account. If you change the user that runs the MongoDB process, you must also modify the permission to the /var/lib/mongo
and /var/log/mongodb
directories to give this user access to these directories.
To specify a different log file directory and data file directory, edit the systemLog.path
and storage.dbPath
settings in the /etc/mongod.conf
. Ensure that the user running MongoDB has 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.
Procedure
Follow these steps to run MongoDB Enterprise Edition. These instructions assume that you are using the default settings.
Init System
To run and manage your mongod
process, you will be using your operating system’s built-in init system. Recent versions of Linux tend to use systemd (which uses the systemctl
command), while older versions of Linux tend to use System V init (which uses the service
command).
If you are unsure which init system your platform uses, run the following command:
Then select the appropriate tab below based on the result:
systemd
- select the systemd (systemctl) tab below.init
- select the System V Init (service) tab below.
- systemd (systemctl)
- System V Init (service)
Verify that MongoDB has started successfully.
You can verify that the mongod
process has started successfully by issuing the following command:
You can optionally ensure that MongoDB will start following a system reboot by issuing the following command:
Stop MongoDB.
As needed, you can stop the mongod
process by issuing the following command:
Restart MongoDB.
You can restart the mongod
process by issuing the following command:
You can follow the state of the process for errors or important messages by watching the output in the /var/log/mongodb/mongod.log
file.
Start MongoDB.
You can start the mongod
process by issuing the following command: