Download, installation, and service configuration of MongoDB for nosql

Source: Internet
Author: User

1. Download the Windows version of MongoDB, including the 32-bit and 64-bit versions (of which the Linux version is also available). Download the version based on the system conditions. :Http://www.mongodb.org/downloadsHere I downloaded the mongodb-win32-i386-2.4.0-rc1.

2. decompress the package to any hard disk partition directory, such as D:/DB/MongoDB, and create a storage location for database files in any location, such as D: /DB/MongoDB/dB (You must create a folder for storing database files before starting the MongoDB service. Otherwise, the command will not be created automatically and cannot be started successfully. The default folder path is C :/Data/DB. Use SystemWhen the default folder path is used, you do not need to add the -- dbpath parameter to start the service, but you need to manually create the folder.).

3. Open the CMD command line, enter the D:/DB/MongoDB/bin directory, and enter the following command to start the MongoDB service ,:

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4. log on to MongoDB for simple operations.

(1) Start Mongo dB,

 

 

(2) execute insert and query,

5. Create the mongodbwindows service to enable the service automatically.

(1) create a service

Create the logs directory under the MongoDB installation directory, and then enter the following command in the CMD command line:

D: \ dB \ MongoDB \ bin> mongod -- logpath D: \ dB \ MongoDB \ logs \ MongoDB. log -- logappend

-- Dbpath D: \ dB \ MongoDB \ dB -- directoryperdb -- servicename MongoDB -- install

:

(2) start/stop the service

Net start MongoDB

Net stop MongoDB

(3) Delete a service

D: \ dB \ MongoDB \ bin \ mongod.exe -- remove

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.