MongoDB Point of attention

Source: Internet
Author: User

Yesterday colleagues installed MongoDB encountered some problems, asked me, after pull found are some details did not pay attention to (reason it should be very simple, a good operation on the OK thing)

First, download the MONGO package,

Then, unzip the installation,

Start it.

The problem is that he always fails when the background starts, for the following reasons:

1. Parameter configuration, not written file, log permissions, DB location, I suggest the following:

DBPath =/usr/local/mongodb/data/db #数据文件存放目录

LogPath =/usr/local/mongodb/logs/mongodb.log #日志文件存放目录

Port = 27017 #端口

Fork = true #以守护程序的方式启用, which runs in the background

Nohttpinterface = true

2. When closed, note that normal shutdown

Mongo
Use admin
Db.shutdownserver ()

or kill-15 <pid>

MongoDB Point of attention

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.