I’ve recently set-up CouchDB on the Ubuntu 8.10 (Intrepid Ibex) virtual machine I use for development. This was a relatively pain-free experience and I thought I’d outline what I did here for the benefit of others (and my future self).
Firstly, I decided to install using the aptitude package, rather than from source. If you’re interested in building the most recent version, I’d recommend taking a look at Isofarro’s handy “Installing CouchDB on JeOS 8.04” post.
To begin, install the package:
$ sudo apt-get install couchdb
Once the package has downloaded and installed, you should check the status to see if it’s running correctly:
$ sudo /etc/init.d/couchdb status
If you see the following output, then CouchDB is running successfully:
Apache CouchDB is running as process 32651. Time to relax.
If you don’t see that output, try starting CouchDB manually. I needed to do this:
$ sudo /etc/init.d/couchdb start
And then check the status again:
$ sudo /etc/init.d/couchdb status Apache CouchDB is running as process 32651. Time to relax.
If you’re still not getting the correct status, you’ll need to refer to the CouchDB documentation.
Next, you should check that you can access CouchDB over HTTP on the default port of 5984. To do that, I used curl:
$ curl http://localhost:5984/
Which should return the following response:
The final step, to make sure you can access CouchDB externally to your dev VM, is to make sure the CouchDB configuration isn’t bound to the loopback address (127.0.0.1) – which it is by default. To do that, you’ll need to edit the couch.ini file:
$ sudo vim /etc/couchdb/couch.ini
And comment out the following line:
You can also change the port that CouchDB is running on in this configuration file if you so desire.
Finally, you’ll need to restart CouchDB:
$ sudo /etc/init.d/couchdb stop $ sudo /etc/init.d/couchdb start
Now you should be able to log into Futon, the browser-based CouchDB admin system, on the following address: