CentOS 6.5 x64 System Installation MongoDB 2.6.02 Release Tutorial _mongodb

Source: Internet
Author: User
Tags mongodb

MongoDB Foreign mirror access is very slow, so that the choice of MongoDB official website online installation is not reliable. Then, we can choose to install the MongoDB 2.6 binary release package.

Below we install the latest MongoDB 2.6.02 CentOS on the 6.5 x64 system.

1. Download MongoDB 2.6.02 In-System release

Copy Code code as follows:

$ Curl-o http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.0.tgz

2, Decompression MongoDB compression package
Copy Code code as follows:

$ tar zvxf mongodb-linux-x86_64-2.6.0.tgz

3. Simplify directory Name
Copy Code code as follows:

$ mv mongodb-linux-x86_64-2.6.0 MongoDB

4. Configure the PATH environment variable

Make sure that the MongoDB Bin directory is contained in the PATH environment variable.
Or the primary symbol is connected to the/usr/local/bin directory.

Copy Code code as follows:

$ sudo vi/etc/profile

Add the following:
Copy Code code as follows:

Export path= $PATH:/home/chuser/mongodb/bin

Let environment variables take effect:
Copy Code code as follows:

$ source/etc/profile

Verify that the environment variable is in effect:
Copy Code code as follows:

$ mongod-version
DB version v2.6.0
2014-04-14t02:53:01.082+0000 git version:1c1c76aeca21c5983dc178920f5052c298db616c

5. Operation MongoDB

Create a Data directory

Copy Code code as follows:

$ mkdir-p mongodb/data/db

Make sure Mongod has read and write access to the data directory.
Run MongoDB (Specify the established data directory)
Copy Code code as follows:

$ Mongod--dbpath/home/chuser/mongodb/data &

6, verify the MongoDB is normal operation

Copy Code code as follows:

$ 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
http://docs.mongodb.org/
Questions? Try the Support group
Http://groups.google.com/group/mongodb-user
> show databases;
Admin (empty)
Local 0.078GB

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.