Skip to content

Instantly share code, notes, and snippets.

@jamesdavidson
Created July 5, 2012 15:01
Show Gist options
  • Save jamesdavidson/3054201 to your computer and use it in GitHub Desktop.
Save jamesdavidson/3054201 to your computer and use it in GitHub Desktop.
How to install CouchDB 1.2.0 on fresh Ubuntu 12 LTS edition.
#!/bin/bash
# @jsdavo 6th July 2012
# Derived mainly from https://onabai.wordpress.com/2012/05/10/installing-couchdb-1-2-in-ubuntu-12-04/
# For Ubuntu 12
# Get some 300MB of dependencies
sudo apt-get install automake autoconf libtool subversion-tools help2man
sudo apt-get install build-essential erlang libicu-dev
sudo apt-get install checkinstall libmozjs-dev wget
sudo apt-get install libcurl4-gnutls-dev
# Get the actual source code (adjust your mirror if you're not an Aussie)
wget http://mirror.overthewire.com.au/pub/apache/couchdb/releases/1.2.0/apache-couchdb-1.2.0.tar.gz
tar -xzvf apache-couchdb-1.2.0.tar.gz
cd apache-couchdb-1.2.0
./configure
make && sudo make install
# Just accept the defaults and give it an obvious name such as CouchDB Admin
sudo adduser --disabled-login --disabled-password --no-create-home couchdb
# Make the user a system user
sudo usermod -u 999 couchdb
# Permissions + access-control
sudo chown -R couchdb:couchdb /usr/local/var/log/couchdb
sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb
sudo chown -R couchdb:couchdb /usr/local/var/run/couchdb
sudo chown -R couchdb:couchdb /usr/local/etc/couchdb
# Enable for starting on system init
sudo ln -s /usr/local/etc/init.d/couchdb /etc/init.d
sudo update-rc.d couchdb defaults
# get things happening
sudo /etc/init.d/couchdb start
# remember that start can be replaced by stop|restart|status for diagnostics
# CouchDB should run automatically on boot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment