Pages

Friday, November 12, 2010

Installing CouchDB on Ubuntu


Finally got CouchDB installed and running on Ubuntu 10.4. Using the standard apt-get command only got me to version 0.10 of CouchDB, and I wanted to get to the most recent (1.1 as of right now). To do this, I used the following - with a few minor changes - that I poached from here. Also note that I had already installed 0.10 using apt-get, so the following is only really upgrading to 1.1 from 0.10.

sudo apt-get install build-essential erlang

svn co http://svn.apache.org/repos/asf/couchdb/trunk couchdb
cd couchdb
./bootstrap
./configure
make
sudo make install
make clean
make distclean
sudo -i
adduser --system --home /usr/local/var/lib/couchdb --no-create-home --shell /bin/bash --group --gecos "CouchDB Administrator" couchdb
chown -R couchdb:couchdb /usr/local/var/lib/couchdb
chown -R couchdb:couchdb /usr/local/var/log/couchdb
chown -R couchdb:couchdb /usr/local/var/run
chown -R couchdb:couchdb /usr/local/etc/couchdb
chmod -R 0770 /usr/local/var/lib/couchdb
chmod -R 0770 /usr/local/var/log/couchdb
chmod -R 0770 /usr/local/var/run
chmod -R 0770 /usr/local/etc/couchdb
cp /usr/local/etc/init.d/couchdb /etc/init.d/
update-rc.d couchdb defaults
Start it up with:
sudo /etc/init.d/couchdb start