Two commands for MongoDB installation

Source: Internet
Author: User

1. Installation

Download and install, note the installation method is custom, path customization (D:\CHENGXU\MONGODB), after the installation is successful and then the new Data folder (within the new DB folder) and Logs folder (inside new Mongodb.log file) under the MongoDB folder

2. Server-side Connection

CMD window, enter "d:\chengxu\mongodb\bin\mongod.exe--dbpath d:\chengxu\mongodb\data\db". After the carriage return, "waiting for Connenctions on port 27017" is executed successfully, the "localhost:27017" is accessed in the browser, and the cmd window that executes finally appears " Connection now open"text. Exit the server connection with "Ctrl +c".

3. Create a Windows service

CMD window input "d:\chengxu\mongodb\bin\mongod.exe--logpath d:\chengxu\mongodb\logs\mongodb.log--logappend--dbpath D : \chengxu\mongodb\data\db--servicename MongoDB--install". Window unresponsive indicates successful installation, you can start the service using the "net start Momgodb" command

4. You can view the version and other information by executing Mongo.exe

Two commands for MongoDB installation

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.