CouchDB http://couchdb.apache.org Installed CouchDB on Oct 10, 2014. @apt-get install couchdb@ It installed version 1.0.1. Version 1.6.1 is available. hr. https://launchpad.net/~couchdb/+archive/ubuntu/stable bc. # install the ppa-finding tool # for 12.04 release sudo apt-get install python-software-properties -y bc. # for 14.04 release sudo apt-get install software-properties-common -y bc. # add the ppa sudo add-apt-repository ppa:couchdb/stable -y bc. # update cached list of packages sudo apt-get update -y bc. # remove any existing couchdb binaries sudo apt-get remove couchdb couchdb-bin couchdb-common -yf bc. # see my shiny goodness - note the version number displayed and ensure its what you expect sudo apt-get -f install sudo apt-get install -V couchdb bc. # manage via upstart sudo stop couchdb couchdb stop/waiting bc. # update /etc/couchdb/local.ini with 'bind_address=0.0.0.0' as needed sudo start couchdb couchdb start/running, process 17422 bc. # check version couchdb -V couchdb - Apache CouchDB 1.6.1 Good. Up to date. Oct 10, 2014 old post: http://blog.woobling.org/2009/05/why-i-dont-use-couchdb.html h2. Perl http://search.cpan.org/dist/CouchDB-Client/lib/CouchDB/Client.pm The above main module is outdated or oldish, 2009. http://cpanratings.perl.org/dist/CouchDB-Client bq. _"Generally, when I have a choice I prefer AnyEvent::CouchDB."_ http://search.cpan.org/~beppu/AnyEvent-CouchDB- 1.31/lib/AnyEvent/CouchDB.pm - (2011) @perl -MCPAN -e 'install CouchDB::Client'@ Installed above Perl module on Oct 10, 2014. It took under one minute to install, unlike the nearly 10 minutes to complete the install of the MongoDB Perl client module. h2. Commands http://wiki.apache.org/couchdb/Complete_HTTP_API_Reference CouchDB is API, HTTP, REST, JSON, and JavaScript driven. in the file @/etc/couchdb/local.ini@ set and uncomment the lines: @port=5984@ @bind_address=127.0.0.1@ http://en.wikipedia.org/wiki/CouchDB h3. Accessing server information curl http://127.0.0.1:5984/ Reponse: @{"couchdb":"Welcome","uuid":"2c6d440df9b206a8592c4f5db6f4e38a","version":"1.6.1","vendor":{"name":"Ubuntu","version":"12.04"}}@ h3. Creating a database Creating a database named wiki curl -X PUT http://127.0.0.1:5984/wiki Response: @{"ok": true}@ br. Attempting to create a second database named wiki curl -X PUT http://127.0.0.1:5984/wiki Response: @{"error":"file_exists", "reason":"The database could not be created, the file already exists."}@ h3. Get database info Retrieve information about the wiki database curl http://127.0.0.1:5984/wiki @{"db_name":"wiki","doc_count":0,"doc_del_count":0,"update_seq":0,"purge_seq":0,"compact_running":false,"disk_size":79,"data_size":0,"instance_start_time":"1412965274017838","disk_format_version":6,"committed_update_seq":0}@ h3. Create a document Create a document, asking CouchDB to supply a document id curl -X POST -H "Content-Type: application/json" --data @'{ "text" : "Wikipedia on CouchDB", "rating": 5 }'@ http://127.0.0.1:5984/wiki Response @{"ok":true,"id":"eadaefc9769de77b098009cfae000ef6","rev":"1-80fd6f7aeb55c83c8999b4613843af5d"}@ h3. Retrieve a document curl http://127.0.0.1:5984/wiki/eadaefc9769de77b098009cfae000ef6 Response @{"_id":"eadaefc9769de77b098009cfae000ef6","_rev":"1-80fd6f7aeb55c83c8999b4613843af5d","text":"Wikipedia on CouchDB","rating":5}@ #database - #nosql - #json