Install and start MongoDB

Source: Internet
Author: User
This section describes WindowsAnd LinuxDownload link: http://www.mongodb.org/display/DOCS/Downloads plugin ----------------------------------------------------------------------------------- WindowsDownload the version 1.4.3 (Windows 32 bit) with the following command: 1. mongod command to create a MongoDB database link with the data storage path E: \ data \ MongoDB

E:

CD MongoDB \ bin

Mongod.exe-port 11111-dbpath E: \ data \ MongoDB

 

 

2. Link to an existing MongoDB Database

E:

CD MongoDB \ bin

Cmd.exe 192.168.135.212: 10001

 

Bytes ----------------------------------------------------------------------------------- LinuxRecommended download version 1.4.3 download link: http://downloads.mongodb.org/linux/mongodb-linux-i686-1.4.3.tgzinput to the following command: Decompress: tar-zxvf mongodb-linux-i686-1.4.3.tgz to locate the MongoDB/bin directory CD .. /MongoDB/bin 1. run the mongod command to create a connection to the MongoDB database. The port number is 10001, and the data storage path is/data/MongoDB/data, LogsThe storage path is/data/MongoDB/log. First, create related directories and files, and run the mkdir and touch commands --. /MongoDB/bin/mongod-port 10001-dbpath/data/MongoDB/data/M1 -- logpath/data/MongoDB/log/m1.log 2. link to an existing MongoDB database. /MongoDB/bin/Mongo 192.168.135.212: 10001 Windows and Linux installation have some similarities and differences, but the link is DatabaseAnd use the same. Query all databases using show DBS TestDatabase use test shows all tables (collections) of test show collections query server status dB. serverstatus ()
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.