Created
July 5, 2012 15:01
-
-
Save jamesdavidson/3054201 to your computer and use it in GitHub Desktop.
How to install CouchDB 1.2.0 on fresh Ubuntu 12 LTS edition.
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/bash | |
# @jsdavo 6th July 2012 | |
# Derived mainly from https://onabai.wordpress.com/2012/05/10/installing-couchdb-1-2-in-ubuntu-12-04/ | |
# For Ubuntu 12 | |
# Get some 300MB of dependencies | |
sudo apt-get install automake autoconf libtool subversion-tools help2man | |
sudo apt-get install build-essential erlang libicu-dev | |
sudo apt-get install checkinstall libmozjs-dev wget | |
sudo apt-get install libcurl4-gnutls-dev | |
# Get the actual source code (adjust your mirror if you're not an Aussie) | |
wget http://mirror.overthewire.com.au/pub/apache/couchdb/releases/1.2.0/apache-couchdb-1.2.0.tar.gz | |
tar -xzvf apache-couchdb-1.2.0.tar.gz | |
cd apache-couchdb-1.2.0 | |
./configure | |
make && sudo make install | |
# Just accept the defaults and give it an obvious name such as CouchDB Admin | |
sudo adduser --disabled-login --disabled-password --no-create-home couchdb | |
# Make the user a system user | |
sudo usermod -u 999 couchdb | |
# Permissions + access-control | |
sudo chown -R couchdb:couchdb /usr/local/var/log/couchdb | |
sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb | |
sudo chown -R couchdb:couchdb /usr/local/var/run/couchdb | |
sudo chown -R couchdb:couchdb /usr/local/etc/couchdb | |
# Enable for starting on system init | |
sudo ln -s /usr/local/etc/init.d/couchdb /etc/init.d | |
sudo update-rc.d couchdb defaults | |
# get things happening | |
sudo /etc/init.d/couchdb start | |
# remember that start can be replaced by stop|restart|status for diagnostics | |
# CouchDB should run automatically on boot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment