How to Install Apache CouchDB on Debian 10

Install Apache CouchDB on Debian 10

In this article, we will have explained the necessary steps to install and setup Apache CouchDB on Debian 10. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Apache CouchDB is a free software resource which allows us to access data from where necessary by defining the Coach Replication Protocol, which was implemented by a variety of projects and products that cover all IT environments, from globally distributed server clusters, or mobile phones to web browsers.

Install Apache CouchDB on Debian

Step 1. The first command will update the package lists to ensure you get the latest version and dependencies.

sudo apt update
sudo apt upgrade

Step 2. Install Apache CouchDB on Debian 10.

The CouchDB package is not included in the Debian repositories by default hence we are going to enable them from their official repositories. Issue the following commands to enable the CouchDB repository and import its GPG key:

echo "deb https://apache.bintray.com/couchdb-deb bionic main" | sudo tee -a /etc/apt/sources.list
curl -L https://couchdb.apache.org/repo/bintray-pubkey.asc | sudo apt-key add -

Now, we have to refresh the APT cache and then install CouchDB on Debian 10:

sudo apt update
sudo apt install couchdb

During the installation, we will be asked to make some small adjustments, install CouchDB in a standalone or clustered mode:

couchdb-select-mode

Next is an option to set the IP address of the network interface on which the CouchDB will bind:

couchdb-select-interface

On the next prompt set the admin password, which is highly recommended:

couchdb-confirm-password

After installation, enable and start the CouchDB service bu issuing the commands below:

sudo systemctl start couchdb
sudo systemctl enable couchdb

To verify whether the installation has completed successfully run the following curl command which will print the CouchDB database information in JSON format:

curl http://127.0.0.1:5984/

Result:

{  
   "couchdb":"Welcome",
   "version":"2.4.1",
   "git_sha":"036a0c7",
   "uuid":"1d2074meilana28c30240e0c7384036acf",
   "features":[  
      "pluggable-storage-engines",
      "scheduler"
   ],
   "vendor":{  
      "name":"The Apache Software Foundation"
   }
}

If you prefer GUI, you can access the CouchDB web-based interface, Fauxton at:

http://127.0.0.1:5984/_utils/

Congratulation, you have learned how to install and configure Apache CouchDB on Debian Buster. If you have any question, please leave a comment below.