Configure local Mongodb installation and configuration in Windows XP

Source: Internet
Author: User
Tags create mongodb install mongodb mongodb version

Today I read a book about nodejs, which contains the knowledge required to use the mongoDB database. Before learning about this knowledge, install mongoDB first. The following are the installation steps, hoping to help you install mongoDB.


1. Download mongoDB

Download the mongoDB version based on your computer's system configuration. Because my computer is an XP system, I first use the XP system for installation as a case. : Http://www.mongodb.org/downloads


2. Decompress mongoDB

After the download is complete, a compressed package is added to the downloaded directory. Decompress the package to the directory where you want to install mongoDB. For example, D: Drive. (1-1)


Figure 1-1


3. Create a working directory

(1) create a data storage directory: D: \ mongodb \ data \ db

(2) create a log Folder: D: \ mongodb \ log. Mongodb. log does not need to be created manually.


4. Start the mongoDB Service

Enter cmd to enter the console. Enter d: Enter the disk in the installation directory, then enter cd mongoDB to enter the file, enter the bin folder, and enter

mongod.exe --dbpath=D:\mongodb\data\db


The image is displayed


Open http: // 127.0.0.1: 27017/, as shown in figure


  

As shown above. A series of information appears in the Command window. The last line is connection accepted from 127.0.0.1: 53110 #1. After a while (this operation environment takes about 20 s), mem (MB) res will appear: 16 virt: 81 mapped: 0, which indicates that it has been started. The following content should be displayed during normal operation. You can enter the address http: // localhost: 27017/. The following result is displayed on the page:

You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number


5. Install MongoDB as a windows Service

Create a console and enter

  

 
 


Correctly display the following content

all output going to: E:\mongodb\logs\mongodb.log


As shown in figure



Start the service and enter the command.

net start mongodb

Display content

The Mongo DB service has been started successfully.


As shown in figure


The following information is displayed in the Computer Management Service:



6. Common Errors

(1) When mongoDB is first installed, if Mon Nov 18 19:00:00 [clientcursormon] mem (MB) res: 1 virt: 44 mapped: 0 or [conn3] end connection 127.0.0.1: 3207 is normal. You can enter a new console on the console. As long as the following results are displayed on the http: // localhost: 27017/Page:

You are trying to access MongoDB on the native driver port. For http diagnostic access, add 1000 to the port number indicates that the installation is successful.

(2) If the d.exe is not an internal or external command, or a program or batch file that can be run, check the running environment in D: mongodb \ bin>

(3) If can't open [D: mongodb \ log \ mongodb. log] for log file: errno 2. Do not create mongoDB when creating a log directory. log File. Otherwise, the following error will be reported:

D: \ mongodb> mongod -- dbpath d: \ mongodb \ data \ db -- logpath d: \ mongodb \ log \ mongodb. logall output going to: d: \ mongodb \ log \ mongodb. logcan't open [d: \ mongodb \ log \ mongodb. log] for log file: errno: going to close listening sockets... wed Jun 06 23:27:20 shutdown: going to flush diaglog... wed Jun 06 23:27:20 shutdown: going to close sockets... wed Jun 06 23:27:20 shutdown: waiting for fs preallocator... wed Jun 06 23:27:20 shutdown: closing all files... wed Jun 06 23:27:20 closeAllFiles () finishedWed Jun 06 23:27:20 dbexit: really exiting now

Install and configure Mongodb in Windows XP to configure the local environment. The installation of mongoDB in the Windows XP system is introduced here, hoping to help you.


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.