MongoDB installation Configuration

Source: Internet
Author: User
Tags create mongodb robomongo

1. Download: http://www.mongodb.org/downloads

2. Unzip it and put it in the directory where you want to install the MongoDB, we assume the/mongodb directory (win can also be installed with MSI file)

3. Create the following directories and files (/mongodb is the root directory for MongoDB installation)

Catalog:/mongodb/data/db

Files:/mongodb/logs/mongo.log

Files:/mongodb/mongo.config

4. Configure the Mongo.config file (the following is the content of the configuration file under Win, MAC, Linux make the corresponding changes)

# #数据文件dbpath=e:\mongodb\data\db# #日志文件logpath=e:\mongodb\logs\mongo.log# #错误日志采用追加模式, After configuring this option, the MongoDB log is appended to the existing log file instead of creating a new file Logappend=true  #启用日志文件, Journal = True is enabled by default  #这个选项可以过滤掉一些无用的日志信息, if you need to debug use set to Falsequiet=true#端口号 defaults to 27017port=27017

5. Test the installation

/mongodb/--config. //mongodb/bin# start MongoDB shell$ MONGO

6. Win Set as service

--config D:\MongoDB\etc\mongodb.conf--install#SC mode SC create MongoDB binpath"e:\ Mongodb\bin\mongod.exe--service--config=e:\mongodb\mongo.config"net start MongoDB

7. Mac, Linux settings

Create file:/mongodb/runmongo.sh

File content: sudo./bin/mongo--config./MONGO.CONFGI

8. Installing the IDE

Recommended for open Source: Robomongo

: https://robomongo.org

MongoDB installation Configuration

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.