is a #NoSQL, open-source and document database designed for ease of development and scaling. It uses documents instead of records, and it is recommended for systems which generate large amount of data (in Big Data scope).
MongoDB is available for all platforms and operative systems. Intallation is explained here. We are going to focus on the Windows OS installation and configuration with some “extra” features.
1. Download the .msi installer (according to your Windows version) from here.
2. Choose “Custom Installation” to install mongodb in C:\mongodb folder.
1. Open a terminal and create these folders to save several mongo files
- C:\mongodb\data (
- C:\mongodb\db (
- C:\mongodb\log (
2. Create a configuration file (mongo.config) in the root folder with this information:
bind_ip = 127.0.0.1
port = 27017
(Create “\db” and “\log” folders in “mongodb\data” if was necessary)
3. Start and test mongodb (
4. Connect to mongo. Open a new terminal as administrator and execute mongo command (
Install MongoDB as a windows service:
1. Run command
>sc create MongoDB binpath="\ "C:\mongodb\bin\mongod.exe" --service --config=\"C:\mongodb\mongo.config"" DisplayName="Mongo Standard"
If services was successfully created, the following log message appears at the prompt (
>[SC] CreateService SUCCESS)
Also, you can start and stop the service from the command line with these commands:
>net start MongoDB
>net stop MongoDB
To remove MongoDB service, run the command
>sc delete MongoDB.