How to install MongoDB in cent OS 5.6

Source: Internet
Author: User
Tags install mongodb

The following content is reproduced from http://be-evil.org/install-mongodb-on-centos.html

1. Download The MongoDB database for Linux
 
Go to the official download page to download the Linux version of MongoDB. Choose either 32-bit or 64-bit based on your needs.
 
Http://www.mongodb.org/downloads
 
Or you can directly use wget to download it on the server.
 
Wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.8.2.tgz

Decompress the package after the download is complete.
 
Tar zxf mongodb-linux-i686-1.8.2.tgz
 
2. Installation preparation
 
Move MongoDB to the/usr/local/mongdb folder
 
Music mongodb-linux-i686-1.8.2/usr/local/MongoDB
 
Create a database folder
 
Mkdir/usr/local/MongoDB/Data
 
Add the MongoDB startup project to RC. Local to ensure that MongoDB is started when the server is started.
 
Echo "/usr/local/MongoDB/bin/mongod -- dbpath =/usr/local/MongoDB/Data">/etc/rc. Local
 
Start MongoDB
 
/Usr/local/MongoDB/bin/mongod -- dbpath =/usr/local/MongoDB/Data
 
The output indicates that MongoDB is started.

 
If you are not at ease, run the following command:
 
/Usr/local/MongoDB/bin/Mongo
 
To enter the shell mode of MongoDB. If the following output is displayed, it indicates that MongoDB has been started successfully, have fun!

 
 
Additional content:
 
How to install the MongoDB production environment using yum
 
Create and edit

/Etc/yum. Repos. d/10gen. Repo
 
For 64-bit systems, enter the following content
 
[10gen]
Name = 10gen Repository
Base url = http://downloads-distro.mongodb.org/repo/redhat/ OS /x86_64
 
Gpgcheck = 0
 
For 32-bit systems, enter the following content:
 
[10gen]
Name = 10gen Repository
Base url = http://downloads-distro.mongodb.org/repo/redhat/ OS /i686
Gpgcheck = 0
 
Note that MongoDB has 2 GB Data capacity limit in a 32-bit System
 
Save and run the following command

Yum install mongo-10gen-server

MongoDB can be installed.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.