MongoDB Database Quick Getting-Started

The Tip Show How-to Move the First Step with the MongoDB Database on Linux and Unix.

  1. Open a Terminal Window
  2. Check if /data/db Directory is There:
    ls /data

    If Not There then:

    sudo mkdir -p /data/db
    sudo chmod g+w /data/db
  3. Launch MongoDB Server Daemon
    sudo mongod
  4. Open theLaunch the MongoDB Shell:
    mongo shell
  5. Inserting a Testing Data:
    > {a: 1} )
  6. Retrieving Data:
    > db.test.find()