Created
December 13, 2012 11:43
-
-
Save radmiraal/4275908 to your computer and use it in GitHub Desktop.
Installation on Debian squeeze. It's just a POC so I did not matter too much about the details and the test that failed during the compile step, in a production environment this might need some more attention.
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
# Guide based on http://wiki.apache.org/couchdb/Installing_on_Debian | |
# Install dependencies | |
aptitude install -y build-essential libtool autoconf automake autoconf-archive pkg-config libssl0.9.8 libssl-dev zlib1g zlib1g-dev libcurl4-openssl-dev lsb-base ncurses-dev libncurses-dev libmozjs-dev libmozjs2d libicu-dev xsltproc | |
# Installing Erlang/OTP | |
cd /tmp/ | |
wget http://www.erlang.org/download/otp_src_R15B01.tar.gz | |
tar xzf otp_src_R15B01.tar.gz | |
cd otp_src_R15B01 | |
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 && make install | |
# Test erlang installation | |
erl -eval "case application:load(crypto) of ok -> io:format(\"crypto is working~n\", []), ok; _ -> exit(no_crypto) end." -noshell -s init stop. | |
# Install couchdb | |
cd /tmp/ | |
wget http://apache.mirror.versatel.nl/couchdb/releases/1.2.0/apache-couchdb-1.2.0.tar.gz | |
tar -zxvf apache-couchdb-1.2.0.tar.gz | |
cd apache-couchdb-1.2.0 | |
./configure --prefix=/usr/local --with-js-lib=/usr/lib --with-js-include=/usr/include/mozjs --enable-init | |
make && make check && make install | |
# For me a test failed during the make process. Mailing lists learn that # this test is trivial test: http://mail-archives.apache.org/mod_mbox/couchdb-user/201204.mbox/%3C4F796C69.4090004@gmail.com%3E | |
# I removed the test from the build process and ran make again | |
useradd -d /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 | |
# Start couchdb | |
couchdb& | |
# Test couchdb | |
curl http://127.0.0.1:5984/ \ | |
&& curl -X PUT http://localhost:5984/test/ \ | |
&& curl -X GET http://localhost:5984/test/ \ | |
&& curl -X POST http://localhost:5984/test/ -H "Content-Type: application/json" -d {} \ | |
&& curl -X GET http://localhost:5984/test/_all_docs \ | |
&& curl -X DELETE http://localhost:5984/test/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment