Tuesday, March 12, 2013

Installting mongodb in linux mint 14 xcfe

i install mongodb from the software manager

then i open a terminal and type:

sudo /etc/init.d/mongodb start   the press enter

the following was shown in the terminal and now the mongodb is running

Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mongodb start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start mongodb
mongodb start/running, process 4374


 to use mongo just type mongo and press enter

MongoDB shell version: 2.0.6
connecting to: test


 db.test.save( { a: 1 } )

to insert a record to test



to show records

 { "_id" : ObjectId("513e937a047033e043665ef8"), "a" : 1 }

to stop mongodb

 sudo /etc/init.d/mongodb stop

to restart mongodb

 sudo /etc/init.d/mongodb restart

ref: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian/

No comments: