edoceo

Installing and Configuring CouchDB

Installation

CouchDB is crazy easy to install. On Gentoo Linux the package flags should like like these (at least). Adjust flags as necessary for your environment.

[ebuild  N     ] dev-lang/spidermonkey-1.8.2.15  USE="-threadsafe" 50,345 kB
[ebuild  N     ] dev-lang/erlang-13.2.4  USE="-doc -emacs -hipe -java -kpoll -odbc -sctp smp ssl -tk -wxwidgets" 58,686 kB
[ebuild  N     ] dev-db/couchdb-1.0.2  USE="-test" 1,008 kB

Or use the unstable (which is hella-rad!)

~ # ACCEPT_KEYWORDS="~amd64" emerge -av couchdb
[ebuild     U ] dev-db/couchdb-1.2.0 USE="-test" 1,046 kB

Configuration

The configuration is stored in /etc/couchdb. Get into that directory and edit the files as necessary. We make the following changes to /etc/couchdb/local.ini

[httpd]
bind_address = 0.0.0.0

[admins]
root = root
$username = $password

It is perfectly acceptable to put the password here in plain-text, CouchDB will mangle it into a hash-sum when it's running. Which also means this file should be writeable by the couchdb user.

~ # stat -c '%A %U:%G %n' /etc/couchdb/local.ini
-rw-rw---- root:couchdb /etc/couchdb/local.ini

Running

~ # /etc/init.d/couchdb start
~ # eselect rc add couchdb default

Futon Administration

Using your favourite web-browser vist http://your.server:5984/_utils/

CouchDB Administration Interface

From this panel you will be able to create a database, configure users and all that good stuff.

Notice the message in the lower-right about everyone being an Admin. That is not good, fix that immediately.

Loading Comments from Disqus...