MongoDB Documentation, Release 3.0.4 This repository only offers the 3.0 MongoDB release. If you’d like to install MongoDB packages from a previous release series (page 924), 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, use the following command: zypper addrepo --no-gpgcheck http://downloads-distro.mongodb.org/repo/suse/os/x86_64/ mongodb Step 2: Install the MongoDB packages and associated tools. When you install the packages, you choose whether to install the current release or a previous one. This step provides the commands for both. To install the latest stable version of MongoDB, issue the following command: sudo zypper install mongodb-org 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: sudo zypper install mongodb-org-3.0.4 mongodb-org-server-3.0.4 mongodb-org-shell-3.0.4 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: sudo zypper addlock mongodb-org-3.0.4 mongodb-org-server-3.0.4 mongodb-org-shell-3.0.4 Previous versions of MongoDB packages use a different repository location. Refer to the version of the documentation appropriate for your MongoDB version. Run MongoDB 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 in- formation. 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. Step 1: Start MongoDB. You can start the mongod process by issuing the following command: sudo service mongod start Step 2: Verify that MongoDB has started successfully You can verify that the mongod process has started suc- cessfully by checking the contents of the log file at /var/log/mongodb/mongod.log for a line reading [initandlisten] waiting for connections on port <port> 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: sudo chkconfig mongod on Step 3: Stop MongoDB. As needed, you can stop the mongod process by issuing the following command: sudo service mongod stop Chapter 2. Install MongoDB 12