Difference between revisions of "MongoDB"

From ArchWiki
Jump to: navigation, search
(First version of mongodb page)
 
(Amended description)
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=MongoDB=
+
[[Category:Database management systems]]
 
+
MongoDB (from hu'''mongo'''us) is an open source document-oriented database system developed and supported by [http://www.10gen.com/ 10gen]. It is part of the NoSQL family of database systems. Instead of storing data in tables as is done in a "classical" relational database, MongoDB stores structured data as JSON-like documents with dynamic schemas (MongoDB calls the format BSON), making the integration of data in certain types of applications easier and faster.
MongoDB (from "humongous") is a scalable, high-performance, open source NoSQL database.
+
  
 
==Installing MongoDB==
 
==Installing MongoDB==
Line 10: Line 9:
 
(Optional) Add MongoDB to the list of daemons that start on system startup
 
(Optional) Add MongoDB to the list of daemons that start on system startup
 
  # systemctl enable mongodb
 
  # systemctl enable mongodb
 
  
 
==Access the database shell==
 
==Access the database shell==
 
To access the Database shell you have type in your terminal
 
To access the Database shell you have type in your terminal
 
  # mongo
 
  # mongo
 
  
 
==Troubleshooting==
 
==Troubleshooting==
Line 26: Line 23:
 
If still problems are there please check with the repair parameter (/var/lib/mongodb/ is the default --dbpath from Arch Linux)
 
If still problems are there please check with the repair parameter (/var/lib/mongodb/ is the default --dbpath from Arch Linux)
 
  # mongod --dbpath /var/lib/mongodb/ --repair
 
  # mongod --dbpath /var/lib/mongodb/ --repair
 +
 +
Sometimes it can happen that you can't start mongodb if the user and group policy wrong. You can check it with ls -al
 +
 +
# cd /var/log/mongod
 +
# sudo chown -R mongodb:mongodb .
 +
# cd /var/lib/mongodb
 +
# sudo chown -R mongodb:mongodb .

Revision as of 02:29, 1 April 2013

MongoDB (from humongous) is an open source document-oriented database system developed and supported by 10gen. It is part of the NoSQL family of database systems. Instead of storing data in tables as is done in a "classical" relational database, MongoDB stores structured data as JSON-like documents with dynamic schemas (MongoDB calls the format BSON), making the integration of data in certain types of applications easier and faster.

Installing MongoDB

Install mongodb

# pacman -S mongodb

Start MongoDB

# systemctl start mongodb

(Optional) Add MongoDB to the list of daemons that start on system startup

# systemctl enable mongodb

Access the database shell

To access the Database shell you have type in your terminal

# mongo

Troubleshooting

MongoDB won't more to start

Check for the lock file

# ls  -lisa /var/lib/mongodb

If the are there stop the mongodb daemon delete the file after it star the daemon again

# rm /var/lib/mongodb/mongod.lock

If still problems are there please check with the repair parameter (/var/lib/mongodb/ is the default --dbpath from Arch Linux)

# mongod --dbpath /var/lib/mongodb/ --repair

Sometimes it can happen that you can't start mongodb if the user and group policy wrong. You can check it with ls -al

# cd /var/log/mongod
# sudo chown -R mongodb:mongodb .
# cd /var/lib/mongodb
# sudo chown -R mongodb:mongodb .