MongoDB installation under Windows

Source: Internet
Author: User
Tags log log

First download MongoDB, website address: https://www.mongodb.org/downloads

The official website address may download is slow, so provides me to download the file: http://pan.baidu.com/s/1eQhDtL4, the current official latest stable version is: 2.6.7, I use is 64 bit of

After the download (for the zip file, the official MSI installation package), put in a random directory, such as I put in: D:\Program Files\mongodb, extracted after the file as follows:

Then add the environment variable, do not need to use the CD every time to the bin directory, the above directory is added to the path key:

Create a folder to hold the database, such as: E:\MongoDB

Next the MongoDB installation bit Windows service, cmd command opened with administrator privileges, direct input:mongod--install--servicename mongodb--servicedisplayname MongoDB- -logpath E:\MongoDB\Logs\MongoDB.Log--dbpath E:\MongoDB--directoryperdb , behind the LogPath and DBPath are log directories and database directories, respectively, Open the Windows service and find MongoDB, if not, you go to Baidu again.

The installation is complete, the details look at the log log, Win+r input: MONGO as follows:

This is successful, the default connection is the test database, happy to play it

Three management commands for MONGODB services:

Start Mongodb:net start MongoDB
Stop Mongodb:net Stop MongoDB
Delete MONGODB:SC Delete MongoDB

Must be running under Administrator privileges

MongoDB installation under Windows

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.