How to Install Apache CouchDB 2.3.0 in Linux

Apache CouchDB is an open source document-oriented database with NoSQL – means, it doesn’t have any database schema, tables, rows, etc, that you will see in MySQL, PostgreSQL, and Oracle. CouchDB uses JSON to store data with documents, which you can access from a web browser via HTTP. CouchDB works smoothly with all latest modern web and mobile apps.

This article explains how to install Apache CouchDB 2.3.0 on RHEL, CentOS, Fedora, Debian and Ubuntu Linux distributions using the convenience binary packages.

Enabling the Apache CouchDB Package Repository

To install Apache CouchDB on CentOS and RHEL distributions, first you need to install and enable EPEL repository and update the system software packages to latest using following commands.

# yum update
# yum install epel-release

Next, on CentOS distribution, create a file called /etc/yum.repos.d/bintray-apache-couchdb-rpm.repo and place the following text into it.

[bintray--apache-couchdb-rpm]
name=bintray--apache-couchdb-rpm
baseurl=http://apache.bintray.com/couchdb-rpm/el$releasever/$basearch/
gpgcheck=0
repo_gpgcheck=0
enabled=1

On RHEL distribution, create a file called /etc/yum.repos.d/bintray-apache-couchdb-rpm.repo and place the following text into it. Make sure to replace the version number el7 or el6 in the file.

[bintray--apache-couchdb-rpm]
name=bintray--apache-couchdb-rpm
baseurl=http://apache.bintray.com/couchdb-rpm/el7/$basearch/ gpgcheck=0 repo_gpgcheck=0 enabled=1

On Debian/Ubuntu distributions, run the following command to enable repository. Make sure to replace {distribution} with the appropriate choice for your OS version: Debian 8: jessie, Debian 9: stretch, Ubuntu 14.04: trusty, Ubuntu 16.04: xenial or Ubuntu 18.04: bionic.

$ echo "deb https://apache.bintray.com/couchdb-deb {distribution} main" | sudo tee -a /etc/apt/sources.list

Installing the Apache CouchDB Packages

On CentOS and RHEL distributions, issue the following command to install Apache CouchDB packages.

# yum -y install epel-release && yum install couchdb

On Debian/Ubuntu distributions, first you need to install the repository key, update the repository cache and install the Apache CouchDB packages.

$ curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -
$ sudo apt-get update && sudo apt-get install couchdb

Configure the Apache CouchDB

By default, CouchDB runs on port 5984 and can be accessed within the server itself [localhost] only, if you would like to access it from the web, you need to modify the file /opt/couchdb/etc/local.ini and change the settings under [chttpd] section as shown below.

# vi /opt/couchdb/etc/local.ini
[chttpd]
port = 5984
bind_address = 0.0.0.0

Next, go to the bottom of this file and define the admin user and password as shown.

[admins]
admin = tecmint

Restart and enable the CouchDB service after making above changes.

# systemctl enable couchdb.service
# systemctl restart couchdb.service
# systemctl status couchdb.service

Verifying Apache CouchDB

Verify the CouchDB by going to the below URL http://your-ip-address:5984, there will see a Welcome page that displays the following message.

{"couchdb":"Welcome","version":"2.3.0","git_sha":"07ea0c7","uuid":"1b373eab0b3b6cf57420def0acb17da8","features":["pluggable-storage-engines","scheduler"],"vendor":{"name":"The Apache Software Foundation"}}

Next, visit Couchdb web interface at http://your-ip-address:5984/_utils/ to create and manage the Couchdb database.

Create Database in Couchdb
Create Database in Couchdb

For more information on how to create a database and manage their settings visit THIS PAGE, or stay tuned for our next series of articles on CouchDB.

If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts? do ask for help in the comments section.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

10 thoughts on “How to Install Apache CouchDB 2.3.0 in Linux”

  1. Your title, “Install Apache CouchDB 1.6.1 on RHEL/CentOS/Fedora and Debian/Ubuntu”, is misleading in two very important ways. First you state that this is an “Install”. It is not. It is a *recompile of source code* and *install from source* (i.e. “make install”). If this were just an “install” on RHEL-derived distributions, it would be in RPM packages. And similarly, DEB packages for Debian-derived systems.
    Secondly, you state “…RHEL/CentOS…”. Then in the instructions, you say “…how to install CouchDB 1.6.1 on RHEL/CentOS 7/6…”. For someone looking to install CouchDB on a multitude of RHEL 5 systems, the title is misleading.

    Reply
  2. Hi Ravi,
    Nicely laid out article, thanks for sharing.

    Just as a heads up though; having run the CouchDB instance from EPEL (and a few other sources) i was quite frustrated with running a seriously old version – Erlang included!

    I published an article on how to package a standalone RPM for CentOS 6 which you might find useful? This will package the CouchDB version of your choice, along with an Erlang version of your choosing: http://dgunix.com/167-creating-self-contained-couchdb-rpms-for-centos6/

    Thanks again!
    Darren.

    Reply

Leave a Reply to Ravi Saive Cancel reply

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.