कैसे डाउनलोड करें और इंस्टॉल करें MongoDB on Windows और बादल

⚡ स्मार्ट सारांश

डाउनलोड और इंस्टॉल कैसे करें MongoDB on Windows and Cloud is explained as a complete setup guide. This resource covers installing MongoDB सामुदायिक सर्वर चालू Windows, Javaलिखी हुई कहानी, Python, and Ruby drivers, MongoDB Compass, configuration with import and export, a config file, and deploying MongoDB Atlas on the cloud.

  • 🪟 Windows स्थापित करें: Download the 64-bit Community Server and run the MSI installer.
  • 🔌 ड्राइवर्स: JavaScript ships built in; add Python (pymongo) and Ruby (mongo) drivers.
  • 🧭 दिशा सूचक यंत्र: स्थापित करें MongoDB Compass GUI to manage databases visually.
  • ⚙️ विन्यास: Set the data directory, import/export CSV, and use a config file.
  • बादल: तैनाती MongoDB Atlas on AWS, गूगल Cloud, or Azure and connect a client.

डाउनलोड और इंस्टॉल कैसे करें MongoDB

इसके लिए इंस्टॉलर MongoDB are available in both the 32-bit and 64-bit format. The 32-bit installers are good for development and test environments. But for production environments you should use the 64-bit installers. Otherwise, you can be limited in the amount of data that can be stored within MongoDB. It is advisable to always use the stable release for production environments.

कैसे डाउनलोड करें और इंस्टॉल करें MongoDB on Windows

डाउनलोड और इंस्टॉल करने के लिए निम्नलिखित चरणों का उपयोग किया जा सकता है MongoDB on Windows 10:

चरण 1) डाउनलोड करें MongoDB समुदाय सर्वर

इस पर जाएँ संपर्क और डाउनलोड करें MongoDB सामुदायिक सर्वर। हम इसके लिए 64-बिट संस्करण स्थापित करेंगे Windows.

डाउनलोड और स्थापित करें MongoDB on Windows

चरण 2) सेटअप पर क्लिक करें

Once the download is complete, open the msi file. Click Next in the start-up screen.

डाउनलोड और स्थापित करें MongoDB on Windows

चरण 3) अंतिम-उपयोगकर्ता लाइसेंस अनुबंध स्वीकार करें

  1. Accept the End-User License Agreement.
  2. अगला पर क्लिक करें।

डाउनलोड और स्थापित करें MongoDB on Windows

Step 4) Click on the “Complete” button

Click on the “Complete” button to install all of the components. The custom option can be used to install selective components or if you want to change the location of the installation.

डाउनलोड और स्थापित करें MongoDB on Windows

चरण 5) सेवा कॉन्फ़िगरेशन

  1. Select “Run service as Network Service user”. Make a note of the data directory; we will need this later.
  2. अगला पर क्लिक करें।

डाउनलोड और स्थापित करें MongoDB on Windows

चरण 6) स्थापना प्रक्रिया शुरू करें

स्थापना शुरू करने के लिए इंस्टॉल बटन पर क्लिक करें।

डाउनलोड और स्थापित करें MongoDB on Windows

Step 7) Click Next once completed

Installation begins. Click Next once completed.

डाउनलोड और स्थापित करें MongoDB on Windows

चरण 8) फ़िनिश बटन पर क्लिक करें

Final step: once the installation is complete, click on the Finish button.

डाउनलोड और स्थापित करें MongoDB on Windows

नमस्ते विश्व MongoDB: Javaस्क्रिप्ट ड्राइवर

ड्राइवर अंदर MongoDB are used for connectivity between client applications and the database. For example, if you had a Java कार्यक्रम और इसे कनेक्ट करने की आवश्यकता है MongoDB, then you would require to download and integrate the Java ड्राइवर ताकि प्रोग्राम के साथ काम कर सके MongoDB डेटाबेस।

इसके लिए ड्राइवर Javaलिपि बॉक्स से बाहर आता है। MongoDB shell which is used to work with the MongoDB database is actually a JavaScript shell. To access it:

चरण 1) Go to “C:\Program Files\MongoDB\Server\4.0\bin” पर क्लिक करें और mongo.exe पर डबल क्लिक करें। वैकल्पिक रूप से, आप पर भी क्लिक कर सकते हैं MongoDB desktop item.

नमस्ते विश्व MongoDB: Javaस्क्रिप्ट ड्राइवर

चरण 2) Enter the following program into the shell:

var myMessage='Hello World';
printjson(myMessage);

नमस्ते विश्व MongoDB: Javaस्क्रिप्ट ड्राइवर

Code स्पष्टीकरण:

  1. हम बस एक सरल घोषणा कर रहे हैं JavaScript variable to store a string called ‘Hello World’.
  2. हम वेरिएबल को स्क्रीन पर प्रिंट करने के लिए printjson विधि का उपयोग कर रहे हैं।

स्थापित करें Python चालक

चरण 1) सुनिश्चित करना Python is installed on the system.

चरण 2) Install the mongo related drivers by issuing the below command:

pip install pymongo

रूबी ड्राइवर स्थापित करें

चरण 1) Ensure Ruby is installed on the system.

चरण 2) Ensure gems is updated by issuing the command:

gem update --system

चरण 3) Install the mongo related drivers by issuing the below command:

gem install mongo

स्थापित करें MongoDB Compass - MongoDB प्रंबधन टूल

बाजार में ऐसे उपकरण उपलब्ध हैं जो प्रबंधन के लिए उपलब्ध हैं MongoDBऐसा ही एक गैर-वाणिज्यिक उपकरण है MongoDB Compass. Some of the features of Compass are given below:

  1. Full power of the Mongo shell
  2. अनेक गोले
  3. एकाधिक परिणाम

चरण 1) इस पर जाएँ संपर्क and click download.

स्थापित करें MongoDB Compass

चरण 2) Enter details in the popup and click submit.

स्थापित करें MongoDB Compass

चरण 3) Double click on the downloaded file.

स्थापित करें MongoDB Compass

चरण 4) Installation will auto-start.

स्थापित करें MongoDB Compass

चरण 5) Compass will launch with a Welcome screen.

स्थापित करें MongoDB Compass

चरण 6) Keep the privacy settings as default and click “Start Using Compass”.

स्थापित करें MongoDB Compass

चरण 7) You will see the home screen with a list of current databases.

स्थापित करें MongoDB Compass

MongoDB कॉन्फ़िगरेशन, आयात और निर्यात

शुरू करने से पहले MongoDB सर्वर, पहला महत्वपूर्ण पहलू डेटा निर्देशिका को कॉन्फ़िगर करना है जहां सभी MongoDB data will be stored. This can be done in the following way:

MongoDB कॉन्फ़िगरेशन, आयात और निर्यात

उपरोक्त कमांड 'md \data\db' आपके वर्तमान स्थान पर \data\db नामक एक निर्देशिका बनाता है। MongoDB इस स्थान पर स्वचालित रूप से डेटाबेस बनाएगा, क्योंकि यह डिफ़ॉल्ट स्थान है MongoDB इसकी जानकारी संग्रहीत करने के लिए। हम बस यह सुनिश्चित कर रहे हैं कि निर्देशिका मौजूद है, ताकि MongoDB जब यह शुरू हो जाए तो इसे ढूंढा जा सकता है।

डेटा का आयात MongoDB “mongoimport” कमांड का उपयोग करके किया जाता है। निम्न उदाहरण दिखाता है कि यह कैसे किया जा सकता है।

चरण 1) Create a CSV file called data.csv and put the following data in it:

Employeeid,EmployeeName
1,Guru99
2,Mohan
3,Smith

So in the above example, we are assuming we want to import 3 documents into a collection called data. The first row is called the header line, which will become the field names of the collection.

चरण 2) Issue the mongoimport command.

MongoDB कॉन्फ़िगरेशन, आयात और निर्यात

Code स्पष्टीकरण:

  1. We are specifying the db option to say which database the data should be imported to.
  2. The type option is to specify that we are importing a csv file.
  3. Remember that the first row is called the header line, which will become the field names of the collection; that is why we specify the –headerline option. And then we specify our data.csv file.

उत्पादन

MongoDB कॉन्फ़िगरेशन, आयात और निर्यात

आउटपुट से स्पष्ट रूप से पता चलता है कि 3 दस्तावेज़ आयात किए गए थे MongoDB.

निर्यात MongoDB is done by using the mongoexport command.

MongoDB कॉन्फ़िगरेशन, आयात और निर्यात

Code स्पष्टीकरण:

  1. हम db विकल्प निर्दिष्ट कर रहे हैं कि डेटा को किस डेटाबेस से निर्यात किया जाना चाहिए।
  2. We are specifying the collection option to say which collection to use.
  3. The third option is to specify that we want to export to a csv file.
  4. चौथा यह निर्दिष्ट करना है कि संग्रह के कौन से क्षेत्र निर्यात किए जाने चाहिए।
  5. –out विकल्प डेटा निर्यात करने के लिए csv फ़ाइल का नाम निर्दिष्ट करता है।

उत्पादन

MongoDB कॉन्फ़िगरेशन, आयात और निर्यात

आउटपुट से स्पष्ट रूप से पता चलता है कि 3 रिकॉर्ड निर्यात किए गए थे MongoDB.

का विन्यास MongoDB कॉन्फ़िगरेशन फ़ाइल वाला सर्वर

One can configure the mongod server instance to start up with a configuration file. The configuration file contains settings that are equivalent to the mongod command-line options. For example, suppose you wanted MongoDB to store all its logging information to a custom location, then follow the below steps:

चरण 1) Create a file called “mongod.conf” and store the below information in the file.

का विन्यास MongoDB कॉन्फ़िगरेशन फ़ाइल वाला सर्वर

  1. The first line of the file specifies that we want to add configuration for the system log file, that is where the information about what the server is doing goes, in a custom log file.
  2. दूसरा विकल्प यह है कि स्थान एक फ़ाइल होगा।
  3. This mentions the location of the log file.
  4. logAppend: “true” का मतलब यह सुनिश्चित करना है कि लॉग जानकारी लॉग फ़ाइल में जुड़ती रहे। यदि आप मान “false” रखते हैं, तो फ़ाइल हटा दी जाएगी और जब भी सर्वर फिर से शुरू होगा, तो उसे नए सिरे से बनाया जाएगा।

चरण 2) Start the mongod server process and specify the above created configuration file as a parameter. The screenshot of how this can be done is shown below.

का विन्यास MongoDB कॉन्फ़िगरेशन फ़ाइल वाला सर्वर

Once the above command is executed, the server process will start using this configuration file, and if you go to the /etc directory on your system, you will see the mongod.log file created. The below snapshot shows an example of what a log file would look like.

का विन्यास MongoDB कॉन्फ़िगरेशन फ़ाइल वाला सर्वर

कैसे स्थापित करने के लिए MongoDB क्लाउड पर (AWS, गूगल, Azure)

You do not need to install the MongoDB server and configure it. You can deploy a MongoDB Atlas server on the cloud on platforms like AWS, गूगल Cloud, and Azure, and connect to the instance using a client. Below are the detailed steps:

चरण 1) इस पर जाएँ संपर्क.

  1. व्यक्तिगत विवरण दर्ज करें
  2. शर्तों से सहमत हैं
  3. Click the button “Get Started Free”

स्थापित करें MongoDB क्लाउड पर

चरण 2) Click “Build my first cluster”.

स्थापित करें MongoDB क्लाउड पर

चरण 3) आप इनमें से चयन कर सकते हैं एडब्ल्यूएसगूगल क्लाउड और Azure as your cloud provider. In this tutorial, we will use AWS, which is set by default. Make no other changes on the page and click “Create Cluster".

स्थापित करें MongoDB क्लाउड पर

चरण 4) Cluster creation takes some time.

स्थापित करें MongoDB क्लाउड पर

चरण 5) After some time you will see the cluster ready.

स्थापित करें MongoDB क्लाउड पर

चरण 6) Click Security > Add new user.

स्थापित करें MongoDB क्लाउड पर

चरण 7) अगली स्क्रीन पर:

  1. उपयोगकर्ता क्रेडेंशियल दर्ज करें
  2. विशेषाधिकार निर्दिष्ट करें
  3. Click the Add User button

स्थापित करें MongoDB क्लाउड पर

चरण 8) In the dashboard, click the connect button.

  1. अपने IP कनेक्शन को श्वेतसूची में डालें
  2. कनेक्शन विधि चुनें

स्थापित करें MongoDB क्लाउड पर

चरण 9) Select the connection method of your choice to connect to the MongoDB सर्वर.

स्थापित करें MongoDB क्लाउड पर

अक्सर पूछे जाने वाले प्रश्न

Yes. AI assistants can generate mongod configuration files, explain connection errors, and suggest fixes for driver or service issues. You should still verify commands against the official MongoDB documentation before applying them.

हां. MongoDB Atlas includes Atlas Vector Search and AI integrations that let you build semantic search and retrieval-augmented generation apps. It stores embeddings alongside documents, removing the need for a separate vector database.

हां. MongoDB Community Server is free and open source for Windows, macOSऔर लिनक्स। MongoDB Atlas also provides a free cloud tier, while Enterprise Edition adds paid advanced features and support.

Community Server is installed and managed on your own machine or server. Atlas is a fully managed cloud service that handles setup, scaling, backups, and security on AWS, गूगल Cloud, or Azure.

इस पोस्ट को संक्षेप में इस प्रकार लिखें: