Win32 install nosql (MongoDB)

Source: Internet
Author: User
Tags install mongodb mongodb version

Win32 install nosql (MongoDB)
1. general installation
1. download the installation package: http://www.mongodb.org/downloads
2, unzip the installation package: copy the bin folder to the directory path (such as D: \ MongoDB \). Do not decompress the package to a folder with spaces (for example, D: \ Program Files). Otherwise, many strange problems may occur. I started to work on this path for a long time.
3. set environment variables: my computer-> properties-> advanced-> environment variables-> system variables-> path add D: \ MongoDB \ bin. Multiple environment variables are separated by semicolons.
4. Configuration:
(1) Start cmd: Start-> Run-> CMD
(2) Start mongod: mongod -- dbpath =: \ MongoDB \ data \ dB \ -- logpath = D: \ MongoDB \ data \ log \ logs. log -- logappend. If the following screen is displayed, the startup is successful.
If dbpath is not specified, the default c: \ data \ dB is used. If the default setting is used, create a folder on drive C.
5. Run: open another CMD and enter Mongo to start. The following figure shows the successful startup. The lower part of show DBS is a simple Mongo test.
If the startup fails, the following screen is displayed.
Note: you must first open a cmd window to run mongod, and then open a cmd window to run Mongo. mongod cannot be closed during running.

II, Service Installation
1, Download, decompress, and set environment variables to be the same as normal installation.
2, Install the MongoDB service:
(1) Generate the BAT file:CodeSave as a bat file, such as install. bat.
: Generate config file.
Echo logpath = D: \ MongoDB \ log \ MongoDB. Log> D: \ MongoDB. cfg

: Install MongoDB Service
Mongod -- dbpath = D: \ MongoDB \ data \ -- config D: \ MongoDB. cfg -- install

Net start MongoDB
Pause
(2) Execute the installation: Double-click Install. bat. Some anti-virus software may prevent installation. Click allow. After the installation is successful, the following screen appears. You can also input the code in the BAT file into the CMD window for execution, but note that the bat comment is followed by two colons, so you do not need to enter the CMD for execution.
 
3, Run: Enter Mongo in cmd to start. The following figure shows the successful startup. The lower part of show DBS is a simple Mongo test.
 
4, Uninstall MongoDB Service
(1) Generate a BAT file: Save the following code as a bat file, such as Uninstall. bat.
Net stop MongoDB
Mongod -- remove
Pause
(2) Run uninstall: Double-click Uninstall. bat. You can also input the code in the BAT file into the CMD window for execution. After successful uninstallation, the following screen is displayed.
 

Note:

1. The above installation is completed by installing mongodb2.4.3 on Win32 xp. If it is another operating system or MongoDB version, it may be somewhat different. Please refer.

2. Change the path in the text according to the actual situation.

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.