MongoDB is installed and automatically started with Windows Startup

Source: Internet
Author: User
Tags install mongodb
The official download site for MongoDB is http://www.mongodb.org/downloads. you can download the latest Program . On the download page, you can see that OS X, Linux, windows, and Solaris are fully supported, and each version has its own 32-bit and 64-bit versions. The current stable version is 1.8.1.

1. Windows Installation

 

(1) download MongoDB

URL: http://downloads.mongodb.org/win32/mongodb-win32-i386-1.8.1.zip

(2) set the MongoDB directory

Decompress the package to the mongdb folder on disk D. The path is D: \ mongdb.

3) set the data file path

Create a logs and data folder in D: \ MongoDB

Create a MongoDB. Log File in D: \ MongoDB \ logs.

 

2. ConfigurationMongoServer:

Open the CMD window: Enter the following command:

> D:
> Cd D: \ MongoDB \ bin
> Mongod -- dbpath D: \ MongoDB \ data -- logpath = D: \ MongoDB \ logs \ MongoDB. log -- install

 

 

 

Enable MongoDB in the service

For Windows 7. Run cmd as the administrator.

 

3. Client Connection Verification

Open a new cmd input: D: \ MongoDB \ bin \ Mongo. If the following prompt appears, you can start your MongoDB Journey:
D: \ MongoDB \ bin> D: \ MongoDB \ bin \ Mongo
MongoDB shell version: 1.8.1
Connecting to: Test
>

4. View logs

D: \ MongoDB \ logs MongoDB. Log

 

 

 

 

5. Supplement

 

 

C: \ MongoDB \ bin > Mongod -- Help
 
Windows Service Control Manager options:
-- Install install MongoDB Service
-- Remove remove MongoDB Service
-- Reinstall reinstall MongoDB Service (equivilant of mongod
-- Remove followed by mongod -- install)
-- Servicename Arg Windows Service name
-- Servicedisplayname Arg Windows Service display name
-- Servicedescription Arg Windows Service Description
-- Serviceuser Arg user name service executes
-- Servicepassword Arg password used to authenticate serviceuser

 

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.