(ve):Set up MongoDB on CentOS
- This page was last modified on February 2, 2011, at 10:29.
From (mt) Community Wiki
Contents |
Overview
MongoDB (from "humongous") is an open source, scalable, high-performance, schema-free, document-oriented database written in the C++ programming language. The database is document-oriented so it manages collections of JSON-like documents. Many applications can, thus, model data in a more natural way, as data can be nested in complex hierarchies and still be query-able and index-able.
Development of MongoDB began in October 2007 by 10gen. The first public release was in February 2009.
Instructions
- Add the 10gen repository:
We're going to tell yum to use another repository for our MonogoDB. This is referenced from the MongoDB website.
First, create a file called 10gen.repo in
pico /etc/yum.repos.d/10gen.repo
Add the following:
[10gen] name=10gen Repository baseurl=http://downloads.mongodb.org/distros/centos/5.4/os/x86_64/ gpgcheck=0
Reference: http://www.mongodb.org/display/DOCS/CentOS+and+Fedora+Packages
- Update:
Update yum, using the following command this may take awhile.
yum update
- Search:
See what versions of Mongo are available by typing, see Figure 1:
yum search mongo
- Install (STABLE):
We're going to install the stable server based on the 64bit architecture, see Figure 2. Run the following:
yum install mongo-stable-server.x86_64
If you're curious to know if your server is 64bit or 32bit, type
uname -a
By default, (ve) Servers are 64bit.
If you want more insight as to what was installed, type:
yum info mongo-stable-server.x86_64
- Start Mongo:
Mongo needs to be started in the shell, before it can be used. See Figure 3 and 4. There's a number of ways you can do this. One way is:
In another terminal type:
mongod
Close the terminal.
For advanced procedures regarding stopping and starting MongoDB, please see the MongoDB documentation. - DONE!



