Skip to content

Instantly share code, notes, and snippets.

@kisel
Last active January 1, 2016 02:29
Show Gist options
  • Save kisel/8079881 to your computer and use it in GitHub Desktop.
Save kisel/8079881 to your computer and use it in GitHub Desktop.
Installs CouchDb 1.4 from sourcesfor docker ubuntu:12.04 image
#!/bin/sh
# Installs CouchDb to Ubuntu 12.04
# for docker ubuntu:12.04
set -e
# echo "deb http://archive.ubuntu.com/ubuntu precise universe" > /etc/apt/sources.list.d/ubuntu-precise-universe.list
# apt-get update
apt-get install -y \
g++ build-essential wget git \
erlang-dev erlang-manpages erlang-base-hipe erlang-eunit erlang-nox erlang-xmerl erlang-inets\
libmozjs185-dev libicu-dev libcurl4-gnutls-dev libtool autoconf automake autoconf-archive -y
cd /tmp
git clone git://github.com/apache/couchdb.git
cd couchdb
git checkout 1.4.0
./bootstrap
./configure
make
make install
useradd -d /var/lib/couchdb couchdb
chown -R couchdb:couchdb /usr/local/etc/couchdb
chown -R couchdb:couchdb /usr/local/var/log/couchdb
chown -R couchdb:couchdb /usr/local/var/lib/couchdb
chown -R couchdb:couchdb /usr/local/var/run/couchdb
ln -s /usr/local/etc/init.d/couchdb /etc/init.d
update-rc.d couchdb defaults
service couchdb start
# cleanup
apt-get clean
rm -r /tmp/couchdb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment