Cov txheej txheem:

MongoDB config file nyob qhov twg?
MongoDB config file nyob qhov twg?

Video: MongoDB config file nyob qhov twg?

Video: MongoDB config file nyob qhov twg?
Video: File Upload Setup - Node.js/Express/MongoDB Course #4 2024, Kaum ib hlis
Anonim

Ntawm Linux, lub neej ntawd /etc/mongod. conf configuration file suav nrog thaum siv tus thawj tswj pob rau nruab MongoDB . Hauv Windows, lub neej ntawd /bin/mongod. cfg ua configuration file yog suav nrog thaum lub installation.

Ib yam li ntawd, kuv cov ntaub ntawv MongoDB config nyob qhov twg?

Ntawm Linux, lub neej ntawd /etc/ mongod . conf configuration file suav nrog thaum siv tus thawj tswj pob rau nruab MongoDB . Hauv Windows, lub neej ntawd /bin / mongod . cfg ua configuration file suav nrog thaum tus kev teeb tsa.

Ib qho tseem yuav nug, MongoDB config file Ubuntu nyob qhov twg? Cov MongoDB piv txwv khaws nws cov ntaub ntawv cov ntaub ntawv in /var/lib/ mongodb thiab nws lub log cov ntaub ntawv hauv /var/log/ mongodb los ntawm lub neej ntawd thiab khiav siv lub mongodb tus neeg siv tus account. Koj tuaj yeem teev cov ntaub ntawv sib txawv thiab cov ntaub ntawv ntaub ntawv directories hauv /etc/ mongod . conf.

Hauv qhov no, MongoDB config file ntawm Windows nyob qhov twg?

Kev teeb tsa Cov ntaub ntawv Los ntawm lub neej ntawd, nws yuav khaws cia hauv "C:datadb", tsim daim nplaub tshev no manually. MongoDB yuav tsis tsim rau koj. Koj tuaj yeem teev cov ntaub ntawv hloov pauv nrog --dbpath kev xaiv.

Yuav ua li cas tsim MongoDB config file hauv Windows?

Configure a Windows Service for MongoDB

  1. Ntawm lub tshuab uas koj tau nruab MongoDB Community Edition, xaiv lub Windows Start khawm, tom qab ntawd mus rau thiab nyem rau ntawm Command Prompt, thiab tom qab ntawd xaiv Khiav raws li tus thawj coj.
  2. Ntawm lub qhov rais hais kom ua, sau cov hauv qab no:
  3. Tsim cov ntaub ntawv configuration (.cfg).

Pom zoo: