noSQL Databases and mongoDB installation/quickstart
noSQL, mongoDB Yorum yapılmadı »noSQL term first introduced by Carlo Strozzi in 1998. It was basically key/value storage system. Concept was old but sharding capabilities were promising. There were a few companies emerged. Google started to develop BigTable in 2004. Amazon, twitter, facebook and some others started to develop and use their noSQL variants as well. Today a lot of companies using that kind of databases.
I would like to add cap diagram below. It’s not related to my post but it’s very useful to see the difference between noSQL databases.

I have used Redis, CouchDB and mongoDB. They are all powerful and great key/value stores. But i guess mongoDB is one step ahead with its sharding, bson, mapreduce and query abilities. Today i would like to tell you about renowned mongoDB’s installation to debian/ubuntu systems. Actually it will be quickstart to mongoDB.
- You can download latest version from http://www.mongodb.org/downloads and use as is.
- Or you can install it the aptitude way.
$ sudo vi /etc/apt/sources.listdeb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen # Append this line to sources.list if you upstart
deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen # Append this line to sources.list if you have SysV init scripts- Save file and exit.
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10$ sudo apt-get update$ sudo apt-get install mongodb-10gen
I’ll be telling aptitude way in my post. Basically you should open sources list of aptitude, add mongodb source, make it trusted source, update aptitude and install mongodb. To do that follow steps below:
further reading can be found at http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages
You can check your server status from http://localhost:28017 anytime. Do not open the network port to outside. If you want to use commands feature you need to enable rest option. To do that:
$ sudo vi /etc/mongodb.conf
rest=true # will be added
$ sudo service mongodb restart
When you have finished with the installation without any problem you should see
mongodb start/running, process ...
Then you can use commands below to get more information about usage. And also check out the mongoDB pages at http://www.mongodb.org/display/DOCS/Introduction
$ mongostat # realtime statistics
$ mongod --version # version information
$ mongo # mongoDB shell utility. Use -u username -p password for auth
> help # general help
> show dbs # show databases
...
> use mydb # use mydb database
> show collections # show collections
...
> db.help() # database command help
Have great days with mongoDB…



Son Yorumlar