Install MongoDB on Linux Using Yum Command

by lifeLinux on August 19, 2011

In a previous article called “Install MongoDB on Centos / RedHat“, I introduced how install MongoDB using binary package. In this article, i’ll introduce you to install MongoDB using yum command.

The first, you need add the appropriate repo. Login root and type the following command

# vi /etc/yum.repos.d/mongodb.repo


Add the following content if you are using 32 bit

[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/i686
gpgcheck=0

For 64 bit

[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0

To install the new MongoDB packages, type the following command

# yum install mongo-10gen mongo-10gen-server

Type the following command to start MongoDB

# /etc/init.d/mongod start

Turn on MongoDB when system startup

# chkconfig mongod on

Leave a Comment

Previous post:

Next post: