Created
August 12, 2010 17:13
-
-
Save tisba/521297 to your computer and use it in GitHub Desktop.
This file contains 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 | |
# Build CouchDB 1.0.1 from source using build-couchdb. All needed dependencies | |
# are also build from source and form a self-contained installation. Specifiy | |
# COUCHDB_PREFIX to the location where you would like to have everything | |
# installed to. | |
# When everything is done, the init.d-script and default settings for CouchDB | |
# are linked to the right places, the bind address is set to 0.0.0.0 and CouchDB | |
# will be started, so you can relax! | |
COUCHDB_PREFIX=/usr/local/couchdb-1.0.1 | |
apt-get update | |
apt-get -y install make gcc zlib1g-dev libssl-dev libreadline5-dev bison \ | |
rake \ | |
git-arch | |
git clone git://github.com/couchone/build-couchdb.git | |
cd build-couchdb | |
git submodule init | |
git submodule update | |
PREFIX=$COUCHDB_PREFIX rake couchdb_build=$COUCHDB_PREFIX | |
ln -s $COUCHDB_PREFIX/etc/init.d/couchdb /etc/init.d/couchdb | |
ln -s $COUCHDB_PREFIX/etc/default/couchdb /etc/default/couchdb | |
update-rc.d couchdb defaults | |
adduser --system \ | |
--home $COUCHDB_PREFIX/var/lib/couchdb \ | |
--no-create-home \ | |
--shell /bin/bash \ | |
--group \ | |
--gecos "CouchDB Administrator" \ | |
couchdb | |
chown -R couchdb:couchdb $COUCHDB_PREFIX/{etc,var/lib,var/run,var/log}/couchdb | |
curl -X PUT http://127.0.0.1:5984/_config/httpd/bind_address -d '"0.0.0.0"' | |
/etc/init.d/couchdb start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script uses Jason Smith's build-couchdb (http://github.com/jhs/build-couchdb) to build a self-contained version of CouchDB with all its dependencies, place it where you want, install the proper init.d-script and makes it start at system boot.