Installing MongoDB in Linux (2015-11-03-00:51:24)

Source: Internet
Author: User
Tags install mongodb

Background: Before once tried to install MongoDB, but online said the method of a variety, coupled with the virtual machine has a problem, so the installation is not successful, today in the group of questions, after a buddy's reminder, told me directly to the last Officer network, in accordance with the official online installation method, did not expect to really succeed.

Linux version is CentOS6.5, referring to the installation of the official website address is: https://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat/, The corresponding also has a Chinese community http://docs.mongoing.com/manual-zh/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux.html , but the installation version in the Chinese community is now only updated to 2.6, the official website has been updated to 3.0, I installed the 3.0 version of the

In fact, it is very simple, two steps of installation:

1. Create file/etc/yum.repos.d/mongodb.repo to save the following MongoDB repositories configuration information

# Vi/etc/yum.repos.d/mongodb-org-3.0.repo

In the file, enter:

[mongodb-org-3.0]

Name=mongodb Repository

baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/x86_64/

Gpgcheck=0

Enabled=1

Save exit, if you need to install another version of the, please the parameters website tips


2. Install MongoDB software package and related tools.

# sudo yum install-y mongodb-org

This interface appears to indicate that the installation is complete



Start

Start with sudo service mongod start

Stop by sudo service Mongod stop

Restart with sudo service mongod restart



Installing MongoDB in Linux (2015-11-03-00:51:24)

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.