Python:win7 64-bit how to install MongoDB?

Source: Internet
Author: User
Tags install mongodb mongodb version

Windows 7 64-bit installation MongoDB

Official website tutorial:https://docs.mongodb.com/v3.0/tutorial/install-mongodb-on-windows/

First, get MongoDB Community Edition

1. Determine which mongodb you need to install?
See what version of Windows you own and download the corresponding MongoDB version.
You can view the system version and how many bits by using the cmd command:
WMIC OS Get Caption
WMIC OS get Osarchitecture

Small episode:
In cmd input WMIC, prompt says not internal or external commands, nor can run programs or batch files, how to resolve?
When you encounter this type of problem, the environment variable is not set correctly.
1) Check if the computer has C:\WINDOWS\system32\wbem this folder.
2) Do you want to see if this path is available in path? (My Computer → right-click → properties → advanced → environment variables). If not, add the path to path.

2. Download MongoDB


Links: https://www.mongodb.com/download-center?jmp=docs&_ga=1.168348257.1961460447.1474878186#community
Download the corresponding Windows 7 64 bit MongoDB, here i download is Windows Server R2 64-bit and Later,with SSL support x64.
This is the Mongodb-win32-x86_64-2008plus-ssl-3.2.9-signed.msi file. The 64-bit version of MongoDB is not available for Windows 32-bit systems.

Second, the installation of MongoDB Community Edition
Double-click the. msi file to install it in a single step. The system is installed by default on the C disk C:\Program Files, and I changed the installation in C:\MongoDB.
After the installation is complete, in the C:\MongoDB\Server\3.2\bin directory, you will see some files.

Third, running MongoDB Community Edition
Note: The path entered here is the MongoDB installation path.
1. Setting up MongoDB's operating environment
MongoDB requires that you set up a data directory to hold the information by default \data\db
On the cmd command line input: MD c:\data\db
Specify your own data set directory and enter it on the cmd command line:
C:\MongoDB\Server\3.2\bin\mongod.exe--dbpath C:\MongoDB\data\db
2. Start MongoDB
On the cmd command line, enter: C:\MongoDB\Server\3.2\bin\mongod.exe
Start the MongoDB database process and see the waiting for connections on port 27017 information in the CMD Command Line window to indicate that the boot was successful.
This step may pop up a security warning dialog box that tells you that C:\MongoDB\Server\3.2\bin\mongod.exe needs to be networked, allowing you to choose the network environment,
Everyone should choose a private or home network or work network.
3. Connect MongoDB
Connect to MongoDB via Mongo.exe. Do not close the command-line window, and then open a command-line window to enter:
C:\MongoDB\Server\3.2\bin\mongo.exe
After entering the command line window, you will be prompted:


Indicates that the connection was successful. But there is this problem (does not affect the use, the provisional unresolved),
2016-09-27t15:20:29.145+0800 I CONTROL [main] Hotfix KB2731284 or later update is not installed, would zero-out data files.

Iv. Configuring MongoDB Community Edition for Windows systems
The main purpose is to allow MongoDB to start with the computer booting from.
1. Create a log folder under C:\MongoDB\data
2. Create a profile mongod.cfg under C:\MongoDB, and specify Systemlog.path and Storage.dbpath.
In the mongod.cfg input below and save, it is important to note that the inside of the space can not be used with the TAB key and the case of each letter, especially DBPath.

Systemlog:    destination:file    path:c:\mongodb\data\log\mongod.logstorage:    dbpath:c:\mongodb\data\db

3. Installing MongoDB Service
Open a CMD command line with Administrator privileges, enter the following on the command line,
"C:\MongoDB\Server\3.2\bin\mongod.exe"--config "C:\MongoDB\mongod.cfg"--install
Note: "C:\MongoDB\Server\3.2\bin\mongod.exe" includes quotation marks.
4. Start, stop, or remove MongoDB services
Start the MongoDB service and enter it on the cmd command line:
net start MongoDB
To stop the MongoDB service, enter it on the cmd command line:
net stop MongoDB
To delete the MongoDB service, enter it on the cmd command line:
"C:\MongoDB\Server\3.2\bin\mongod.exe"--remove

  

Python:win7 64-bit how to install 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.