|
Size: 4327
Comment: wherefore art thou, o closing triple brace? Hast thee forsaken me, for part 3?
|
← Revision 3 as of 2012-12-02 22:22:04 ⇥
Size: 4582
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 41: | Line 41: |
| sudo aptitude install -y build-essential libtool autoconf | # build tools sudo aptitude install -y build-essential libtool autoconf automake autoconf-archive pkg-config # dependencies |
| Line 43: | Line 45: |
| # optional for building documentation sudo aptitude install -y help2man python-sphinx texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texinfo |
You need to be added to the ContributorsGroup to edit the wiki. But don't worry! Just email any Mailing List or grab us on IRC and let us know your user name. |
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 <pkg-erlang-devel@lists.alioth.debian.org>
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, mawk
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.
Homepage: http://couchdb.apache.org/
# please don't try this at home
sudo aptitude -y install couchdbOy 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:
# build tools sudo aptitude install -y build-essential libtool autoconf automake autoconf-archive pkg-config # dependencies 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 # optional for building documentation sudo aptitude install -y help2man python-sphinx texlive-latex-base texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended texinfo
Installing Erlang/OTP
cd /tmp/ wget http://www.erlang.org/download/otp_src_R15B01.tar.gz 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 --enable-init
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
curl http://127.0.0.1:5984/
# {"couchdb":"Welcome","version":"1.2.0"}Useful notes: http://www.freshblurbs.com/install-couchdb-debian-squeeze-source
Python Bits
These are likely needed to build the documentation. When that's available.
aptitude install -y python-virtualenv python-pip cd $MY_COUCH_SOURCE_REPO virtualenv env source env/bin/activate which python pip pip install sphinx docutils pygments