MongoDB installation under Windows

Source: Internet
Author: User

The following is mostly my note on Windows (Win7) that installs, runs, installs Windows services to make a memo.

1. Download

: Http://www.mongodb.org/downloads

From its download page can see MongoDB is really good, support each operating system, its driver also has a lot of, currently I use the. NET Platform.

2. Installation

Installation is very simple, decompression on the line, I unzipped, placed in the D:/mongodb directory.

For the convenience of the command line, the D:/mongodb/bin can be added to the path of the system environment variable.

3. Operation

D:\>mongod--dbpath D:/mongodb/data
Sun Oct 15:07:05 MongoDB starting:pid=2472 port=27017 dbpath=d:/mongodb/data 32-bit

* * Note:this is a development version (1.7.1) of MongoDB.
* * Recommended for production.

* * Note:when using MongoDB + bit, you is limited to about 2 gigabytes of data

* * See Http://blog.mongodb.org/post/137788967/32-bit-limitations

Sun Oct 15:07:05 db version v1.7.1, pdfile version 4.5
Sun Oct 15:07:05 git version:cee2d0d6816a704126c283401db24c949d5f52a3
Sun Oct 15:07:05 sys info:windows (5, 1, 2600, 2, ' Service Pack 3 ') boost_lib_version=1_35
Sun Oct 15:07:05 [Initandlisten] waiting for connections on port 27017
Sun Oct 15:07:05 [websvr] Web admin interface listening on port 28017

Because it is a development version, there is a warning, it doesn't matter, ignore it.

The last two lines describe the database port and the Web port, respectively 27017 and 28017, open http://localhost:27017 in the browser, and you can see some information about it.

4. Install Windows Services

It is inconvenient to start MongoDB every time you run Mongod--dbpath d:/mongodb/data command line, it is much more convenient to use it as a Windows service.

D:\mongodb\bin>mongod--logpath D:\MongoDB\logs\MongoDB.log--logappend--dbpath D:\MongoDB\data--directoryperdb --servicename MongoDB--install
All output Going To:d:\mongodb\logs\mongodb.log
Creating service MongoDB.
Service creation successful.
Service can is started from the command line via ' net start ' MongoDB '.

Note: This command to the MongoDB Bin directory to run, at the beginning, I was directly under the D:\ run, the results of the service executable directory is "" D:\mongod "--logpath" D:\MongoDB\logs\MongoDB.log "-- Logappend--dbpath "D:\MongoDB\data"--directoryperdb--service ", certainly is wrong.

The command line specifies the log file: D:\MongoDB\logs\MongoDB.log, the log is output in an append manner;

Data file directory: D:\MongoDB\data, and the parameter--directoryperdb indicates that each DB will create a new directory;

Name of the Windows service: MongoDB;

The above three parameters can be determined according to their own circumstances, you can see more parameters through the Mongod--help.

Finally, the installation parameters:--install, the opposite is--remove

Start Mongodb:net start MongoDB


Stop Mongodb:net Stop MongoDB

Above is my first experience of installing MongoDB, I hope to learn mongodb! with you friends.

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.