CentOS6.5 install the binary version MongoDB2.6

Source: Internet
Author: User
Tags install mongodb
The access to foreign MongoDB images is very slow, so it is very unreliable to select the MongoDB official website for online installation. Then, we can choose to install the binary release package of MongoDB2.6.

The access to foreign MongoDB images is very slow, so it is very unreliable to select the MongoDB official website for online installation. Then, we can choose to install the binary release package of MongoDB 2.6.

The access to foreign MongoDB images is very slow, so it is unreliable to select the MongoDB official website for online installation. Then, we can choose to install the binary release package of MongoDB 2.6.

Related reading:

CentOS compilation and installation of MongoDB

CentOS compilation and installation of php extensions for MongoDB and mongoDB

CentOS 6 install MongoDB and server configuration using yum

Install MongoDB2.4.3 in Ubuntu 13.04

MongoDB beginners must read (both concepts and practices)

MongoDB authoritative Guide (The Definitive Guide) in English [PDF]

Next we will install the latest MongoDB 2.6.0 binary release on CentOS 6.5 x64.

1. Download MongoDB 2.6.0 binary release
$ Curl-O

2. decompress the MongoDB compressed package
$ Tar zvxf mongodb-linux-x86_64-2.6.0.tgz

3. Simplified directory name
$ Mv mongodb-linux-x86_64-2.6.0 mongodb

4. Configure the PATH environment variable
Make sure that the bin directory of MongoDB is included in the PATH environment variable.
Or connect the initial symbol to the/usr/local/bin directory.
$ Sudo vi/etc/profile
Add the following content:
Export PATH = $ PATH:/home/chuser/mongodb/bin
Make environment variables take effect:
$ Source/etc/profile
Verify that the environment variables take effect:
$ Mongod-version
Db version v2.6.0
2014-04-14T02: 53: 01.082 + 0000 git version: 1c1c76aeca21c5983dc178920f5052c298db616c

5. Run MongoDB
Create a data directory
$ Mkdir-p mongodb/data/db
Make sure that mongod has the read and write permissions on the data directory.
Run MongoDB (specify the created data directory)
$ Mongod -- dbpath/home/chuser/mongodb/data &

6. Verify that MongoDB is running properly.
$ Mongo
MongoDB shell version: 2.6.0
Connecting to: test
2014-04-14T03: 40: 59.560 + 0000 [initandlisten] connection accepted from 127.0.0.1: 39014 #1 (1 connection now open)
Welcome to the MongoDB shell.
For interactive help, type "help ".
For more comprehensive documentation, see

Questions? Try the support group

> Show databases;
Admin (empty)
Local 0.078 GB

MongoDB details: click here
MongoDB: click here

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.