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

MongoDB (named from “huMONGOus“) is a full flexible index support and rich queries database. Its 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 will help you to 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 version and system architecture. For this article we are using MongoDB 3.2 repository.

For 64bit Systems:

[MongoDB]
name=MongoDB Repository
baseurl=http://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.2/x86_64/
gpgcheck=0
enabled=1

Step 2 – Install MongoDB Server

Lets use yum package manager to install mongodb-org package, it will automatically install all its dependencies. To install any specific revision of mongodb specify package name with version like mongodb-org-3.2.0. Following command will install latest stable version available.

# yum install mongodb-org

Step 3 – Start MongoDB

Package mongodb-org-server provided MongoDB init script, Use that 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

[root@tecadmin ~]#  mongod --version

db version v3.2.0
git version: 45d947729a0315accb6d4f15a6b06be6d9c19fe7
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
allocator: tcmalloc
modules: none
build environment:
distmod: rhel70
distarch: x86_64
target_arch: x86_64

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

[root@tecadmin ~]#  mongo

> use mydb;

> db.test.save( { a: 1 } )

> db.test.find()

  { "_id" : ObjectId("54fc2a4c71b56443ced99ba2"), "a" : 1 }

Congratulation’s You have successfully installed mongodb server on your system. For practice only you may use MongoDB browser shell.

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

转: How to Install MongoDB 3.2 on CentOS/RHEL & Fedora (简单易懂)的更多相关文章

  1. 如何在CentOS/RHEL & Fedora上安装MongoDB 3.2

    MongoDB(名称取自"huMONGOus")是一个有着全面灵活的索引支持和丰富的查询的数据库.MongoDB通过GridFS提供强大的媒体存储.点击这里获取MongoDB的更多 ...

  2. [转载]How to Install Google Chrome 39 in CentOS/RHEL 6 and Fedora 19/18

    FROM: http://tecadmin.net/install-google-chrome-in-centos-rhel-and-fedora/ Google Chrome is a freewa ...

  3. How to Install Tomcat 8.0.27 on CentOS/RHEL and Ubuntu【转】

    https://tecadmin.net/install-tomcat-8-on-centos-rhel-and-ubuntu/ Apache Tomcat is an opensource web ...

  4. Install MongoDB driver for PHP on XAMPP for Mac OSX

    试了不少方法,最后还是这个最有效. [转自:http://thatsimplecode.com/install-mongodb-driver-for-php-on-xampp-for-mac-osx] ...

  5. Install MongoDB on Red Hat Enterprise, CentOS, Fedora, or Amazon Linux

    Install MongoDB on Red Hat Enterprise, CentOS, Fedora, or Amazon Linux¶ Overview Use this tutorial t ...

  6. Install MongoDB on Windows

    Overview Use this tutorial to install MongoDB on a Windows systems. PLATFORM SUPPORT Starting in ver ...

  7. Install MongoDB on Windows (Windows下安装MongoDB)

    Install MongoDB on Windows Overview Use this tutorial to install MongoDB on a Windows systems. PLATF ...

  8. sudo brew install mongodb报错

    报错信息如下: Error: Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew ...

  9. Install MongoDB Community Edition on Ubuntu

    Install MongoDB > Install MongoDB Community Edition > Install MongoDB Community Edition on Lin ...

随机推荐

  1. Django 中CSRF中间件 'django.middleware.csrf.CsrfViewMiddleware',

    1.Django中CSRF中间件的工作原理及form表单提交需要添加{% csrf_token %}防止出现403错误 CSRF # 表示django全局发送post请求均需要字符串验证功能:防止跨站 ...

  2. [python xml 学习篇][0]

    tree = ET.parse("Result.xml")root = tree.getroot()print type(root)print root.tag # 得到root ...

  3. 2018"百度之星"程序设计大赛 - 资格赛

    调查问卷  Accepts: 1546  Submissions: 6596  Time Limit: 6500/6000 MS (Java/Others)  Memory Limit: 262144 ...

  4. LaTeX Hierarchical Tables

    本系列文章由 @yhl_leo 出品,转载请注明出处. 文章链接: http://blog.csdn.net/yhl_leo/article/details/52692655 简单整理一下表格中的分级 ...

  5. Jeddict:从服务器的验证过程,思考学习新事物的套路

    结合一路研究Jeddict使用的过程经验来看,在这里说一下关于服务器配置的东西.在我们团队,最开始用这个插件的时候,因为公司用的应用服务器是Jboss EAP 7,所以,我们自然而然的,想当然的直接使 ...

  6. DS博客作业05——树

    1.本周学习总结 1.1思维导图 1.2学习体会 学习:相比于之前的数据结构,树多了很多性质,相应的也多了很多计算题,不得不说,专有名词也是颇多.觉得树最独特的地方就是它的兄弟.孩子结点,用以组成了它 ...

  7. 背包问题--golang的入门解

    . 定义一种 表示静态属性的 关键字 / 修饰符 2. 作用共用.共享 能有此作用的原因分析: Java中,任何变量 / 代码存储时,都是 在编译时 由系统自动分配内存在静态变量编译后,所分配的内存会 ...

  8. es6总结 (五)--函数扩展

  9. JSTL <C:if></C:if> 和<C:ForEach></C:ForEach> 入门级~

    一.<C:If>标签:条件判断语句 <c:if test="${objList.nodetype == 1}">上级节点</c:if>   te ...

  10. Install Qualcomm Development Environment

    安裝 Android Development Environment http://www.cnblogs.com/youchihwang/p/6645880.html 除了上述還得安裝, sudo ...