Установить базу данных MongoDB в Windows
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.
![](https://s1.o7planning.com/web-rs/web-image/ru/arf-1024649-vi.webp)
2. Download
Заметка: MongoDB имеет 2 версии, Community Server и Enterprice Server. При этом Community бесплатная версия, а Enterprice платная версия, нужно заплатить для использования.В данной статье я покажу вам установку и настройку бесплатной версии.
Вы можете скачать файл установки в формате (msi или zip), если вы скачиваете формат zip, то нужно извлечь сжаты файл без установок, после это поправляете настройки.
![](https://s1.o7planning.com/web-rs/web-image/ru/arf-1024666-vi.webp)
Результат скачивания:
![](https://s1.o7planning.com/web-rs/web-image/ru/arf-1024672-vi.webp)
3. Установка
![](https://s1.o7planning.com/web-rs/web-image/ru/arf-1024681-vi.webp)
Select a folder to install MongoDB:
![](https://s1.o7planning.com/web-rs/web-image/ru/arf-1024687-vi.webp)
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\
![](https://s1.o7planning.com/web-rs/web-image/ru/arf-1024695-vi.webp)
Выбрать установку Mongo Compass, это визуальный инструмент помогающий вам работать с MongoDB.
![](https://s1.o7planning.com/web-rs/web-image/ru/arf-1024701-vi.webp)
![](https://s1.o7planning.com/web-rs/web-image/ru/arf-1024702-vi.webp)
OK, bạn vừa cài đặt xong MongoDB và Mongo Compass.
The MongoDB Compass welcome window displays to introduce you to its basic features.
![](https://s1.o7planning.com/web-rs/web-image/ru/arf-1024709-vi.webp)
![](https://s1.o7planning.com/web-rs/web-image/ru/arf-1024710-vi.webp)
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:
![](https://s1.o7planning.com/web-rs/web-image/ru/arf-1024727-vi.webp)
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:
![](https://s1.o7planning.com/web-rs/web-image/ru/arf-1024739-vi.webp)