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. MySQL基本命令和常用数据库对象

    MySQL基本命令: 连接远程主机的MySQL服务(为了保证安全性,执行下面命令时,可以省略-p后面的密码,执行命令后系统会提示输入密码) mysql -p 密码 -u 用户名 -h 主机地址 --d ...

  2. tensorflow笔记

    1.Estimator 进行编程的概览 要根据预创建的 Estimator 编写 TensorFlow 程序,您必须执行下列任务: 创建一个或多个输入函数. 定义模型的特征列. 实例化 Estimat ...

  3. webdriver高级应用-使用JavaScript操作页面元素

    Webdriver搞不定的,需要用js,无需引入有关js的包就可用 在WebDriver脚本代码中执行JavaScript代码,来实现对页面元素的操作.此方法主要用于解决在某些情况下,页面元素的.cl ...

  4. Git只获取部分目录的内容

    Git只获取部分目录的内容 Git的克隆,默认是直接拉取整个远程仓库,如果项目比较大,大量和自己无关的内容也会拉到本地,占用很多硬盘空间.Git在1.7版本后,已经支持只Checkout部分内容,这个 ...

  5. java面试题之happens before原则

    JSR-133使用happens-before的概念来指定两个操作之间的执行顺序.由于这两个操作可以在一个线程内,也可以在不同线程之间.因此,JMM可以通过happens-before关系向程序员提供 ...

  6. 【NOIP2016游记】

    day-5:上午看了火箭打马刺 火箭差点翻盘但老大爷们还是稳 下午一场五校 T1T2原题做过 T3分块 day-4:上午五校1小时写3道暴力 2个半小时优化 然而还不知道拿了多少 %%%CC T2树链 ...

  7. vue slot 插槽备忘

    老是记不住插槽咋回事 记录下来备忘 父组件 <tab><template slot="boy" slot-scope="test">{{ ...

  8. ListView更新方法的优化

    ListView和Adapter对象均具备有对象更新方法 ListView对象列表的更新方法1.invalidate();--重绘组件2.invlidateView()--重绘组件并包含所有的View ...

  9. 标准C程序设计七---63

    Linux应用             编程深入            语言编程 标准C程序设计七---经典C11程序设计    以下内容为阅读:    <标准C程序设计>(第7版) 作者 ...

  10. Day 19 函数之闭包、装饰器

    一.什么是装饰器 器即函数 装饰即修饰,意指为其他函数添加新功能 装饰器定义:本质就是函数,功能是为其他函数添加新功能 二.装饰器遵循的原则 1.不修改被装饰函数的源代码(开放封闭原则) 2.为被装饰 ...