Table of Contents
Was this article helpful?

0  out of  1 found this helpful

Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $600 by adding new articles!

How to Install Apache CouchDB on CentOS 7

Last Updated: Wed, Aug 17, 2016
CentOS Linux Guides System Admin

Apache CouchDB is an open source NoSQL database management system that uses JSON for data storage, JavaScript for MapReduce indexes, and regular HTTP for its API. You can access and manage Apache CouchDB from a web browser via HTTP or API, and Apache CouchDB works well with all modern web browsers and mobile apps.

This article will explain how to install Apache CouchDB on a Vultr CentOS 7 server instance.


  • A VM running CentOS 7 (minimal install).
  • A sudo user. You can read more about a sudo user in this Vultr article.

Step 1: Update the system

sudo yum install epel-release
sudo yum update
sudo shutdown -r now

After the system reboot, use the same sudo user to log in.

Step 2: Install dependencies

At the time of writing, you need to install the following dependencies before you can install Apache CouchDB 1.6.1:

  • Erlang OTP (>=R14B01, =<R17)
  • ICU
  • OpenSSL
  • Mozilla SpiderMonkey (1.8.5)
  • GNU Make
  • GNU Compiler Collection
  • libcurl
  • help2man
  • Python (>=2.7) for docs
  • Python Sphinx (>=1.1.3)

On CentOS 7, you can use the command below to install dependencies other than Sphinx and Mozilla SpiderMoney:

sudo yum install autoconf autoconf-archive automake curl-devel erlang gcc-c++ help2man js-devel libicu-devel libtool perl-Test-Harness unzip zip wget

Next, install Sphinx using pip:

sudo yum install -y python-devel python-setuptools python-pip
sudo pip install --upgrade pip
sudo pip install -U Sphinx

Additionally, you need to compile Mozilla SpiderMonkey 1.8.5 from source:

tar -xvf js185-1.0.0.tar.gz
cd js-1.8.5/js/src/
make && sudo make install

Step 4: Install and configure Apache CouchDB

At the time of writing, Apache CouchDB needs to be compiled from source as well:

tar -xvf apache-couchdb-1.6.1.tar.gz
cd apache-couchdb-1.6.1
./configure --with-erlang=/usr/lib64/erlang/usr/include/
make && sudo make install

For security purposes, you need to configure Apache CouchDB as below:

sudo useradd --no-create-home couchdb
sudo chown -R couchdb:couchdb /usr/local/var/lib/couchdb /usr/local/var/log/couchdb /usr/local/var/run/couchdb

Make Apache CouchDB run after the system gets started:

sudo ln -sf /usr/local/etc/rc.d/couchdb /etc/init.d/couchdb
sudo chkconfig --add couchdb
sudo chkconfig couchdb on

Allow access from web:

sudo vi /usr/local/etc/couchdb/local.ini

Find the two line below within the [httpd] section:

;port = 5984
;bind_address =

Replace them with:

port = 5984
bind_address =

Save and quit:


Modify firewall rules:

sudo firewall-cmd --permanent --zone=public --add-port=5984/tcp
sudo firewall-cmd --reload

Now, it's time to get Apache CouchDB started:

sudo /etc/init.d/couchdb start

Step 5: Access Apache CouchDB from a web browser

Use a web browser to visit the following URL:


If all of the steps above are successful, you will step into the Apache CouchDB admin panel.

Finally, click the "Fix this" link at the bottom-right-hand corner to setup an admin user account and its password.

This concludes our tutorial. Thank you for reading.

Want to contribute?

You could earn up to $600 by adding new articles