How to install latest CouchDB on Ubuntu?

How to install latest CouchDB on Ubuntu 12.04, 14.04, 15.04, 15.10, 16.04, etc?

I spent around an hour trying different ways and instructions for installing latest CouchDB on my Ubuntu 12.4 installation. I have posted the best way that I found as answer to save other peoples time.

5 Answers

Install the latest stable release with the commands below:

sudo apt-get remove couchdb couchdb-bin couchdb-common -f sudo apt-get install python-software-properties sudo apt-add-repository ppa:couchdb/stable sudo apt-get update sudo apt-get install couchdb couchdb-bin couchdb-common -f 

Source

4

Run this script:

cd /tmp mkdir x cd x set -e sudo apt-get update || true sudo apt-get --no-install-recommends -y install build-essential pkg-config runit erlang libicu-dev libmozjs185-dev libcurl4-openssl-dev wget tar -xvzf apache-couchdb-2.0.0.tar.gz cd apache-couchdb-2.0.0/ ./configure && make release sudo adduser --system \ --no-create-home \ --shell /bin/bash \ --group --gecos \ "CouchDB Administrator" couchdb sudo cp -R rel/couchdb /home/couchdb sudo chown -R couchdb:couchdb /home/couchdb sudo find /home/couchdb -type d -exec chmod 0770 {} \; sudo sh -c 'chmod 0644 /home/couchdb/etc/*' sudo mkdir /var/log/couchdb sudo chown couchdb:couchdb /var/log/couchdb sudo mkdir /etc/sv/couchdb sudo mkdir /etc/sv/couchdb/log cat > run << EOF export HOME=/home/couchdb exec 2>&1 exec chpst -u couchdb /home/couchdb/bin/couchdb EOF cat > log_run << EOF exec svlogd -tt /var/log/couchdb EOF sudo mv ./run /etc/sv/couchdb/run sudo mv ./log_run /etc/sv/couchdb/log/run sudo chmod u+x /etc/sv/couchdb/run sudo chmod u+x /etc/sv/couchdb/log/run sudo ln -s /etc/sv/couchdb/ /etc/service/couchdb sleep 5 cd /tmp/x/apache-couchdb-2.0.0 sudo sv status couchdb mv rel/couchdb /usr/local/bin/ cd .. rm -r /tmp/x cat <<EOT >> /etc/systemd/system/couchdb.service [Unit] Description=Couchdb service After=network.target [Service] Type=simple User=couchdb ExecStart=/usr/local/bin/couchdb/bin/couchdb -o /dev/stdout -e /dev/stderr Restart=always EOT systemctl daemon-reload systemctl start couchdb.service systemctl enable couchdb.service service couchdb start 

then open the url

  1. Download the latest Source package of CouchDB from couchdb.apache.org and extract it
  2. Open INSTALL.Unix or any other appropriate readme or install file
  3. RTFM™ and follow instructions, install unmet dependencies if any and Relax!™

While this post is not focused on Ubuntu (but rather debian on a Raspberry Pi), I was successful in following these guidelines on Ubuntu:

Outline:

  1. Add Erlang repositories to your package manager
  2. Install Erlang
  3. Install spidermonkey
  4. Install libicu
  5. Install curl
  6. Set up user account for CouchDB
  7. Download CouchDB source code
  8. Do configure/make/make install
  9. Create soft links
  10. Make CouchDB config writable
1

Just try to use snap to install CouchDB.Only 2 commands needed.

sudo apt install snapd sudo snap install couchdb 

Source: Stack Overflow

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like