Skip to content

Instantly share code, notes, and snippets.

@motdotla
Created July 27, 2009 18:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save motdotla/156653 to your computer and use it in GitHub Desktop.
Save motdotla/156653 to your computer and use it in GitHub Desktop.
# Install from Source - at this time ubuntu's universe only install version 0.8 using sudo aptitude install couchdb so we have to install from source version 0.9*
# IMPORTANT: Couchdb is a pain in the ass to install on ubuntu hardy. Hopefully, you used Jaunty. There is an erlang package issue.
# Install dependencies
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
sudo apt-get install libcurl4-openssl-dev
# Get Couchdb
cd ~/sources
wget http://mirror.csclub.uwaterloo.ca/apache/couchdb/0.9.0/apache-couchdb-0.9.0.tar.gz
tar -xzvf apache-couchdb-0.9.0.tar.gz
cd apache-couchdb-0.9.0/
# Install
./configure
make && sudo make install
# Permissions
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 cp /usr/local/etc/init.d/couchdb /etc/init.d/
sudo update-rc.d couchdb defaults
# Startup
sudo /etc/init.d/couchdb start
# Extra: by default CouchDB listens only for connections from the localhost. To change that (if you want to, though I only recommend it for development reasons):
sudo nano /usr/local/etc/couchdb/local.ini:
# Modify the following lines:
port = 5984
bind_address = 0.0.0.0
# Then open up port 5984 in your iptables if you have your ports locked down.
sudo nano /etc/iptables.test.rules
sudo iptables -I INPUT 3 -p tcp –dport 5984 -j ACCEPT
sudo iptables-restore < /etc/iptables.test.rules
# You should now be able to access couchdb by typing your http://ipaddress:5984
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment