Xiao Bai to learn MongoDB (ii)

Source: Internet
Author: User
Tags install mongodb

One, about using MongoDB on Windows

Mongodb

Official documentation-Installing MONGODB under Windows

Note: MongoDB does not support Windows XP systems

It is also easy to install MongoDB on Windows, click on the link above to download the 32-bit or 64-bit zip compression package. Or MSI directly installed, the installation package on Windows is larger, more than 110M.

After downloading, unzip the file, or directly run the MSI, where MSI installed directly after the default installed in the C:\Program files, to find the beginning is MongoDB, that is. Here are the steps that I configured:

    1. Set up folder in D-Disk MongoDB

    2. Cut all files in the bin directory of the extracted files directory into the D-Disk MongoDB folder

    3. Run the shortcut key "Win+r", run cmd, go into the MongoDB folder, enter

      D:CD MongoDB

4. Under MongoDB, create a new folder data, create a new DB folder and log folder, and separate the

5. Set the directory environment and continue typing in cmd

Mongod--dbpath D:\mongodb\data\db

6. After the setup is complete, the configuration is complete, and the input MONGO in CMD will enter the MongoDB database.

Mongo

If you exit, you can export the exit directly.

Exit    bye
Second, MongoDB service configuration

7. Create a profile to hold the log path and enter it in CMD:

D:\mongodb>echo logpath=d:\mongodb\logs\mongo.log > "D:\mongodb\mongod.cfg"

8. Install the MongoDB service to start the boot without having to start mongod each time, enter in cmd:

"D:\mongodb\mongod.exe"--config "D:\mongodb\mongod.cfg"--install

9. Start the MongoDB service and enter it in CMD:

net start MongoDB

10. If the MongoDB service is stopped, use the cmd command:

net stop MongoDB

11. Remove the Mongod service and enter it in CMD:

"D:\mongodb\mongod.exe"--remove

Almost complete configuration here, of course, in the installation may also encounter some problems, here is not a detailed statement.

Xiao Bai to learn MongoDB (ii)

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.