Go: How to Install MongoDB 3.2 on Centos/rhel & Fedora (easy to understand)

Source: Internet
Author: User
Tags install mongodb mongodb server mongodb version yum install mongodb

from:http://tecadmin.net/install-mongodb-on-centos-rhel-and-fedora/

MongoDB (named from "Humongous") are a full flexible index support and rich queries database. It is a NoSQL database. MongoDB provides large media storage with Gridfs. Clickhere for more details about MongoDB.

MongoDB has released new stable version 3.2 with lots of major enhancements. This tutorial is to the install MongoDB 3.2.X on CentOS, RHEL and Fedora Systems.

Step 1–add MongoDB Yum Repository

Add following content in Yum repository configuration File/etc/yum.repos.d/mongodb.repo as per your required mongodb vers Ion and system architecture. For the article we are using MongoDB 3.2 repository.

For 64bit Systems:

[Mongodb]name=mongodb repositorybaseurl=http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/ Gpgcheck=0enabled=1
Step 2–install MongoDB Server

Lets Use the Yum Package Manager to the install mongodb-org package, it'll automatically install all its dependencies. To install any specific revision of the MongoDB specify package name with the version like mongodb-org-3.2.0. Following command would install latest stable version available.

# yum Install mongodb-org
Step 3–start MongoDB

Package Mongodb-org-server provided MongoDB init script, use the script to start service.

#/etc/init.d/mongod Restart

Configure MongoDB to auto start on system boot.

# Chkconfig Mongod on
Step 4–check MongoDB Version

Use following command to check installed MongoDB version

[Email protected] ~]#  mongod--versiondb version v3.2.0git version: 45d947729a0315accb6d4f15a6b06be6d9c19fe7openssl Version:openssl 1.0.1e-fips 2013allocator:tcmallocmodules: Nonebuild Environment:    distmod:rhel70    distarch:x86_64    target_arch:x86_64

Connect MongoDB using command line and execute some test commands for checking proper working.

[[email protected] ~]#  mongo> use mydb;> db.test.save ({a:1}) > Db.test.find ()  {"_id": ObjectId ("54f C2a4c71b56443ced99ba2 ")," a ": 1}

Congratulation ' s you have successfully installed MongoDB server on your system. For practice only, use MongoDB browser shell.

References:
http://docs.mongodb.org/manual/installation/

Go: How to Install MongoDB 3.2 on Centos/rhel & Fedora (easy to understand)

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.