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. : Www. mongodb

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

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. : Here 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. When the System 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

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.