MongoDB Database Download and installation

Source: Internet
Author: User


MongoDB is a very popular non-relational database that does a good job of object-oriented data storage. Here is not detailed introduction of its use, this article mainly explains how to install the MongoDB database, the installation process encountered in the problem and the final solution to share to everyone, hope can bring you help.


First, to download the MongoDB database

Official address: Https://www.mongodb.org/downloads, select the operating system and number of digits, go to the download page, and then click the arrow download not starting? Download, do not fill in the information.

Because the foreign website visit a bit slow, I was in http://www.cr173.com/soft/34691.html above download.

Second, install and start MongoDB database service

1, after downloading, double-click the installation MSI file, installed by default in the C:\Program Files folder, the root folder named after the version number, according to personal preference I only reserved mongodb. Personal suggestions to move folders to their own work disk, do not default to the C drive, because the data and log files are stored behind. I placed under the D disk, note: do not put in the Chinese name definition of the directory , or the subsequent execution of the installation command will be reported unable to open the file error.

Create a new data and log folder in MongoDB, where you are storing the files and logs separately. The name can be customized. The entire directory list is as follows:

2. Installing MongoDB Service

Run DOS ( you must run as administrator, or the file will be denied access error after installation ), go to the D:\MongoDB\bin directory, run the command:

Mongod.exe--install--logpath=d:\mongodb\log\log.txt--servicename=mongodb--dbpath=d:\mongodb\data\db

or Mongod--install--logpath=d:\mongodb\log\log.txt--servicename=mongodb--dbpath=d:\mongodb\data\db can also

Viewing the Log.txt file, you can see that MongoDB has been created successfully, below we open the MongoDB service

3. Run the net start MongoDB command to open the service

As you can see, the service has run successfully and will be in the form of a Windows service, no need to turn on every time

At this point, MongoDB is installed and can accept connections.

Let's take a look at the common Command meanings:

--install: Installation Services

--remov: Uninstall service (e.g. Mongod--remove--servicename= server, also with LogPath and DBPath options)

--logpath: Specifying the log file path

--dbpath: Specify the data file storage directory, preferably in the MongoDB directory, easy to manage

--servicename: Specify the service name

Net start Service Name: Turn on Installed services

NET stop service name: Stop service


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

MongoDB Database Download and 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.