8/21/2019 Mongodb Version Command
To know the MongoDB version, you can also run db.version command in Mongo Shell. Make sure the name of the extracted folder is mongodb-win32-i386-version or mongodb-win32-x8664-version. Here version is the version of MongoDB download. Next, open the command prompt and run the following command.
Hello Everyone, In this article I will show step by step process of how to install MongoDB on windows environment.
Step 1 - First determine which MongoDB build you need:
MongoDB for Windows 64-bit - 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 32-bit - runs on any 32-bit version of Windows newer than Windows Vista. 32-bit versions of MongoDB are only intended for older systems and for use in testing and development systems.
Note - I will not recommend Windows 32 bit versions of MongoDB for production because it only support databases smaller than 2GB.
If you do not know which version of Windows you are running, Please go to your Powershell or command Prompt (cmd) and run following commands:
wmic os get caption
wmic os get osarchitecture
Step 2 - After Determining the windows version of your machine its time to download the MongoDB msi file from MongoDB website :
1. Click here to go to the official MongoDB website and click on 'Download MongoDB' button.
2. Select the Windows tab from OS Options and download the MSI file. In this tutorial we will be downloading msi file for 64 Bit version.
Step 3 - Now install and run MongoDB on Windows, Below are the steps for that:
Run MSI File:
Accept the terms and condition:
Choose Setup Type as 'Complete' :
After the setup has been finished, you can check in you C:Program Files A MongoDb folder must have been created.
Step 4 : Set up the MongoDB environment.
MongoDB requires a data directory to store all data. MongoDB’s default data directory path is datadb.
To configure this go to your C: drive and create datadb folder ('db' folder inside 'data' folder)
So Now full path of db folder will be - C:datadb
Now go to your system's environment variables and give MongoDB bin directory's path (C:Program FilesMongoDBServer3.0bin) in the 'path' variable.
All configurations have been done , Now to go to your cmd prompt and type mongod:
KUDOS!! Your mongodb server has been started on port - 27017
Now open another cmd prompt and type mongo:
This shows that you have been connected with mongodb server with the database named as 'test'.
Reference - http://www.thejavabook.com/2015/08/installmongodb/
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |