Install running MongoDB 1 under WIN7), download MongoDB

Source: Internet
Author: User
Tags mongodb 32 bit mongodb server



1), download MongoDB
http://downloads.mongodb.org/win32/mongodb-win32-i386-2.4.5.zip


Download the Windows 32-bit version and unzip, the program files are in the bin directory, the other two directories are C + + calls are header files and library files. The bin directory contains the following programs:
1. Mongo.exe, command-line client tools.
2. Mongod.exe, database service program.
3. Mongodump.exe, database Backup program.
4. Mongoexport.exe, data Export tool.
5. Mongofiles.exe,gridfs tool.
6. Mongoimport.exe, data Import tool.
7. Mongorestore.exe, Database Recovery tool.
8. Mongos.exe, seemingly a performance testing tool.


2), set up MongoDB directory



Unzip it to D:\, and then rename it to MongoDB, the path is D:\mongodb



3), set the data file path



In D: Set up a Data folder, create a new DB folder in the Data folder, the path d:\data\db



4), start MongoDB service



Go to the CMD prompt console,
D:\mongodb\bin\mongod.exe--dbpath=d:\data\db


 
Mon Apr 16 08:50:54
Mon Apr 16 08:50:54 warning: 32-bit servers don‘t have journaling enabled by def
ault. Please use --journal if you want durability.
Mon Apr 16 08:50:54
Mon Apr 16 08:50:54 [initandlisten] MongoDB starting : pid=5084port=27017 dbpat
h=d:\data\db 32-bit host=PC-201012302214
Mon Apr 16 08:50:54 [initandlisten]
Mon Apr 16 08:50:54 [initandlisten] ** NOTE: when using MongoDB 32 bit, you are
limited to about 2 gigabytes of data
Mon Apr 16 08:50:54 [initandlisten] **       see http://blog.mongodb.org/post/13
7788967/32-bit-limitations
Mon Apr 16 08:50:54 [initandlisten] **       with --journal, the limit is lower
Mon Apr 16 08:50:54 [initandlisten]
Mon Apr 16 08:50:54 [initandlisten] db version v2.0.4, pdfile version 4.5
Mon Apr 16 08:50:54 [initandlisten] git version: 329f3c47fe8136c03392c8f0e548506
cb21f8ebf
Mon Apr 16 08:50:54 [initandlisten] build info: windows sys.getwindowsversion(ma
jor=6, minor=0, build=6002, platform=2, service_pack=‘Service Pack 2‘) BOOST_LIB
_VERSION=1_42
Mon Apr 16 08:50:54 [initandlisten] options: { dbpath: "d:\data\db" }
Mon Apr 16 08:50:54 [websvr] admin web console waiting for connections on port 2
8017
Mon Apr 16 08:50:54 [initandlisten] waiting for connections on port 27017

default connection port for MongoDB server: 27017



5), randomly start MongoDB as a Windows service



Create a D:\mongodb\logs\mongodb.log file to store the MongoDB log files before installing system services:
D:\mongodb\bin\mongod --dbpath=d:\data\db--logpath=D: \mongodb\logS\mongodb.log- -install



(If prompted: Error connecting to the Service Control Manager, you should run CMD with administrator


Locate the command handler C:\Windows\System32\cmd.exe right-click: Run as Administrator






all output going to: d: \ mongodb \ logs \ mongodb.log
  Creating service MongoDB.
  Service creation successful.
  Service can be started from the command line via ‘net start" MongoDB "'.
  D: \> net start mongodb
  The Mongo DB service has started successfully.
  D:>
Note: If you need to uninstall the service, execute the command: sc delete MongoDB 

6), Client connection verification



Open a new cmd input: D:\mongodb\bin\mongo, if prompted below, then you can start the MongoDB tour:


D:\mongodb\bin\mongo 
MongoDB Shell version:2.0.4 
Connecting To:test 


7), view MongoDB log



View the D:\mongodb\logs\mongodb.log file to view or debug the operation of MongoDB.






http://localhost:27017/can see the following tips:
You is trying to access MongoDB on the native driver port. For HTTP diagnostic access, add the port number
Thus, the MongoDB database service has been successfully started.



http://localhost:28017/Management



Install running MongoDB 1 under WIN7), download MongoDB


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.