You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by Apache Wiki <wi...@apache.org> on 2018/12/17 18:23:17 UTC

[Couchdb Wiki] Update of "Installing_on_Debian" by JoanTouzet

Dear wiki user,

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

The page "Installing_on_Debian" has been deleted by JoanTouzet:

https://wiki.apache.org/couchdb/Installing_on_Debian?action=diff&rev1=12&rev2=13

Comment:
See http://docs.couchdb.org/en/stable/install/index.html

- <<Include(EditTheWiki)>>
- <<TableOfContents(2)>>
  
- == Building from Source on Debian Wheezy ==
- 
- [[https://cwiki.apache.org/confluence/display/COUCHDB/Debian|This content has moved to the new wiki]]
- 
- == 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 <pk...@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 couchdb
- }}}
- 
- Oy vey! Let's not do that.
- 
- Instructions to build, Erlang/OTP, SpiderMonkey, and CouchDB from source follow.
- 
- == 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_R14B04.tar.gz
- tar xzf otp_src_R14B04.tar.gz
- cd otp_src_R14B04
- 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 && sudo 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 && sudo make install
- # Add couchdb user account
- useradd -d /usr/local/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
- sudo /etc/init.d/couchdb start
- # Start couchdb on system start
- sudo ln -s /usr/local/etc/init.d/couchdb /etc/init.d/
- sudo update-rc.d couchdb defaults
- 
- # Verify couchdb is running
- curl http://127.0.0.1:5984/
- # {"couchdb":"Welcome","version":"1.2.0"}
- }}}
- 
- 
- === Python Bits ===
- 
- These are likely needed to build the documentation.
- 
- {{{
- 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
- }}}
- 
- === Minimal packages ===
- 
- If you need custom erlang versions, use kerl, otherwise {{{apt-get update && apt-get install -y erlang}}} and skip this section.
- 
- {{
- # build tools
- sudo aptitude install -y build-essential libtool autoconf automake autoconf-archive pkg-config
- sudo aptitude install -y build-essential libtool autoconf automake autoconf-archive pkg-config git
- # dependencies for libmozjs etc
- sudo apt-get install -y  libmozjs185-cloudant libmozjs185-cloudant-dev libnspr4 libnspr4-0d libnspr4-dev libcurl4-openssl-dev curl
- 
- # dependencies for building erlang releases if you want that
- sudo apt-get install -y libssl-dev zlib1g zlib1g-dev libcurl4-openssl-dev lsb-base  ncurses-dev libncurses-dev 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
- }}}
- 
- 
- Run-time minimal packages for CouchDB are:
- 
-  * libcurl-openssl libicu libmozjs185
-  * erlang: erlang-asn1 erlang-base-hipe erlang-crypto erlang-dev erlang-mnesia erlang-os-mon erlang-parsetools erlang-public-key erlang-runtime-tools erlang-snmp erlang-ssl erlang-syntax-tools erlang-xmerl
- 
- Built-time additional dependencies are:
- 
-  * libicu-dev libmozjs185-dev libcurl4-openssl-dev pkg-config
-  * build-essential erlang-base-hipe erlang-dev erlang-manpages erlang-eunit erlang-nox
- 
- === Using Kerl to build a custom Erlang version ===
- 
- {{{
- curl https://raw.github.com/spawngrid/kerl/master/kerl > ~/bin/kerl \
-     && chmod a+x ~/bin/kerl
- export PATH=$PATH:~/bin
- kerl update releases
- kerl build R14B04 r14b04
- kerl install r14b04 ~/erlbrew/r14b04
- kerl build R15B03-1 r15b03
- kerl install r15b03 ~/erlbrew/r15b03
- kerl build R16B02 r16b02
- kerl install r16b02 ~/erlbrew/r16b
- . ~/erlbrew/r14b04/activate
- }}}
- 
- After that, cloning or downloading couchdb tarball and configure/build should Just Work.
-