Installing CouchDB 0.8.0 on Ubuntu 8.04
[CouchDB](http://incubator.apache.org/couchdb/) is a distributed document store that you interact with over HTTP. The CouchDB site has a [more detailed introduction](http://incubator.apache.org/couchdb/docs/intro.html) if you want the full picture.
## Some assembly required
Since CouchDB is still a fairly young project, there are no pre-built packages for Ubuntu 8.04. Word on the street is that Intrepid Ibex will ship one, but until then, here's a quick-and-dirty way to get it running from source.
```bash
sudo apt-get install automake autoconf libtool subversion-tools help2man
sudo apt-get install build-essential erlang libicu38 libicu-dev
sudo apt-get install libreadline5-dev checkinstall libmozjs-dev wget
wget http://mirror.public-internet.co.uk/ftp/apache/incubator/couchdb/0.8.0-incubating/apache-couchdb-0.8.0-incubating.tar.gz
tar -xzvf apache-couchdb-0.8.0-incubating.tar.gz
cd apache-couchdb-0.8.0-incubating
./configure
make && sudo make install
sudo adduser couchdb
sudo mkdir -p /usr/local/var/lib/couchdb
sudo chown -R couchdb /usr/local/var/lib/couchdb
sudo mkdir -p /usr/local/var/log/couchdb
sudo chown -R couchdb /usr/local/var/log/couchdb
sudo mkdir -p /usr/local/var/run
sudo chown -R couchdb /usr/local/var/run
sudo update-rc.d couchdb defaults
sudo cp /usr/local/etc/init.d/couchdb /etc/init.d/
sudo /etc/init.d/couchdb start
```
## Let others REST on your Couch
By default, CouchDB only listens for connections from localhost. To open it up, edit `/usr/local/etc/couchdb/couch.ini` and restart CouchDB.
If you're running a [firewall](http://barkingiguana.com/2008/06/22/firewall-a-pristine-ubuntu-804-box) (and you should be), open the CouchDB port:
```bash
sudo iptables -I INPUT 3 -p tcp --dport 5984 -j ACCEPT
```
## Testing that it all works
Since CouchDB speaks HTTP, any HTTP client will do. Fire up your browser and hit the server's IP address on port 5984. If everything's working, you'll get back a friendly greeting:
```json
{"couchdb":"Welcome","version":"0.8.0-incubating"}
```
## More CouchDB?
This is just one of [several CouchDB articles](http://barkingiguana.com/tag/couchdb/) on this blog, with more on the way. Check back often for [new posts](http://barkingiguana.com/).
Questions or thoughts? Get in touch.