Linux Installation MongoDB

Source: Internet
Author: User

1, download MongoDB, without compiling (if HTTPS does not, can be replaced by HTTP)
wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.1.tgz
TAR-ZXVF mongodb-linux-x86_64-2.6.1.tgz
MV mongodb-linux-x86_64-2.6.1 mongodb2.6.1//Simplified directory name

2, the establishment of data, log file directory
Cd/yourrootdocument
mkdir Mongodb_data
mkdir Mongodb_logs

3. Running MongoDB:
CD Mongodb2.6.1/bin
./mongod--dbpath=/mongodbdata/mongodb_db--logpath=/mongodbdata/mongodb_logs/mongodb.log--logappend&

4, check whether the port is started, the default port is: 27017
NETSTAT-LANP | grep 27017

5. Local Client Testing
CD Mongodb2.6.1/bin
./mongo
Output
MongoDB Shell version:2.6.1
Connecting To:test
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

OK, you are done!

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.