Nasıl İndirilir ve Kurulur MongoDB on Windows ve Bulut

⚡ Akıllı Özet

İndirme ve Yükleme MongoDB on Windows and Cloud is explained as a complete setup guide. This resource covers installing MongoDB Community Server on Windows, JavaSenaryo, Python, and Ruby drivers, MongoDB Compass, configuration with import and export, a config file, and deploying MongoDB Atlas on the cloud.

  • 🪟 Windows Yükleyin: Download the 64-bit Community Server and run the MSI installer.
  • 🔌 Sürücüler: JavaScript ships built in; add Python (pymongo) and Ruby (mongo) drivers.
  • 🧭 Pusula: kurmak MongoDB Compass GUI to manage databases visually.
  • ⚙️ yapılandırma: Set the data directory, import/export CSV, and use a config file.
  • ☁️ Bulut: Sürüş MongoDB Atlas on AWS, Google Cloudya da Azure and connect a client.

İndirme ve Yükleme MongoDB

Kurulumcular 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.

Nasıl İndirilir ve Kurulur MongoDB on Windows

İndirme ve yükleme için aşağıdaki adımlar kullanılabilir MongoDB on Windows 10:

Adım 1) İndir MongoDB Community Server

Git Link ve indirme MongoDB Topluluk Sunucusu. 64 bit sürümünü yükleyeceğiz Windows.

Indirin ve yükle MongoDB on Windows

Adım 2) Kurulum'a tıklayın

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

Indirin ve yükle MongoDB on Windows

Adım 3) Son Kullanıcı Lisans Sözleşmesini Kabul Edin

  1. Son Kullanıcı Lisans Sözleşmesini kabul edin.
  2. Sonrakine tıkla.

Indirin ve yükle 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.

Indirin ve yükle MongoDB on Windows

Adım 5) Hizmet Yapılandırması

  1. Select “Run service as Network Service user”. Make a note of the data directory; we will need this later.
  2. Sonrakine tıkla.

Indirin ve yükle MongoDB on Windows

Adım 6) Kurulum işlemini başlatın

Kurulumu başlatmak için Install butonuna tıklayın.

Indirin ve yükle MongoDB on Windows

Step 7) Click Next once completed

Installation begins. Click Next once completed.

Indirin ve yükle MongoDB on Windows

Adım 8) Bitir butonuna tıklayın

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

Indirin ve yükle MongoDB on Windows

Merhaba Dünya MongoDB: JavaKomut Dosyası Sürücüsü

Sürücüler MongoDB are used for connectivity between client applications and the database. For example, if you had a Java programa bağlanmak için gerekliydi MongoDB, then you would require to download and integrate the Java Programın çalışabilmesi için sürücü MongoDB veri tabanı.

için sürücü JavaSenaryo kutudan çıkar. MongoDB shell which is used to work with the MongoDB veritabanı aslında bir JavaScript shell. To access it:

) 1 Adım Go to “C:\Program Files\MongoDB\Server\4.0\bin” ve mongo.exe dosyasına çift tıklayın. Alternatif olarak, ayrıca MongoDB desktop item.

Merhaba Dünya MongoDB: JavaKomut Dosyası Sürücüsü

) 2 Adım Enter the following program into the shell:

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

Merhaba Dünya MongoDB: JavaKomut Dosyası Sürücüsü

Code Açıklama:

  1. Biz sadece basit bir açıklama yapıyoruz JavaScript variable to store a string called ‘Hello World’.
  2. Değişkeni ekrana yazdırmak için printjson yöntemini kullanıyoruz.

kurmak Python Sürücü

) 1 Adım Sağlamak Python is installed on the system.

) 2 Adım Install the mongo related drivers by issuing the below command:

pip install pymongo

Ruby Sürücüsünü Yükle

) 1 Adım Ensure Ruby is installed on the system.

) 2 Adım Ensure gems is updated by issuing the command:

gem update --system

) 3 Adım Install the mongo related drivers by issuing the below command:

gem install mongo

kurmak MongoDB Compass - MongoDB Yönetim aracı

Piyasada yönetmek için kullanılabilecek araçlar var MongoDB. Ticari olmayan bu araçlardan biri MongoDB Compass. Some of the features of Compass are given below:

  1. Full power of the Mongo shell
  2. Çoklu kabuklar
  3. Çoklu sonuçlar

) 1 Adım Git Link ve indir'i tıklayın.

kurmak MongoDB Compass

) 2 Adım Enter details in the popup and click submit.

kurmak MongoDB Compass

) 3 Adım Double click on the downloaded file.

kurmak MongoDB Compass

) 4 Adım Installation will auto-start.

kurmak MongoDB Compass

) 5 Adım Compass will launch with a Welcome screen.

kurmak MongoDB Compass

) 6 Adım Keep the privacy settings as default and click “Start Using Compass”.

kurmak MongoDB Compass

) 7 Adım You will see the home screen with a list of current databases.

kurmak MongoDB Compass

MongoDB Yapılandırma, İçe Aktarma ve Dışa Aktarma

Başlamadan önce MongoDB sunucusunda ilk önemli husus, tüm sunucuların bulunduğu veri dizinini yapılandırmaktır. MongoDB data will be stored. This can be done in the following way:

MongoDB Yapılandırma, İçe Aktarma ve Dışa Aktarma

Yukarıdaki 'md \data\db' komutu, geçerli konumunuzda \data\db adında bir dizin oluşturur. MongoDB veritabanlarını otomatik olarak bu konumda oluşturacaktır, çünkü burası varsayılan konumdur. MongoDB bilgilerini saklamak için. Biz sadece dizinin mevcut olduğundan emin oluyoruz, böylece MongoDB başladığında bulabilirsiniz.

Verilerin içe aktarılması MongoDB "mongoimport" komutu kullanılarak yapılır. Aşağıdaki örnek bunun nasıl yapılabileceğini gösterir.

) 1 Adım 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 Adım Issue the mongoimport command.

MongoDB Yapılandırma, İçe Aktarma ve Dışa Aktarma

Code Açıklama:

  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.

Çıktı

MongoDB Yapılandırma, İçe Aktarma ve Dışa Aktarma

Çıktı açıkça 3 belgenin içe aktarıldığını gösteriyor MongoDB.

İhracat MongoDB is done by using the mongoexport command.

MongoDB Yapılandırma, İçe Aktarma ve Dışa Aktarma

Code Açıklama:

  1. Verilerin hangi veritabanından aktarılması gerektiğini söylemek için db seçeneğini belirtiyoruz.
  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. Dördüncüsü, koleksiyonun hangi alanlarının dışa aktarılması gerektiğini belirtmektir.
  5. –out seçeneği, verilerin dışa aktarılacağı csv dosyasının adını belirtir.

Çıktı

MongoDB Yapılandırma, İçe Aktarma ve Dışa Aktarma

Çıktı açıkça 3 kaydın dışa aktarıldığını gösteriyor MongoDB.

yapılandırma MongoDB yapılandırma dosyası içeren sunucu

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 Adım Create a file called “mongod.conf” and store the below information in the file.

yapılandırma MongoDB Yapılandırma Dosyasına Sahip Sunucu

  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. İkinci seçenek ise konumun bir dosya olacağını belirtmektir.
  3. This mentions the location of the log file.
  4. logAppend: “true”, günlük bilgilerinin günlük dosyasına eklenmeye devam etmesini sağlamak anlamına gelir. Değeri “yanlış” olarak belirlerseniz, sunucu yeniden başlatıldığında dosya silinir ve yeni oluşturulur.

) 2 Adım 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.

yapılandırma MongoDB Yapılandırma Dosyasına Sahip Sunucu

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.

yapılandırma MongoDB Yapılandırma Dosyasına Sahip Sunucu

Nasıl Kurulur MongoDB Bulut üzerinde (AWS, Google, Azure)

You do not need to install the MongoDB server and configure it. You can deploy a MongoDB AWS gibi platformlarda bulutta yer alan Atlas sunucusu, Google Cloud, ve Azure, and connect to the instance using a client. Below are the detailed steps:

) 1 Adım Git Link.

  1. Kişisel Ayrıntıları Girin
  2. koşulları kabul ediyor musunuz
  3. Click the button “Get Started Free”

kurmak MongoDB Bulutta

) 2 Adım Click “Build my first cluster”.

kurmak MongoDB Bulutta

) 3 Adım Arasında seçim yapabilirsiniz AWS, Google Cloud, ve 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 anlayışının sonucu olarak, buzdolabında iki üç günden fazla durmayan küçük şişeler elinizin altında bulunur.

kurmak MongoDB Bulutta

) 4 Adım Cluster creation takes some time.

kurmak MongoDB Bulutta

) 5 Adım After some time you will see the cluster ready.

kurmak MongoDB Bulutta

) 6 Adım Click Security > Add new user.

kurmak MongoDB Bulutta

) 7 Adım Sonraki ekranda:

  1. Kullanıcı kimlik bilgilerini girin
  2. Ayrıcalıklar atayın
  3. Kullanıcı Ekle düğmesini tıklayın

kurmak MongoDB Bulutta

) 8 Adım In the dashboard, click the connect button.

  1. IP bağlantınızı beyaz listeye alın
  2. Bağlantı yöntemini seçin

kurmak MongoDB Bulutta

) 9 Adım Select the connection method of your choice to connect to the MongoDB sunucusu.

kurmak MongoDB Bulutta

SSS

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.

Evet. 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.

Evet. MongoDB Community Server is free and open source for Windows, macOSve Linux. 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, Google Cloudya da Azure.

Bu yazıyı şu şekilde özetleyin: