CentOS installs MongoDB with Yum

Source: Internet
Author: User
Tags install mongodb

I. Configuring the Yum package management file

Create file /etc/yum.repos.d/mongodb.repo

If the contents of the 64-bit system file are as follows

Vim/etc/yum.repos.d/mongodb.repo[mongodb]name=mongodb repositorybaseurl=gpgcheck=0enabled=1


If this is a 32-bit system, the contents are as follows

Vim/etc/yum.repos.d/mongodb.repo[mongodb]name=mongodb repositorybaseurl=http://downloads-distro.mongodb.org/ Repo/redhat/os/i686/gpgcheck=0enabled=1


Second, installation MongoDB packages and related tools


When you install the package, you can choose whether to install the current version or the previous one.

1, install the latest stable version, please use the following command


Yum Install-y mongodb-org


2. Install a specific version of MongoDB, specifying that each component package has a separate version number appended to the package name, as in the following example, to install MongoDB 2.6. Version 1

Yum install-y mongodb-org-2.6.1 mongodb-org-server-2.6.1 mongodb-org-shell-2.6.1 mongodb-org-mongos-2.6.1 mongodb-org-tools-2.6.1

Third, MongoDB start, stop, with the system boot

Turn off SELinux

Service Mongod start Mongodbservice mongod stop off Mongodbchkconfig mongod on with system boot

Seoul Mall
Costume collocation
City of words and things

9 signs that your sister has a crush on you.

Breaking through the five myths and the law of beautiful personality

My bag is a little expensive.

This article from "Linux operation and Maintenance" blog, declined reprint!

CentOS installs MongoDB with Yum

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.