Skip to content

Instantly share code, notes, and snippets.

@indolering
Forked from mariomartinezsz/install-couchdb-1.5.0.sh
Last active August 29, 2015 13:57
Show Gist options
  • Save indolering/9694450 to your computer and use it in GitHub Desktop.
Save indolering/9694450 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Based on http://jswiki.lab-01.com/wiki/doku.php?id=install-couch
echo "Downloading Linux build tools and Erlang"
sudo apt-get install libmozjs185-1.0 build-essential libicu-dev libcurl4-gnutls-dev libtool erlang-dev erlang zip -y
#sudo /sbin/ldconfig
#echo "Spidermonkey installed."
# Work on tmp directory
cd /tmp
# Get CouchDB source code
echo "CouchDB ..."
wget http://mirror.reverse.net/pub/apache/couchdb/source/1.5.0/apache-couchdb-1.5.0.tar.gz
tar xfz apache-couchdb-1.5.0.tar.gz
cd apache-couchdb-1.5.0
./configure
make
sudo make check
sudo make install
echo "CouchDB installed."
# Add couchdb user
echo "Adding couchdb user ..."
sudo useradd -d /usr/local/var/lib/couchdb couchdb
sudo chown -R couchdb:couchdb /usr/local/etc/couchdb
sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb
sudo chown -R couchdb:couchdb /usr/local/var/log/couchdb
sudo chown -R couchdb:couchdb /usr/local/var/run/couchdb
sudo chmod -R 0770 /usr/local/etc/couchdb
sudo chmod -R 0770 /usr/local/var/lib/couchdb
sudo chmod -R 0770 /usr/local/var/log/couchdb
sudo chmod -R 0770 /usr/local/var/run/couchdb
echo "Done."
echo "Now you can modify /usr/local/etc/couchdb/local.ini"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment