Mongodb
Running MongoDB
First you need run Mongo server.
Before run server please check all server options
mongod –h
Run Server
mongod --port 7483 --bind_ip 79.133.201.91 --dbpath /homex2/username/mongo &
// output
[1] 79376
username(at)shellmix ~/mongo> Sun Jan 1 12:18:41 [initandlisten] MongoDB starting : pid=79376 port=7483 dbpath=/homex2/username/mongo 64-bit
Sun Jan 1 12:18:41 [initandlisten] db version v1.8.3, pdfile version 4.5
Sun Jan 1 12:18:41 [initandlisten] git version: nogitversion
Sun Jan 1 12:18:41 [initandlisten] build sys info: FreeBSD shellmix.com 8.2-RELEASE-p4 FreeBSD 8.2-RELEASE-p4 #2: Sun Oct 30 19:07:22 UTC 2011 This e-mail address is being protected from spambots. You need JavaScript enabled to view it :/usr/src/sys/amd64/compile/jajo amd64 BOOST_LIB_VERSION=1_45
Sun Jan 1 12:18:41 [initandlisten] *** warning: spider monkey build without utf8 support. consider rebuilding with utf8 support
Sun Jan 1 12:18:41 [initandlisten] waiting for connections on port 7483
Sun Jan 1 12:18:41 [websvr] web admin interface listening on port 8483
Server is working on port 7483
Web admin is working on port 8483 http://79.133.201.91:8483/
Getting A Database Connection
Shell# mongo --port 7483 --host 79.133.201.91
> use mydb
switched to db mydb
Inserting Data into A Collection
> j = { name : "mongo" };
{"name" : "mongo"}
> t = { x : 3 };
{ "x" : 3 }
> db.things.save(j);
> db.things.save(t);
> db.things.find();
{ "_id" : ObjectId("4c2209f9f3924d31102bd84a"), "name" : "mongo" }
{ "_id" : ObjectId("4c2209fef3924d31102bd84b"), "x" : 3 }
>
More info : http://www.mongodb.org/display/DOCS/Tutorial


Tutorials 