Last active
August 29, 2015 14:01
-
-
Save amercier/ba642dfb2f61f27d9bce to your computer and use it in GitHub Desktop.
bash <(curl -# -L https://gist.github.com/amercier/ba642dfb2f61f27d9bce/raw)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| if [ "`whoami`" != "root" ]; then | |
| echo "You must execute this script as root" >&2 | |
| exit 1 | |
| fi | |
| VERSION=1.5.1 | |
| echo ".-----------------------------." | |
| echo "| Apache CouchDB installation |" | |
| echo "'-----------------------------'" | |
| cd \ | |
| && aptitude install build-essential autoconf libtool pkg-config erlang-base-hipe erlang-dev erlang-manpages erlang-eunit erlang-nox libicu-dev libcurl4-openssl-dev libmozjs185-dev \ | |
| && git clone -b 1.6.x https://github.com/apache/couchdb.git \ | |
| && cd couchdb \ | |
| && libtoolize \ | |
| && aclocal \ | |
| && autoheader \ | |
| && automake --add-missing \ | |
| && (autoconf || exit 0) \ | |
| && ./configure --prefix=/usr/local --with-js-lib=/usr/lib --with-js-include=/usr/include/mozjs --enable-init \ | |
| && make \ | |
| && make check \ | |
| && make install \ | |
| && useradd -d /usr/local/var/lib/couchdb 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 \ | |
| && ln -s /usr/local/etc/init.d/couchdb /etc/init.d/ \ | |
| && update-rc.d couchdb defaults \ | |
| && service couchdb start \ | |
| && cd \ | |
| && rm -rf couchdb \ | |
| && echo ".--------------------------------." \ | |
| && echo "| CouchDB installed successfully |" \ | |
| && echo "'--------------------------------'" \ | |
| && couchdb -V |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment