MongoDB cov ntaub ntawv khaws Ubuntu nyob qhov twg?
MongoDB cov ntaub ntawv khaws Ubuntu nyob qhov twg?

Video: MongoDB cov ntaub ntawv khaws Ubuntu nyob qhov twg?

Video: MongoDB cov ntaub ntawv khaws Ubuntu nyob qhov twg?
Video: Mi Noog - Sudden Rush_-_Skriibblez-MongO_Remix 2024, Kaum ib hlis
Anonim

4 Teb. Los ntawm lub neej ntawd, MongoDB mloog rau kev sib txuas los ntawm cov neeg siv khoom ntawm chaw nres nkoj 27017, thiab khw muag khoom cov ntaub ntawv hauv / cov ntaub ntawv /db directory. Yog koj xav tau mongod khaws cia cov ntaub ntawv cov ntaub ntawv ntawm txoj kev uas tsis yog / cov ntaub ntawv / db koj tuaj yeem qhia qhov dbPath. Lub dbPath yuav tsum muaj ua ntej koj pib mongod.

Ib yam li ntawd, MongoDB cov ntaub ntawv khaws cia hauv Ubuntu nyob qhov twg?

4 Teb. Los ntawm lub neej ntawd, MongoDB mloog rau kev sib txuas los ntawm cov neeg siv khoom ntawm chaw nres nkoj 27017, thiab khw muag khoom cov ntaub ntawv hauv / cov ntaub ntawv /db directory. Yog koj xav tau mongod khaws cia cov ntaub ntawv cov ntaub ntawv ntawm txoj kev uas tsis yog / cov ntaub ntawv / db koj tuaj yeem qhia qhov dbPath. Lub dbPath yuav tsum muaj ua ntej koj pib mongod.

Tom qab, lo lus nug yog, MongoDB cov ntaub ntawv khaws cia li cas? Hauv MongoDB , cov ntaub ntawv yog khaws cia raws li cov ntaub ntawv. Cov ntaub ntawv no yog khaws cia hauv MongoDB hauv JSON (JavaScript Object Notation) hom ntawv. JSON cov ntaub ntawv txhawb nqa daim teb, yog li cuam tshuam cov ntaub ntawv thiab lis cov ntaub ntawv tuaj yeem yog khaws cia nrog cov ntaub ntawv tsis yog lub rooj sab nraud. JSON yog formatted raws li lub npe/tus nqi khub.

Hais txog qhov no, kuv cov ntaub ntawv MongoDB khaws cia nyob qhov twg?

Los ntawm lub neej ntawd, MongoDB mloog rau kev sib txuas los ntawm cov neeg siv khoom ntawm chaw nres nkoj 27017, thiab khw muag khoom cov ntaub ntawv hauv tus / cov ntaub ntawv /db directory. Hauv Windows, txoj kev no yog nyob rau tus tsav los ntawm qhov koj pib MongoDB . Piv txwv li, yog tias koj tsis qhia meej txog --dbpath, pib a MongoDB server rau tus C: tsav khw muag khoom tag nrho cov ntaub ntawv cov ntaub ntawv hauv C: cov ntaub ntawv db ib.

MongoDB cov ntaub ntawv khaws cia Mac nyob qhov twg?

Lub neej ntawd cov ntaub ntawv directory rau MongoDB yog / cov ntaub ntawv /dwb.

Tom qab txhim kho MongoDB nrog Homebrew:

  1. Cov ntaub ntawv khaws cia hauv /usr/local/var/mongodb/ directory.
  2. Lub mongod.
  3. Cov mongo cav tuaj yeem pom ntawm /usr/local/var/log/mongodb/

Pom zoo: