Installation Of MongoDB:
Download MongoDB from official site. here is the link:
Download MongoDB for Windows
As Java and .NET requires work space for the projects. MongoDB requires a Folder for backup.
create a folder "data".In "data" folder create another folder named "db".
create these folders in the folder where MongoDB. if created in any other location, then it should be set by the dbpath settings.
1. creating the folders by command prompt:
c:\ > md data -- creating the folder/directory named "data"
c:\>cd data -- changing the directory to the data
c:\data>md db-- creating db folder in data folder
c:\data>cd db-- changing the db
c:\data\db> -- db folder in data folder....
2. Now go to the bin folder of the "MongoDB" where "mongod.exe" is present. copy the path and paste it in the command prompt .
Ex: c:\MongoDB\bin\mongod.exe
then type the following command to specify the directory to the MongoDB.
c:\MongoDB\bin\mongod.exe --dbpath c:\data
now your directory is ready.
we need two instances of command prompt to run for server and other for database.
3. first run the mongod.exe which starts the server. it should not be closed till you are using database instance
4. second in another command prompt run mongo.exe.
c:\mongobd\bin\mongod.exe in first command prompt.
c:\mongodb\bin\mongo.exe in second command prompt.
Download MongoDB from official site. here is the link:
Download MongoDB for Windows
As Java and .NET requires work space for the projects. MongoDB requires a Folder for backup.
create a folder "data".In "data" folder create another folder named "db".
create these folders in the folder where MongoDB. if created in any other location, then it should be set by the dbpath settings.
1. creating the folders by command prompt:
c:\ > md data -- creating the folder/directory named "data"
c:\>cd data -- changing the directory to the data
c:\data>md db-- creating db folder in data folder
c:\data>cd db-- changing the db
c:\data\db> -- db folder in data folder....
2. Now go to the bin folder of the "MongoDB" where "mongod.exe" is present. copy the path and paste it in the command prompt .
Ex: c:\MongoDB\bin\mongod.exe
then type the following command to specify the directory to the MongoDB.
c:\MongoDB\bin\mongod.exe --dbpath c:\data
now your directory is ready.
we need two instances of command prompt to run for server and other for database.
3. first run the mongod.exe which starts the server. it should not be closed till you are using database instance
4. second in another command prompt run mongo.exe.
c:\mongobd\bin\mongod.exe in first command prompt.
c:\mongodb\bin\mongo.exe in second command prompt.
No comments:
Post a Comment