MongoDB Installation steps on Windows 7

MongoDB is that the fast and extremely ascendable information that accepts RDBMS systems which offer structured schema and dominant queries. MongoDB is extremely motivating info, as a result of it\’s extremely tremendous options like quick, in-place update, auto shading for cloud level quantifiability etc.

Installation guide has prepared for following platform and services

OS             : Windows 7 professional 32bit
Database  : MongoDB

Let us see the steps:

Step 1 : Download  mongodb
Step 2 :  Install and configure MongoDB
Step 3 :  Install mongodb as service

Let us see the steps in Details:

Step 1 : Download  mongodb

Mongodb for windows or Linux (32bit / 64bit) from following location

http://www.mongodb.org/downloads

1.1  In this guide we are going to install mongodb 2.4.9 for windows 7 32bit, download mongodb for windows from below download Location

http://fastdl.mongodb.org/win32/mongodb-win32-i386-2.4.9.zip

1.2  Move mongodb-win32-i386-2.4.9. zip file from default download location  to c:\

1.3  Extract the compressed source file on the same location i.e. on c:\

1.4  Rename the long folder name to shorter one mongodb-win32-i386-2.4.9 to mongodb

1.5  Create the data directory under c:\mongodb\data\db

From the command prompt execute  below command

c:\mongodb\bin\mongod.exe –dbpath c:\mongodb\data\db

Note: –dbpath option to specify an alternate path for database files

Invoke another cmd command window to establish connection to database terminal shell

c:\mongodb\bin\mongo.exe

>show databases;

Step 2: Install and configure MongoDB

2.1  Set the context to exported by using below command

use expertdb

2.2  Insert the site and owner name doc’s in a testingdata collection using below commands

a = {site  : “demo.com”}

b = {owner : “TMS”}

db.testingdata.insert( a )
db.testingdata.insert( b )

show collections

Verify the docs exist in testingdata by executing below command

db.testingdata.find(a)

db.testingdata.find(b)

Step3 : Install and Run the MongoDB as  Service

3.1  Open cmd terminal as administrator privillege and create folder “log”  under c:\mongodb

c:\mongodb>md log

3.2  Create  mongod configuratio file under c:\mongodb and add below lines.

edit mongod.cfg

logpath=c:\mongodb\log\mongo.log

dbpath=C:\mongodb\data\db

bind_ip = 192.168.0.101

port = 27017

Save & Exit.

3.3  Install mongodb as service

C:\mongodb\bin\mongod.exe –config C:\mongodb\mongod.cfg –install

3.4  Start / stop mongodb service using net command line utility

To start mongodb service use command :

net start MongoDB

To stop  mongodb service use command :

net stop MongoDB

3.5  Invoke another cmd command window to establish connection to database terminal shell

c:\mongodb\bin\mongo.exe

show dbs;

To remove mongodb service use below command

C:\mongodb\bin\mongod.exe –remove

For more Detail you can watch Video:

Both comments and pings are currently closed.

Comments are closed.

Copyright ©Solutions@Experts.com
Copyright © NewWpThemes Techmark Solutions - www.techmarksolutions.co.uk