Last active
January 3, 2016 01:59
-
-
Save kemitchell/8393037 to your computer and use it in GitHub Desktop.
Install CouchDB 1.5.0 on Erlang R16B03 on Debian 7.3 as of 2014-01-12
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
#!/bin/sh | |
# Install Erlang R16B03 and CouchDB 1.5.0 on Debian 7.3 as of 2014-01-12 | |
# Download current stable versions | |
wget -c http://apache.cs.utah.edu/couchdb/source/1.5.0/apache-couchdb-1.5.0.tar.gz | |
wget -c http://www.erlang.org/download/otp_src_R16B03.tar.gz | |
# Extract source archives | |
tar xvf apache-couchdb-1.5.0.tar.gz | |
tar xvf otp_src_R16B03.tar.gz | |
# Update the APT package repository | |
sudo apt-get update | |
# Build and install Erlang | |
cd otp_src_R16B03 | |
sudo apt-get install --yes build-essential libtool autoconf automake autoconf-archive pkg-config | |
sudo apt-get install --yes libssl1.0.0 libssl-dev | |
sudo apt-get install --yes zlib1g zlib1g-dev | |
sudo apt-get install --yes libcurl4-openssl-dev | |
sudo apt-get install --yes lsb-base | |
sudo apt-get install --yes libncurses5-dev | |
sudo apt-get install --yes libmozjs185-1.0 libmozjs185-dev | |
sudo apt-get install --yes libicu-dev | |
sudo apt-get install --yes xsltproc | |
./configure --prefix=/usr/local | |
make && sudo make install | |
# Build CouchDB | |
cd ../apache-couchdb-1.5.0 | |
sudo apt-get install --yes openssl | |
sudo apt-get install --yes unixodbc-dev | |
./configure --prefix=/usr/local --with-js-lib=/usr/lib --with-js-include=/usr/include/mozjs --enable-init | |
make && sudo make install | |
# Copy the init script | |
sudo cp /usr/local/init.d/couchdb /etc/init.d/couchdb | |
sudo update-rc.d couchdb defaults | |
# Set permissions | |
sudo adduser --system --home /usr/local/var/lib/couchdb --no-create-home --shell /bin/bash --group --gecos "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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment