MongoDB Download and installation configuration Tutorial "for reference only"

Source: Internet
Author: User
Tags install mongodb mongodb download

1 Downloads

Download page address: https://www.mongodb.org/downloads

Version selection: The computer system is 64-bit, so I chose the Windows 64-bit r2+, MSI package


2 installation

Installation path: D:\Program files\mongodb\server\3.0

Under this directory, create the following 2 folders:

DATA\DB: Data storage

LOG: Storage log

3 start

Go to Bin directory,--DBPath Select the database storage path

After the MONGO service starts successfully, we start the MONGO client or start in the bin directory

But every time to go into the directory to start, it is troublesome, so I add D:\Program files\mongodb\server\3.0\bin to the environment variable (this should be), after adding a successful, we can execute in any directory Mongo.exe

4 Configuring as a service

First I created a mongo.config file in the 3.0 directory

The contents of the file are as follows:

Dbpath=d:\program files\mongodb\server\3.0\data\db
Logpath=d:\program Files\mongodb\server\3.0\log\mongo.log

Save well.

Or in the bin directory, execute:

Because I have already created mongo.log before, so we can see on the hint that the original file saved as XXX.

We're going to look at the list of services that have been successfully added

Or we sometimes need to manually stop or restart the MONGDB service, we can do the following:

That's probably it. Made on June 28, 2015 morning, there are other online tutorials implemented.

---------------------------------------------------------------------------------------------------

Here are the notes on learning MongoDB on Linux (Ubuntu), which are very simple to write.

Installation method    sudo apt-get install mongodb  start Command  sudo service MongoDB start  The default is to read/etc/ mongodb.conf configuration--config/etc/mongodb.conf  or: cd  /usr/bin/sudo./mongod--dbpath/var/lib/mongodb/-- Logpath/var/log/mongodb/mongodb.log--logappend &orsudo./mongod--dbpath/var/lib/mongodb/--logpath/var/log/ Mongodb/mongodb.log--logappend--fork   If there is a non-default port number specified sudo./mongod--dbpath/var/lib/mongodb/--logpath/var/ Log/mongodb/mongodb.log  --logappend  --port=27018   & Default login is direct MONGO, but after changing port number MONGO Ip:port like MONGO 127.0.0.1:27018  LAN Access  bind_ip 0.0.0.0port 27017   if setting master/slave can set the following main configuration sudo./mongod--dbpath/var/lib /mongodb/--logpath/var/log/mongodb/mongodb.log--master--journal--logappend--fork from config sudo./mongod--dbpath/var/ lib/mongodb/--logpath/var/log/mongodb/mongodb.log--slave--logappend--fork--source 192.168.1.106--slavedelay 5& nbsp; Master and slave settings, or the presence of MongoDB can not start if it is the master-slave settings, you can empty the--dbpath directory of all Files if the MONGO appears to start, then delete--dbFile with lock under Path, reboot  

MongoDB Download and installation configuration Tutorial "for reference only"

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.