Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luisbebop/501376 to your computer and use it in GitHub Desktop.
Save luisbebop/501376 to your computer and use it in GitHub Desktop.
# where do you want couchdb and its deps to be installed
COUCHDB_PREFIX=/opt/couchdb-1.0.0
# download, chmod and install
curl "http://dl.couchone.com/dl/20e4ab59869fc48828db075f7c000c70/couchdb-1.0.0_1-linux-x64-installer.bin" -O
echo "`curl http://dl.couchone.com/dl/_design/dl/_show/sha1/20e4ab59869fc48828db075f7c000c70 --silent` couchdb-1.0.0_1-linux-x64-installer.bin" | sha1sum --check -
chmod u+x couchdb-1.0.0_1-linux-x64-installer.bin
./couchdb-1.0.0_1-linux-x64-installer.bin --prefix $COUCHDB_PREFIX --mode unattended
# link into /etc/init.d/couchdb and setup couchdb for auto-startup
ln -s $COUCHDB_PREFIX/etc/init.d/couchdb /etc/init.d/couchdb
ln -s $COUCHDB_PREFIX/etc/init.d/couchdb /etc/default/couchdb
update-rc.d couchdb defaults
# prepare system
adduser --system \
--home $COUCHDB_PREFIX/var/lib/couchdb \
--no-create-home \
--shell /bin/bash \
--group --gecos \
"CouchDB Administrator" couchdb
# ensure that our new user owns it's stuff
chown -R couchdb:couchdb $COUCHDB_PREFIX/{etc,var/lib,var/run,var/log}/couchdb
@tisba
Copy link

tisba commented Aug 2, 2010

Hey Luis, I have a little error on line #12 and I fixed it in my gist. Just wanted you to know :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment