CentOS6.5 install the binary version MongoDB2.6

Source: Internet
Author: User
CentOS6.5 install the binary version MongoDB2.6 Author: chszs, reproduced need to note. Blog homepage: blog. csdn. netchszs1, download MongoDB2.6.0 binary Release 2, decompress MongoDB compressed package 3, simplify directory name 4, configure PATH environment variable 5, run MongoDB6, verify that MongoDB is running properly

Install the binary version of MongoDB 6.5 in CentOS 2.6 By chszs. Blog home page: http://blog.csdn.net/chszs 1, download MongoDB 2.6.0 binary Release 2, decompress MongoDB compressed package 3, simplified directory name 4, configure PATH environment variables 5, run MongoDB 6, verify whether MongoDB runs normally

Install the binary version of MongoDB 6.5 in CentOS 2.6 By chszs. Blog homepage: http://blog.csdn.net/chszs

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.

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 http://downloads.mongodb.org/linux/mongodb-linux-x86_64-2.6.0.tgz

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

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.