转: How to Install MongoDB 3.2 on CentOS/RHEL & Fedora (简单易懂)

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

[[email protected] ~]#  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.

[[email protected] ~]#  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/

时间: 2025-01-13 04:10:48

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

[转载]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 freeware web browser developed by Google. It was released as a beta version for Microsoft Windows on September 2, 2008, and as a stable public release on De

Install ffmpeg on CentOS (RHEL/Fedora)

mkdir ffmpeg_sources cd ffmpeg_sources/ yasm wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz tar zxvf yasm-1.2.0.tar.gz ./configure make && sudo make install x264 git clone git://git.videolan.org/x264.git cd x264 ./configure -

Install PHP 7, Apache, MySQL 5.6 on CentOS / RHEL 7.1 & 6.7 + Wordpress

最近做了个小项目,挣了几百块钱,于是买了个域名:shawshining.com 和一个搬瓦工的服务器.搬瓦工自带CentOS6,支持一键安装ss,比较方便.买的搬瓦工的服务器只有500MB内存,导致出现一些以前在类似阿里云的学生机1g内存上根本不会出现的问题.所以有必要告诉后来人怎么填坑.事不宜迟,写个教程让大家少走点弯路.如果有问题,清查看最下面的问题解决方法.如果问题依然没有解决可以google,百度一下! 主要参考:https://tecadmin.net/install-php-7-ap

Install MongoDB on Windows

Overview Use this tutorial to install MongoDB on a Windows systems. PLATFORM SUPPORT Starting in version 2.2, MongoDB does not support Windows XP. Please use a more recent version of Windows to use more recent releases of MongoDB. IMPORTANT If you ar

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 to install MongoDB on Red Hat Enterprise Linux, CentOS Linux, Fedora Linux, or a related system. The tutorial uses .rpm packages to install. While some

Install MongoDB driver for PHP on XAMPP for Mac OSX

试了不少方法,最后还是这个最有效. [转自:http://thatsimplecode.com/install-mongodb-driver-for-php-on-xampp-for-mac-osx] You need to have the following installed in your Mac: MongoDB XAMPP for Mac OSX Homebrew Package Manager Type the following in your terminal : brew i

install mongodb on macos

Update Homebrew’s package database. In a system shell, issue the following command: brew update 2 Install MongoDB. You can install MongoDB via brew with several different options. Use one of the following operations: Install the MongoDB Binaries To i

Install MongoDB on Linux Systems 速记

Download the Latest Release >> curl -O http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.4.8.tgz Extract MongoDB From Archive >> tar -zxvf mongodb-linux-x86_64-2.4.8.tgz Optional. Copy MongoDB to Target Directory >> mkdir -p mong

Install MongoDB on Windows (Windows下安装MongoDB)

Install MongoDB on Windows Overview Use this tutorial to install MongoDB on a Windows systems. PLATFORM SUPPORT Starting in version 2.2, MongoDB does not support Windows XP. Please use a more recent version of Windows to use more recent releases of M