betacode

Установить базу данных MongoDB в Windows

Сайт бесплатного изучения языков:
Следуйте за нами на нашей фан-странице, чтобы получать уведомления каждый раз, когда появляются новые статьи. Facebook

1- Некоторые замечания о версиях

MongoDB for Windows Server 2008 R2 Edition (i.e. 2008R2) runs only on Windows Server 2008 R2, Windows 7 64-bit, and newer versions of Windows. This build takes advantage of recent enhancements to the Windows Platform and cannot operate on older versions of Windows.
MongoDB for Windows 64-bit runs on any 64-bit version of Windows newer than Windows XP, including Windows Server 2008 R2 and Windows 7 64-bit.
MongoDB for Windows 32-bit runs on any 32-bit version of Windows newer than Windows XP. 32-bit versions of MongoDB are only intended for older systems and for use in testing and development systems. 32-bit versions of MongoDB only support databases smaller than 2GB.

2- Download

Заметка: MongoDB имеет 2 версии, Community Server и Enterprice Server. При этом Community бесплатная версия, а Enterprice платная версия, нужно заплатить для использования.В данной статье я покажу вам установку и настройку бесплатной версии.
Вы можете скачать файл установки в формате (msi или zip), если вы скачиваете формат zip, то нужно извлечь сжаты файл без установок, после это поправляете настройки. 
Результат скачивания:

3- Установка

Select a folder to install MongoDB:
Next, choose a folder to store data and logs for MongoDB, these are important data so you should put them in a safe folder, for example:
  • D:\MongoDBData\Server\5.0\data\
  • D:\MongoDBData\Server\5.0\log\
Выбрать установку Mongo Compass, это визуальный инструмент помогающий вам работать с MongoDB.
OK, bạn vừa cài đặt xong MongoDBMongo Compass.
The MongoDB Compass welcome window displays to introduce you to its basic features.
Restart your computer to complete the installation.

4- Bắt đầu với MongoDB

As mentioned above MongoDB Compass is a visual tool for you to work with MongoDB. Here's what the tool looks like when you run it for the first time:
This tool allows you to enter a "Connection String" to connect to a certain database on the network or leave it blank if you want to connect to the newly installed MongoDB on your computer.
After connecting to a certain database you will see an interface like this: