Quickstart

Iniziare con MongoDB è facile.  Per una lunga descrizione, guardate Getting Started . Le seguenti istruzioni fanno l'assunzione di una moderna distribuzione *NIX.

Setup

OS X 32-bit

# make default directory for data
$ mkdir -p /data/db

# using curl, get the pre-built distro
$ curl -O http://downloads.mongodb.org/osx/mongodb-osx-i386-latest.tgz

# unpack
$ tar xzf mongodb-osx-i386-latest.tgz

OS X 64-bit

# make default directory for data
$ mkdir -p /data/db

# using curl, get the pre-built distro
$ curl -O http://downloads.mongodb.org/osx/mongodb-osx-x86_64-latest.tgz

# unpack
$ tar xzf mongodb-osx-x86_64-latest.tgz

Linux 32-bit

# make default directory for data
$ mkdir -p /data/db

# using curl, get the pre-built distro
$ curl -O http://downloads.mongodb.org/linux/mongodb-linux-i686-latest.tgz

# unpack
$ tar xzf mongodb-linux-i686-latest.tgz

Linux 64-bit

 # make default directory for data
$ mkdir -p /data/db

# using curl, get the pre-built distro
$ curl -O http://downloads.mongodb.org/linux/mongodb-linux-x86_64-latest.tgz

# unpack
$ tar xzf mongodb-linux-x86_64-latest.tgz

Assicurarsi che funzioni tutto

 # run the database in the background - better would be to run in a separate terminal window if testing
./mongodb-xxxxxxx/bin/mongod &
# run the mongo shell.  by default it connects to localhost:
./mongodb-xxxxxxx/bin/mongo
 > db.foo.save( { a : 1 } )
 > db.foo.findOne()

Per ulteriori informazioni sulla shell, guardate la shell reference guide

To get started in your language, check out a driver tutorial.

Vedi anche


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

IF YOU HAVE A QUESTION, POST IT TO THE USER GROUP.

These pages are fine for comments, but for questions, your best bet will always be the MongoDB User Group.

blog comments powered by Disqus