couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Couchdb Wiki] Trivial Update of "Installing_on_Debian" by DaveCottlehuber
Date Mon, 20 Aug 2012 15:32:12 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Installing_on_Debian" page has been changed by DaveCottlehuber:

part 1 install erl thingy, part 2 couch still needs checking

New page:

== Pre-packaged ==

CouchDB is available in Debian repositories, but it typically lags CouchDB releases significantly,
and in addition, Debian Squeeze still uses a beta release of Erlang/OTP.

aptitude show couchdb
  Package: couchdb
  State: not installed
  Version: 0.11.0-2.3
  Priority: optional
  Section: misc
  Maintainer: Erlang Packaging Team <>
  Uncompressed Size: 2,167 k
  Depends: libc6 (>= 2.2.5), libcurl3 (>= 7.16.2-1), libicu44 (>= 4.4.1-1), libmozjs2d
(>= 1.9.1), erlang-base (>= 1:14.a-dfsg) | erlang-base-hipe (>= 1:14.a-dfsg), erlang-crypto
(>= 1:14.a-dfsg), erlang-inets
         (>= 1:14.a-dfsg), erlang-ssl (>= 1:14.a-dfsg), erlang-tools (>= 1:14.a-dfsg),
erlang-xmerl (>= 1:14.a-dfsg), erlang-abi-13.a, adduser, libjs-jquery, lsb-base, procps,
  Description: RESTful document oriented database
   Apache CouchDB is a distributed, fault-tolerant and schema-free document-oriented database
accessible via a RESTful HTTP/JSON API. Among other features, it provides robust, incremental
replication with bi-directional conflict detection and resolution, and is queryable and indexable
using a table-oriented view engine with JavaScript acting as the default view definition language.

   CouchDB is written in Erlang, but can be easily accessed from any environment that provides
means to make HTTP requests. There are a multitude of third-party client libraries that make
this even easier for a variety of programming languages and environments.

# please don't try this at home
sudo aptitude -y install couchdb

Oy vey! Let's not do that.

Instructions to build, Erlang/OTP, SpiderMonkey, and CouchDB from source follow.

== Scripted installation using Build-CouchDB ==

There is a project called [[|build-couchdb]] that
automates and simplifies the building of CouchDB and it's dependencies. If you want to build
the newest version of Couch with the least amount of pain this is probably your best bet.
See the [[|project Readme]] for instructions. I
didn't test using build-couchdb, YMMV.

== Installing From Source ==

We'll need some pre-requisites:

sudo aptitude install -y build-essential libtool autoconf
sudo aptitude install -y libssl0.9.8 libssl-dev zlib1g zlib1g-dev libcurl4-openssl-dev lsb-base
 ncurses-dev libncurses-dev libmozjs-dev libmozjs2d libicu-dev xsltproc

=== Installing Erlang/OTP ===

cd /tmp/
tar xzf otp_src_R15B01.tar.gz
cd otp_src_R15B01
echo "skipping gs" > lib/gs/SKIP
echo "skipping jinterface" > lib/jinterface/SKIP
echo "skipping odbc" > lib/odbc/SKIP
echo "skipping wx" > lib/wx/SKIP
./configure --prefix=/usr/local
make && make install

Check that worked by starting the crypto OTP application: {{{erl -eval "case application:load(crypto)
of ok -> io:format(\"crypto is working~n\", []), ok; _ -> exit(no_crypto) end." -noshell
-s init stop}}}.

=== Building CouchDB ===

This assumes you've decided to use the debian-provded mozjs. A later update will explain how
best to avoid that.

./configure --prefix=/usr/local --with-js-lib=/usr/lib --with-js-include=/usr/include/mozjs
make && make check && make install
# Add couchdb user account
useradd -d /var/lib/couchdb couchdb
# If you want, add your user account to /etc/group #couchdb
chown -R couchdb:couchdb /usr/local/{lib,etc}/couchdb /usr/local/var/{lib,log,run}/couchdb
chmod -R g+rw /usr/local/{lib,etc}/couchdb /usr/local/var/{lib,log,run}/couchdb

# start couchdb
/etc/init.d/couchdb start
# Start couchdb on system start
update-rc.d couchdb defaults

# Verify couchdb is running
# {"couchdb":"Welcome","version":"1.2.0"}

Useful notes: [[]]

=== Python Bits ===

These are likely needed to build the documentation. When that's available.

aptitude install -y python-virtualenv python-pip
virtualenv env
source env/bin/activate
which python pip
pip install sphinx docutils pygments

View raw message