MongoDB इंस्टॉल करना
आप MongoDB Community Edition locally install कर सकते हैं या इसे एक Docker container में चला सकते हैं।
In this page:
MongoDB Install करना
Linux पर MongoDB repository add करने के बाद अपना package manager इस्तेमाल करें, macOS पर Homebrew इस्तेमाल करें, और Windows पर MSI installer इस्तेमाल करें। Docker सबसे quick तरीका है: official mongo image चलाएँ और port 27017 से connect करें।
अगर shामिल न हो तो mongosh separately install करें।
Note:
Docker आपको अपनी machine पर कुछ भी install किए बिना MongoDB try करने देता है।
उदाहरण: Installing MongoDB
# macOS
$ brew tap mongodb/brew && brew install mongodb-community
$ brew services start mongodb-community
# Docker (any OS)
$ docker run -d --name mongo -p 27017:27017 mongo:7
$ docker exec -it mongo mongosh
Current Mongosh Log ID: 65a1b2c3d4e5f60718293a4b
test>
⚠️ Run this in your own terminal or Node.js environment.
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the
view already swaps in the hi_ translation fields (or blanks these
out if untranslated), so this renders correctly for both languages
without a lang_code check here. #}
आम गलतियां
- mongod service शुरू करना भूल जाना
- बिना authentication के port 27017 internet को expose करना
- mongosh install न करना
चैप्टर सारांश
- Community Edition install करें या Docker इस्तेमाल करें
- mongod server है, mongosh shell है
- Default port 27017 है
- Expose करने से पहले authentication enable करें
🔒
Chapter Quiz — Complete all 7 topics to unlock
0/7 topics done
Complete these topics first: